Skip to content

Commit

Permalink
Workaround GitHub CLI bug that requires project read permissions (#710)
Browse files Browse the repository at this point in the history
In some situations `gh pr edit` tries to read the organization's GitHub projects which causes the
PR environment workflows to fail. This is a bug in GitHub CLI. This change works around that issue
by providing the read access.
  • Loading branch information
lorenyu authored Jul 26, 2024
1 parent 6f6d548 commit c5bbdc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr-environment-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
contents: read
id-token: write
pull-requests: write # Needed to comment on PR
repository-projects: read # Workaround for GitHub CLI bug https://github.com/cli/cli/issues/6274

concurrency: pr-environment-${{ inputs.pr_number }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-environment-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
contents: read
id-token: write
pull-requests: write # Needed to comment on PR
repository-projects: read # Workaround for GitHub CLI bug https://github.com/cli/cli/issues/6274

concurrency: pr-environment-${{ inputs.pr_number }}

Expand Down

0 comments on commit c5bbdc4

Please sign in to comment.