-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandrelating to the gh pr commandp2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Note: English isn’t my strongest skill, so I used AI to help translate this issue. If anything looks odd, please feel free to let me know!
Describe the bug
Running gh pr create inside a GitHub Actions workflow on a self-hosted runner (GitHub Enterprise Server) fails in gh v2.76.0, while the same workflow succeeds in v2.75.1.
Error message:
error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams)
Affected version
gh version 2.76.0
(v2.75.1 works as expected)
GHE 3.14.7
Steps to reproduce the behavior
- On a GitHub Enterprise self-hosted runner, run the following command inside a workflow or shell (authenticated with the default
GITHUB_TOKEN):
env:
GH_ENTERPRISE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_HOST: ${{ secrets.GH_HOST }}gh pr create \
--title "[Auto Generated] Merge chore/investigate-gh-cli-actions into release20250722" \
--body "- This PR was automatically created by GitHub Action" \
--base release20250722 \
--head chore/investigate-gh-cli-actions \
--reviewer ${{ github.event.pull_request.user.login }}- Observe the CLI output.
- The command exits with the GraphQL error shown above.
Expected vs actual behavior
Expected – The pull request is created successfully without errors.
Actual – The command aborts with
error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams).
Logs
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2025-07-22 10:57:15.645353278 +0000 UTC m=+0.106273358
* Request to https://***/api/graphql
* Request took 196.853936ms
[git config --get-regexp ^branch\.chore/investigate-gh-cli-actions\.(remote|merge|pushremote|gh-merge-base)$]
* Request at 2025-07-22 10:57:15.846370735 +0000 UTC m=+0.307290806
* Request to https://***/api/graphql
* Request took 132.334393ms
* Request at 2025-07-22 10:57:15.980077053 +0000 UTC m=+0.440997115
* Request to https://***/api/graphql
* Request at 2025-07-22 10:57:15.980144083 +0000 UTC m=+0.441064143
* Request to https://***/api/graphql
* Request at 2025-07-22 10:57:15.980191129 +0000 UTC m=+0.441111171
* Request to https://***/api/graphql
* Request took 61.681612ms
* Request took 75.983812ms
* Request took 294.085325ms
error fetching organization teams: GraphQL: Resource not accessible by integration (organization.teams)
maxmzkrcensys, foygl, MetRonnie, michimaus and henarewilliammartin, andyfeller and hitima
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsgh-prrelating to the gh pr commandrelating to the gh pr commandp2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions