-
Notifications
You must be signed in to change notification settings - Fork 37
fix: authenticate to GitHub for open issue detection #746
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For some time, we've been correctly generating the docs on the Renovate release side, but not here, so we're missing out on Open Issues in various places. This fixes it by wiring in the `GITHUB_TOKEN` as part of the build.
Contributor
Author
|
I.e. https://docs.renovatebot.com/modules/platform/forgejo/ not currently showing any open issues, but when building locally (with a ---
edit_url: https://github.com/renovatebot/renovate/edit/main/lib/modules/platform/forgejo/readme.md
---
# Forgejo
...
## Open items
The below list of bugs were current when this page was generated on November 27, 2025.
### Bug reports
- forgejo: comment being edited on merged reconfigure pr [#39428](https://github.com/renovatebot/renovate/issues/39428)
|
viceice
requested changes
Nov 27, 2025
viceice
approved these changes
Nov 27, 2025
jamietanna
added a commit
to renovatebot/renovate
that referenced
this pull request
Dec 5, 2025
We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. [0]: renovatebot/renovatebot.github.io#746
12 tasks
github-merge-queue bot
pushed a commit
to renovatebot/renovate
that referenced
this pull request
Dec 5, 2025
…9801) We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. [0]: renovatebot/renovatebot.github.io#746
jamietanna
added a commit
to renovatebot/renovate
that referenced
this pull request
Dec 5, 2025
…9801) We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. This is a re-apply of ae46c57, as well as making sure that the `GITHUB_TOKEN` is explicitly passed as `extraEnv`, otherwise we see i.e. ``` ERROR: Error getting query results "err": { "cmd": "/bin/sh -c gh issue list --json \"title,number,url,labels\" --search \"type:Bug\" --limit 1000", "stderr": "gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stdout": "", "options": { "encoding": "utf-8", "env": ["CI", "HOME", "PATH", "LANG"], "maxBuffer": 10485760, "timeout": 900000 }, "exitCode": 4, "name": "ExecError", "message": "Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stack": "ExecError: Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n\n at ..." } ``` As we can see, the `env` isn't automagically picking up the `GITHUB_TOKEN`, so we should explicitly pass it. [0]: renovatebot/renovatebot.github.io#746
12 tasks
jamietanna
added a commit
to renovatebot/renovate
that referenced
this pull request
Dec 5, 2025
We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. This is a re-apply of ae46c57, as well as making sure that the `GITHUB_TOKEN` is explicitly passed as `extraEnv`, otherwise we see i.e. ``` ERROR: Error getting query results "err": { "cmd": "/bin/sh -c gh issue list --json \"title,number,url,labels\" --search \"type:Bug\" --limit 1000", "stderr": "gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stdout": "", "options": { "encoding": "utf-8", "env": ["CI", "HOME", "PATH", "LANG"], "maxBuffer": 10485760, "timeout": 900000 }, "exitCode": 4, "name": "ExecError", "message": "Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stack": "ExecError: Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n\n at ..." } ``` As we can see, the `env` isn't automagically picking up the `GITHUB_TOKEN`, so we should explicitly pass it. [0]: renovatebot/renovatebot.github.io#746
jamietanna
added a commit
to renovatebot/renovate
that referenced
this pull request
Dec 5, 2025
We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. This is a re-apply of ae46c57, as well as making sure that the `GITHUB_TOKEN` is explicitly passed as `extraEnv`, otherwise we see i.e. ``` ERROR: Error getting query results "err": { "cmd": "/bin/sh -c gh issue list --json \"title,number,url,labels\" --search \"type:Bug\" --limit 1000", "stderr": "gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stdout": "", "options": { "encoding": "utf-8", "env": ["CI", "HOME", "PATH", "LANG"], "maxBuffer": 10485760, "timeout": 900000 }, "exitCode": 4, "name": "ExecError", "message": "Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stack": "ExecError: Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n\n at ..." } ``` As we can see, the `env` isn't automagically picking up the `GITHUB_TOKEN`, so we should explicitly pass it. [0]: renovatebot/renovatebot.github.io#746
github-merge-queue bot
pushed a commit
to renovatebot/renovate
that referenced
this pull request
Dec 9, 2025
…9818) We're currently always skipping the detection of open bugs/features, so even though [0] introduced authentication to GitHub, this didn't actually lead to the lookup when running in CI. If we're not running in Renovate's CI build (i.e. as part of the release process) or the docs site's CI build (as part of post-release operations) we should continue to skip the build, when running in CI. This also makes it clearer with a WARN log line to explain why this is being skipped. This is a re-apply of ae46c57, as well as making sure that the `GITHUB_TOKEN` is explicitly passed as `extraEnv`, otherwise we see i.e. ``` ERROR: Error getting query results "err": { "cmd": "/bin/sh -c gh issue list --json \"title,number,url,labels\" --search \"type:Bug\" --limit 1000", "stderr": "gh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stdout": "", "options": { "encoding": "utf-8", "env": ["CI", "HOME", "PATH", "LANG"], "maxBuffer": 10485760, "timeout": 900000 }, "exitCode": 4, "name": "ExecError", "message": "Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n", "stack": "ExecError: Command failed: gh issue list ...\ngh: To use GitHub CLI in automation, set the GH_TOKEN environment variable.\n\n at ..." } ``` As we can see, the `env` isn't automagically picking up the `GITHUB_TOKEN`, so we should explicitly pass it. [0]: renovatebot/renovatebot.github.io#746
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For some time, we've been correctly generating the docs on the Renovate
release side, but not here, so we're missing out on Open Issues in
various places.
This fixes it by wiring in the
GITHUB_TOKENas part of the build.