-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: new page about Switching bot identity #30445
base: main
Are you sure you want to change the base?
Changes from 4 commits
3f65694
d2b0446
2411a6f
0edddf4
8708557
ae54b70
c04241b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,52 @@ | ||||||||||||
# Switching bot identity | ||||||||||||
|
||||||||||||
Renovate uses its bot identity to know: | ||||||||||||
|
||||||||||||
- if a PR is authored by Renovate bot | ||||||||||||
- if you, or some other bot, pushed commits into the PR branch | ||||||||||||
- Editor note: list other things Renovate uses the bot id for here | ||||||||||||
|
||||||||||||
## Reasons to switch bot identity | ||||||||||||
|
||||||||||||
Common reasons to switch bot identity are: | ||||||||||||
|
||||||||||||
- Migrating from Mend-hosted to self-hosted | ||||||||||||
HonkingGoose marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
- Renaming the bot (self-hosted) | ||||||||||||
- Editor note: Maybe there are other reasons too, please comment | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can be extended later, never had this requirement yet 🙃 |
||||||||||||
|
||||||||||||
### Migrating from Mend-hosted to self-hosted | ||||||||||||
|
||||||||||||
Most users start with the Mend-hosted bot, and are happy with this. | ||||||||||||
After a while, some users want to switch to self-hosting, for more control. | ||||||||||||
|
||||||||||||
When you migrate you must tell your new self-hosted Renovate bot to take over from the old Mend-hosted bot. | ||||||||||||
|
||||||||||||
### Renaming the bot (self-hosted) | ||||||||||||
|
||||||||||||
Maybe you started self-hosting Renovate, and called your bot `@old-bot-name`. | ||||||||||||
But the name no longer fits, so you want to use `@new-bot-name`. | ||||||||||||
|
||||||||||||
Follow these steps: | ||||||||||||
|
||||||||||||
1. Start of ordered list with steps | ||||||||||||
1. Second step | ||||||||||||
1. Third step, and so on | ||||||||||||
Comment on lines
+31
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you don't need to do much on a simple account rename. 🤔 maybe check if username is set and replace it with new name 🤷♂️ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
### Other situations | ||||||||||||
|
||||||||||||
Editor note: Please comment about other cases where you need to switch bot identity. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤷♂️
Comment on lines
+35
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If there are no more situations where a user may want/need to switch the Renovate bot ID, we can drop the whole section with this suggestion. 😉 |
||||||||||||
|
||||||||||||
## How to switch bot identity | ||||||||||||
|
||||||||||||
Looks like the steps are: | ||||||||||||
|
||||||||||||
1. Put old bot name in the `gitIgnoredAuthors` config option | ||||||||||||
1. Set `ignorePrAuthor` to `true` | ||||||||||||
1. Let the "new" bot take over from the "old bot" | ||||||||||||
|
||||||||||||
## Questions from the editor | ||||||||||||
|
||||||||||||
- Is the `gitAuthor` field the bot identity? | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, it's used as git author only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
- What's `gitIgnoredAuthors` for? It looks like you can ignore commits from the old bot with it? | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only for detecting changed PR |
||||||||||||
- We also have `ignorePrAuthor` which if set to `true` fetches the _whole_ list of PRs, instead of just fetching Renovate PRs. The docs say this is the one to use to ignore old bot names. But the description of `ignorePrAuthor` only mentions the full list fetching, nothing about the name/id of the bot. | ||||||||||||
- It's easy to confuse `gitIgnoredAuthors` and `ignorePrAuthor` they have similar names, but do different things. | ||||||||||||
Comment on lines
+51
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. by default renovate only fetches it's own PR's. so to find the others identity PRs, you need to enable ignore PR author. ignore git author's is used to detect user changes, so add the old git author to the list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is used to propose updates 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that Renovate uses its bot identity as identifier to the Git-hosting platform (GitHub, for example) to create a update PR?