diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 7bca3ce841f580..33b15852f606d1 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2065,7 +2065,7 @@ An additional use case is for GitLab users of project or group access tokens who 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`. -Setting this field to `true` in GitLab will also mean that all Issues will be fetched instead of only those by the bot itself. +Setting this field to `true` in Github or 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/github/graphql.ts b/lib/modules/platform/github/graphql.ts index 3931dd47d56257..6e877aeea44f93 100644 --- a/lib/modules/platform/github/graphql.ts +++ b/lib/modules/platform/github/graphql.ts @@ -41,7 +41,7 @@ export const getIssuesQuery = ` query( $owner: String!, $name: String!, - $user: String!, + $user: String, $count: Int, $cursor: String ) { diff --git a/lib/modules/platform/github/index.ts b/lib/modules/platform/github/index.ts index a0873b7d0c09b6..764e6fe33f36a7 100644 --- a/lib/modules/platform/github/index.ts +++ b/lib/modules/platform/github/index.ts @@ -1214,7 +1214,7 @@ async function getIssues(): Promise { variables: { owner: config.repositoryOwner, name: config.repositoryName, - user: config.renovateUsername, + ...(!config.ignorePrAuthor && { user: config.renovateUsername }), }, readOnly: true, },