Skip to content

Commit

Permalink
fix(github): fetch all open issue if ignorePrAuthor=true (renovatebot…
Browse files Browse the repository at this point in the history
…#29485)

Co-authored-by: Rhys Arkins <rhys@arkins.net>
  • Loading branch information
2 people authored and kosmoz committed Jun 12, 2024
1 parent de55bea commit a15e7ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/github/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const getIssuesQuery = `
query(
$owner: String!,
$name: String!,
$user: String!,
$user: String,
$count: Int,
$cursor: String
) {
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ async function getIssues(): Promise<Issue[]> {
variables: {
owner: config.repositoryOwner,
name: config.repositoryName,
user: config.renovateUsername,
...(!config.ignorePrAuthor && { user: config.renovateUsername }),
},
readOnly: true,
},
Expand Down

0 comments on commit a15e7ef

Please sign in to comment.