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

Ability to ignore specified git authors for the purpose of branch.isModified() check #8893

Closed
napei opened this issue Feb 27, 2021 · 8 comments · Fixed by #9082
Closed

Ability to ignore specified git authors for the purpose of branch.isModified() check #8893

napei opened this issue Feb 27, 2021 · 8 comments · Fixed by #9082
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)

Comments

@napei
Copy link

napei commented Feb 27, 2021

What would you like Renovate to be able to do?

From here: #8633 (reply in thread)

In some of my projects I have a bot account which makes commits through an action on PRs which updates golang module files and bazel files with gazelle. These commits are necessary in most cases to allow bazel to build properly. They are also tracked with a checksum file so that builds will fail if dependencies haven't been updated properly, but that's not relevant to renovate.

Currently I have to not use the bot as the git author because renovate won't auto-close PRs if, for example, I update the dependency in main. The current workaround is to just re-use the renovate git author and then it will be deleted and recreated as renovate rebases. (I haven't specifically tested whether the bot affects rebases).

It would be nice to be able to specify a list of git authors that renovate can treat as bot commits or maybe even something in the commit message that could be parsed like [renovate-ignore].

Did you already have any implementation ideas?

A configuration option like

{
  "ignoredAuthors": [
   "Bot Account <[email protected]>",
   "Another Bot <[email protected]>"
  ]
}

or

{
  "commitIgnoreKeyword": "[renovate-ignore]"
}
@napei napei added status:requirements Full requirements are not yet known, so implementation should not be started type:feature Feature (new functionality) labels Feb 27, 2021
@rarkins
Copy link
Collaborator

rarkins commented Feb 27, 2021

I think an option for authors makes sense. Ignored authors or allowed authors?

One challenge is we only look at the head commit in a branch. If the head commit is an allowed author but any ones before they were a human making manual changes then they'd be lost.

Still, allowing authors would work better than nothing we have today.

@rarkins rarkins added status:ready priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others and removed status:requirements Full requirements are not yet known, so implementation should not be started labels Feb 27, 2021
@napei
Copy link
Author

napei commented Feb 27, 2021

Could you look at every commit instead of the head or is that out of scope?

I suppose it's pretty much a known fact that it's an automated PR and that people making changes to it would have to be aware that if it gets rebased automatically then their changes will disappear.

I would also say ignored authors, as you would ignore them when checking if a branch can be autoclosed. Anyone is "allowed" to commit.

@rarkins
Copy link
Collaborator

rarkins commented Feb 27, 2021

There's a lot of performance gains from doing a shallow clone, so we don't have all commits to look at.

@napei
Copy link
Author

napei commented Feb 27, 2021

There's a lot of performance gains from doing a shallow clone, so we don't have all commits to look at.

Fair enough then. Perhaps just a disclaimer that get's added to the PR if HEAD isn't an ignored author?

@rarkins
Copy link
Collaborator

rarkins commented Feb 27, 2021

That already happens

@napei
Copy link
Author

napei commented Feb 27, 2021

That already happens

My bad. So yes basically just a list of ignored authors then.

@rarkins
Copy link
Collaborator

rarkins commented Feb 27, 2021

Related - but a separate topic - I've considered adding a checkbox in PRs that instructs renovate to stop updating the branch/PR

@rarkins rarkins changed the title Ability to specify and ignore bot accounts Ability to ignore specified git authors for the purpose of branch.isModified() check Feb 27, 2021
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 24.82.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants