Skip to content
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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

HonkingGoose
Copy link
Collaborator

Changes

  • Create new page to explain the bot identity/name concept:
    • Why you may need to switch bot id
    • Explain how to migrate from Mend-hosted to self-hosted
    • Explain how to rename the bot

Context

Closes #30385.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@HonkingGoose HonkingGoose requested a review from rarkins August 21, 2024 09:51
@viceice viceice requested review from nabeelsaabna and removed request for viceice August 21, 2024 12:39
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

- 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
Copy link
Member

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 😉

Copy link
Collaborator Author

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?


- Migrating between Mend-hosted and self-hosted
- Renaming the bot (self-hosted)
- Editor note: Maybe there are other reasons too, please comment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be extended later, never had this requirement yet 🙃

Comment on lines +31 to +33
1. Start of ordered list with steps
1. Second step
1. Third step, and so on
Copy link
Member

Choose a reason for hiding this comment

The 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 🤷‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Start of ordered list with steps
1. Second step
1. Third step, and so on
1. Confirm the _new_ bot user name is set on your Git-hosting platform
1. Replace the old bot username with the _new_ bot username


### Other situations

Editor note: Please comment about other cases where you need to switch bot identity.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️


## Questions from the editor

- Is the `gitAuthor` field the bot identity?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's used as git author only

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Is the `gitAuthor` field the bot identity?

## Questions from the editor

- Is the `gitAuthor` field the bot identity?
- What's `gitIgnoredAuthors` for? It looks like you can ignore commits from the old bot with it?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only for detecting changed PR

Comment on lines +51 to +52
- 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.
Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Collaborator Author

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments to get this going again. 😄


- 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
Copy link
Collaborator Author

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?

Comment on lines +31 to +33
1. Start of ordered list with steps
1. Second step
1. Third step, and so on
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Start of ordered list with steps
1. Second step
1. Third step, and so on
1. Confirm the _new_ bot user name is set on your Git-hosting platform
1. Replace the old bot username with the _new_ bot username

Comment on lines +35 to +37
### Other situations

Editor note: Please comment about other cases where you need to switch bot identity.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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.

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. 😉


## Questions from the editor

- Is the `gitAuthor` field the bot identity?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Is the `gitAuthor` field the bot identity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New page about Switching bot identity
3 participants