Skip to content

Conversation

@jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Nov 27, 2025

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.

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.
@jamietanna jamietanna changed the title fix: authenticate to GitHub to look at fix: authenticate to GitHub for open issue detection Nov 27, 2025
@jamietanna
Copy link
Contributor Author

I.e. https://docs.renovatebot.com/modules/platform/forgejo/ not currently showing any open issues, but when building locally (with a GITHUB_TOKEN) you can see:

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

@jamietanna jamietanna requested a review from viceice November 27, 2025 11:31
@jamietanna jamietanna enabled auto-merge (squash) November 27, 2025 12:36
@jamietanna jamietanna merged commit 3c7119e into main Nov 27, 2025
6 checks passed
@jamietanna jamietanna deleted the ci/gh branch November 27, 2025 12:38
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
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
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants