Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide repository info to gh command in GitHub action #7491

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Jan 22, 2024

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)

Which issue, if any, is this issue related to?

Follow-up to PR #7486

Is there anything in the PR that needs further explanation?

By the way, if cli/cli#3556 was realized, this PR would be no longer needed.

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)
Copy link

changeset-bot bot commented Jan 22, 2024

⚠️ No Changeset found

Latest commit: cb960f7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ybiquitous
Copy link
Member Author

Oops. GH_REPO is empty for some reason 👀

image

https://github.com/stylelint/stylelint/actions/runs/7609859353/job/20721956481#step:2:16

@ybiquitous
Copy link
Member Author

@Mouvedia
Copy link
Member

works now! 🎉 (https://github.com/stylelint/stylelint/actions/runs/7609902394/job/20722091368)

I can confirm that; my notification center was full of these.

@ybiquitous
Copy link
Member Author

my notification center was full of these.

Ya, me too. 😅

@ybiquitous ybiquitous merged commit e86c9cd into main Jan 22, 2024
15 checks passed
@ybiquitous ybiquitous deleted the follow-up-7486 branch January 22, 2024 10:48
@Mouvedia
Copy link
Member

Mouvedia commented Jan 22, 2024

@ybiquitous
The oldest ready to implement issue is #1871 but it doesn't have a warning comment yet.
FYI it was last updated on Oct 9, 2023.

@ybiquitous
Copy link
Member Author

@Mouvedia Ah, great catch! It's due to --limit 30 by default:

$ gh issue list -h
...
  -L, --limit int          Maximum number of issues to fetch (default 30)
...

We need to increase the limit. I'll open one more PR soon. 👍🏼

@ybiquitous
Copy link
Member Author

Otherwise, one more PR is unneeded since we can trigger the action again to reduce the rest.

$ gh issue list --search "is:open updated:<${one_month_ago} label:\"status: ready to implement\""

Showing 24 of 24 issues in stylelint/stylelint that match your search
...

@Mouvedia
Copy link
Member

Ah, great catch!

We are gonna bother so many ppl. I am feeling regretful to have found out.

@ybiquitous
Copy link
Member Author

Done! ✅

Confirmed locally:

$ gh issue list --search "is:open updated:<${one_month_ago} label:\"status: ready to implement\""
no issues match your search in stylelint/stylelint

@ybiquitous
Copy link
Member Author

We are gonna bother so many ppl. I am feeling regretful to have found out.

Exactly. 😓

@ms-9t
Copy link

ms-9t commented Jan 26, 2024

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)

Which issue, if any, is this issue related to?

Follow-up to PR #7486

Is there anything in the PR that needs further explanation?

By the way, if cli/cli#3556 was realized, this PR would be no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants