diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml index 7ee0be4..fed6b6a 100644 --- a/.github/workflows/commit-check.yml +++ b/.github/workflows/commit-check.yml @@ -9,8 +9,9 @@ jobs: commit-check: runs-on: ubuntu-latest permissions: # use permissions because of use pr-comments - contents: read + contents: write pull-requests: write + id-token: write steps: - uses: actions/checkout@v4 with: diff --git a/main.py b/main.py index eb0af9c..580ca71 100755 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import sys import subprocess import re -from github import Github +from github import Github, GithubRetry # Constants for message titles @@ -104,7 +104,8 @@ def add_pr_comments() -> int: pr_number = os.getenv("GITHUB_REF").split("/")[-2] # Initialize GitHub client - g = Github(token) + # g = Github(token) + g = Github(token, retry=GithubRetry()) repo = g.get_repo(repo_name) pull_request = repo.get_issue(int(pr_number)) diff --git a/requirements.txt b/requirements.txt index 7025a47..33889a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ # For details please see: https://github.com/commit-check/commit-check commit-check==0.8.5 # Interact with the GitHub API. -PyGithub==2.4.0 +PyGithub==2.1.0.post0