Skip to content

Conversation

@jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Dec 5, 2025

Changes

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 #39801, 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.

Context

Please select one of the below:

  • This closes an existing Issue: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Tested on #39814 (hacked around in the CI setup to make sure only docs builds run)

Example job: https://github.com/renovatebot/renovate/actions/runs/19973679938/job/57284443849

Then looking at the built docs, see modules/platform/gitea/index.md now has a few issues related to it

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
Copy link
Contributor Author

I'm happy us not merging this until Monday (when I'm back in the office and can fix issues, if they arise)

@jamietanna jamietanna changed the title fix(docs): look up open issues on main builds for Renovate docs (#39801) fix(docs): look up open issues on main builds for Renovate docs Dec 5, 2025
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.

2 participants