Open
Conversation
dependabot,renovate: add integration test
f44a02e to
814860c
Compare
alvarocabanas
approved these changes
Feb 22, 2023
Contributor
alvarocabanas
left a comment
There was a problem hiding this comment.
LGTM, as you said is not so pretty, but it's needed and how you did it is clear, better to not overcomplicate the code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This use case was revealed to me in a dream.
Well, actually not, it was revealed to me yesterday at 23:50 when I had to revert a renovate PR that broke the ingress controller of both of my cluster. But that doesn't sound nearly as deep.
Code is not particularly pretty, mainly because revert commits may be authored by anyone, so we have to ignore the author check. I think this is probably fine: Odds that a commit starts with
Revertbut also happens to match the dependabot/renovate regexes seems quite slim.I unfortunately had to add a
nolintdirective for the cyclomatic complexity of theChangelog()funcitons. I honestly care about cognitive complexity a lot, but not so much for cyclo. LMK if you agree with this, if you don't maybe we can think a way to refactor it.Another catch is that, if the same release captures both a commit and a revert, the change will appear twice in the changelog.
While developing this, I also figured out that unit test for Renovate is buggy. I'll open a different PR for that.