GitHub platform: getIssueList() returns empty with GitHub App token on GHEC, causing duplicate Dependency Dashboard issues on every run #44408
Replies: 2 comments
-
|
Hi there, You're reporting a problem with an old version of Renovate. Please try the latest version and tell us if that fixes your problem. Be sure to provide updated logs once you have run with a newer version. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
|
The So To pin it down:
If those diverge, the GraphQL |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
GitHub Enterprise Server
Which version of Renovate are you using?
43.251.1
Please tell us more about your question or problem
Environment
ghcr.io/renovatebot/renovate:43-full)isGheCloud: true,gheVersion: null)actions/create-github-app-token)Describe the bug
When running Renovate with a GitHub App installation token on GitHub Enterprise Cloud,
getIssueList()consistently returns 0 results, even when open issues created by thebot exist in the target repository. As a result, Renovate creates a new Dependency
Dashboard issue on every single run instead of updating the existing one.
Steps to reproduce
renovatebot/github-actionbeing updated
Expected behavior
Renovate finds the existing open "Dependency Dashboard" issue and updates it in place.
Actual behavior
getIssueList()returns 0 issues on every run.findIssue("Dependency Dashboard")therefore returns
null, andensureIssue()creates a new issue every run.Root cause hypothesis
The GitHub REST API endpoint
uses
filter=createdto return "issues created by the currently authenticated user."With a GitHub App installation token, GitHub Enterprise Cloud appears to interpret
"the currently authenticated user" as scoped to the current token session — not as the
persistent bot account (
renovate-bot[bot]). Since a new installation token isgenerated on every workflow run, issues created by a previous token are not returned.
This is consistent with the observed behavior:
Retrieved 0 issueson every run, evenwith open issues present.
In contrast, using the
creatorquery parameter (?creator=renovate-bot%5Bbot%5D)would search by the stable bot username rather than the transient token session identity.
Suggested fix
In
lib/modules/platform/github/index.ts, replacefilter=createdwith an explicitcreator={renovateUsername}query parameter ingetIssueList():This would use the stable bot username (
my-renovate-bot[bot]) regardless of whichinstallation token is active in the current run.
Workaround
As a temporary workaround, a GitHub Actions step was added that snapshots the existing
Dashboard body before the Renovate run, compares it with the newly created issue after
the run, and closes the duplicate if the content is unchanged (preserving the original
issue number).
Platform config from debug log
{ "hostType": "github", "isGHApp": true, "isGhe": true, "isGheCloud": true, "gheVersion": null, "userDetails": { "username": "my-renovate-bot[bot]", "id": 1234567, "email": null }, "renovateUsername": "my-renovate-bot[bot]" }Logs (if relevant)
Debug log evidence
This was observed in consecutive runs with confirmed open issues (#56 was open when the
run creating #57 started).
For comparison, PR fetching works correctly in the same run:
PRs are fetched without
filter=createdand filtered in code — which works. Issuesappear to rely on the
filter=createdAPI parameter — which does not.Beta Was this translation helpful? Give feedback.
All reactions