fix: added ability to use github action token when commenting on PR

This commit is contained in:
Anmol Singh
2023-02-26 01:52:51 +05:30
parent 8bd25d079c
commit 3b5a864a2b
4 changed files with 5 additions and 3 deletions

View File

@@ -191,9 +191,9 @@ async def main():
DBM.g("Readme updated!")
else:
DBM.i("Commenting PR...")
pr_data = await DM.get_remote_graphql("get_pr_id", pr_number=EM.PR_NUMBER)
pr_data = await DM.get_remote_graphql("get_pr_id", pr_number=EM.PR_NUMBER, use_github_action=True)
pr_id = pr_data["data"]["repository"]["pullRequest"]["id"]
await DM.get_remote_graphql("add_pr_comment", pr_id=pr_id, comment=stats)
await DM.get_remote_graphql("add_pr_comment", pr_id=pr_id, comment=stats, use_github_action=True)
DBM.g("PR commented!")
DBM.g("Debug run, readme not updated. check the latest comment for the generated stats.")
await DM.close_remote_resources()