Skip to content

Commit e86c9cd

Browse files
authored
Provide repository info to gh command in GitHub action (#7491)
This fixes the following error in the GitHub action: ``` failed to run git: fatal: not a git repository (or any of the parent directories): .git ``` https://github.com/stylelint/stylelint/actions/runs/7609612527/job/20721207993#step:2:19 The failure reason is that the `gh` command tries reading the `.git` repository. This change provides the repository info through an environment variable supported by `gh`. (see also https://cli.github.com/manual/gh_help_environment)
1 parent 0073ab6 commit e86c9cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/commenting-on-old-issues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
gh issue edit "${url}" --add-label 'status: ask to implement' --remove-label 'status: ready to implement'
2727
done
2828
env:
29+
GH_REPO: ${{ github.repository }}
2930
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3031
issue_comment: |-
3132
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.

0 commit comments

Comments
 (0)