-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Labels
coreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIa request to improve CLI
Description
Describe the feature or problem you’d like to solve
GitHub Actions sets the GITHUB_REPOSITORY environment variable, but gh only reads the GH_REPO environment variable.
This means that workflows using gh without an actions/checkout step have to set the GH_REPO environment variable:
jobs:
- name: Count PRs
env:
GH_REPO: ${{ env.GITHUB_REPOSITORY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr list --json number --jq lengthProposed solution
Read GITHUB_REPOSITORY when GH_REPO is not set, similar to the behavior for {GH,GITHUB}_TOKEN (see: #1229, #2388).
jobs:
- name: Count PRs
env:
- GH_REPO: ${{ env.GITHUB_REPOSITORY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr list --json number --jq lengthReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLIa request to improve CLI