[Updater] Extract RefreshVersionPullRequest as an Operation class#6939
Merged
[Updater] Extract RefreshVersionPullRequest as an Operation class#6939
Conversation
e1642cc to
1ee7a5c
Compare
491aad5 to
2096c14
Compare
landongrindheim
approved these changes
Mar 30, 2023
updater/lib/dependabot/updater/operations/refresh_version_pull_request.rb
Outdated
Show resolved
Hide resolved
updater/lib/dependabot/updater/operations/refresh_version_pull_request.rb
Outdated
Show resolved
Hide resolved
933bd79 to
99adc98
Compare
Contributor
Author
|
@landongrindheim I've added a last commit removing some dead code from the |
99adc98 to
e98c3f4
Compare
landongrindheim
approved these changes
Mar 31, 2023
e98c3f4 to
24a7a9c
Compare
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.
Follows on from #6866, #6884
This branch peels out the Updater code required to accept a job which is "refreshing" an existing Dependabot PR for a version update using the same approach as before:
Why Refresh?
We use different terminology for this operation in some places depending on the trigger, but it isn't correct to think of it as a "rebase" despite commands like
@dependabot rebaseexisting.The actual behaviour is one of three outcomes:
The term "update" is fairly saturated in Dependabot for obvious reasons, so I went with "refresh" as a good-enough catch all term.
Notes
As with #6866, this code is intentionally not DRY'd out as much as possible. We've de-risked this approach and this branch completes the rule of three, so the next step will be push the shared code into an interface mixin that is common to all Operation classes before starting to peel out the two Security Operations.
This PR is also branched off #6934 which should ship first as an enabling change.