Skip to content

Commit

Permalink
Provide repository info to gh command in GitHub action (#7491)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
ybiquitous committed Jan 22, 2024
1 parent 0073ab6 commit e86c9cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/commenting-on-old-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
gh issue edit "${url}" --add-label 'status: ask to implement' --remove-label 'status: ready to implement'
done
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
issue_comment: |-
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.

0 comments on commit e86c9cd

Please sign in to comment.