diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 17799486a4475b..0e884ba064901d 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2060,9 +2060,12 @@ Applicable for Composer only for now. ## ignorePrAuthor This is usually needed if someone needs to migrate bot accounts, including from the Mend Renovate App to self-hosted. +An additional use case is for GitLab users of project or group access tokens who need to rotate them. + If `ignorePrAuthor` is configured to true, it means Renovate will fetch the entire list of repository PRs instead of optimizing to fetch only those PRs which it created itself. You should only want to enable this if you are changing the bot account (e.g. from `@old-bot` to `@new-bot`) and want `@new-bot` to find and update any existing PRs created by `@old-bot`. -It's recommended to revert this setting once that transition period is over and all old PRs are resolved. + +Setting this field to `true` in GitLab will also mean that all Issues will be fetched instead of only those by the bot itself. ## ignorePresets diff --git a/lib/modules/platform/gitlab/index.ts b/lib/modules/platform/gitlab/index.ts index e5b1e89368c945..0988ad0bb81750 100644 --- a/lib/modules/platform/gitlab/index.ts +++ b/lib/modules/platform/gitlab/index.ts @@ -1069,11 +1069,14 @@ export async function setBranchStatus({ export async function getIssueList(): Promise { if (!config.issueList) { - const query = getQueryString({ + const searchParams: Record = { per_page: '100', - scope: 'created_by_me', state: 'opened', - }); + }; + if (!config.ignorePrAuthor) { + searchParams.scope = 'created_by_me'; + } + const query = getQueryString(searchParams); const res = await gitlabApi.getJson< { iid: number; title: string; labels: string[] }[] >(`projects/${config.repository}/issues?${query}`, {