-
Notifications
You must be signed in to change notification settings - Fork 78
Description
The problem is that when Renovate CE re-runs a repository, it always puts the "edited/blocked notification" comment on all PRs it created previously.
From what I understood from the debug logs, I think the problem might be our use of MEND_RNV_GITHUB_BOT_USER_ID
, but not sure.
DEBUG: PR cache: Filtered 16 PRs to 14 (user=our-app[bot]) (repository=our-org/our-repo)
and
DEBUG: branch.isModified() = true (repository=our-org/our-repo, branch=our-branch)
"branchName": "our-branch",
"unrecognizedAuthors": ["<bot-user-id>+our-app[bot]@users.noreply.ghe.com"]
i.e. the unrecognized author with the <bot-user-id>+
prefix doesn't match the logged user
for the PR filtering.
I tried getting Renovate to fetch the bot user ID by itself instead of providing it via env var, but the problem is that our Github Enterprise Cloud's API requires authentication for fetching the bot user, and it seems like it purposely unsets the auth before fetching the bot user:
INFO: Using GitHub endpoint
"endpoint": "https://api.our-company.ghe.com/"
DEBUG: hostRules: authentication already set for api.our-company.ghe.com
WARN: The following GitHub App permissions are required: vulnerability_alerts(read)
DEBUG: hostRules: no authentication for api.our-company.ghe.com
DEBUG: GET https://api.our-company.ghe.com/users/our-app[bot] = (code=ERR_NON_2XX_3XX_RESPONSE, statusCode=401 retryCount=0, duration=185)
ERROR: Failed to fetch bot user
I tried setting up a host rule for api.our-company.ghe.com
(in various ways) with a personal access token but the 2nd debug log with "no authentication" just keeps happening.
Thus I cannot confirm that the PR "orphaning" wouldn't happen without MEND_RNV_GITHUB_BOT_USER_ID
.