summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2024-07-31 18:42:44 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-05 19:30:26 +0000
commitd3e9e1077059e8f565daae31811fe3f0d245fb17 (patch)
treec8a3ba1b4520da1fde3a078653d396d89073e085 /.github/workflows
parent98f17cdcf41df331ac3cdd4be0686219fa812b7f (diff)
downloadedk2-d3e9e1077059e8f565daae31811fe3f0d245fb17.tar.gz
.github/request-reviews.yml: Switch to PyGithub
Uses PyGithub for GitHub interactions instead of the GitHub REST API directly. This simplifies the code, improves error handling and robustness, and lets the PyGithub project abstract GitHub REST API changes that may occur over time. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/request-reviews.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/request-reviews.yml b/.github/workflows/request-reviews.yml
index e176a979e9..b358ae089f 100644
--- a/.github/workflows/request-reviews.yml
+++ b/.github/workflows/request-reviews.yml
@@ -74,7 +74,7 @@ jobs:
WORKSPACE_PATH = os.environ['WORKSPACE_PATH']
GET_MAINTAINER_LOCAL_PATH = os.path.join(WORKSPACE_PATH, os.environ['GET_MAINTAINER_REL_PATH'])
- pr_commit_sha = GitHub.get_pr_sha(os.environ['GH_TOKEN'], os.environ['ORG_NAME'], os.environ['REPO_NAME'], os.environ['PR_NUMBER'])
+ pr_commit_sha = GitHub.get_pr_sha(os.environ['GH_TOKEN'], os.environ['ORG_NAME'], os.environ['REPO_NAME'], int(os.environ['PR_NUMBER']))
if not pr_commit_sha:
sys.exit(1)
@@ -89,4 +89,4 @@ jobs:
print(f"::notice title=Reviewer List::Reviewers found for PR {os.environ['PR_NUMBER']}:\n{', '.join(reviewers)}")
- GitHub.add_reviewers_to_pr(os.environ['GH_TOKEN'], os.environ['ORG_NAME'], os.environ['REPO_NAME'], os.environ['PR_NUMBER'], reviewers)
+ GitHub.add_reviewers_to_pr(os.environ['GH_TOKEN'], os.environ['ORG_NAME'], os.environ['REPO_NAME'], int(os.environ['PR_NUMBER']), reviewers)