-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Adding update PR elements in azure PR updater #3486
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
What's the idea behind updating certain elements sometimes vs the entire PR other times?
A concern is that we now no longer follow the same API for different updaters.
I don't know if that's necessarily problematic, but up until now we've kept the interfaces the same between these different clients. At this point I think it's pretty unlikely that someone will agnostically open PRs against different providers, so deviating might be fine. @feelepxyz wdyt?
I've been thinking that it might even make sense to completely split off the Azure and GitLab clients from core and finding long-term maintainers for those, as we're probably not the best folks to maintain this code.
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.
@milind009 would be good to understand the use case for this and why the existing update method is not working for you? Slightly worried we're adding support for use-cases we don't understand and we end up with several slightly different ways to do the same thing.
Keen to figure if we can improve the existing update method instead or leave this as something that's done outside of dependabot if it's specific to your workflow.
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.
Hm just re-reading your PR description and sounds like we won't be able to easily fix the existing update method to do what you want. Looks like we only pass in
pr_name
in the creator for example and assuming you want to be able to update this?I'm inclined to not merge this into core and encourage you to write a wrapper for this functionality in your dependabot setup as it seems specific to what you are doing.
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.
@feelepxyz Currently the update function that we have for the azure client is used force push new changes on to the PR. However, we have a requirement to set a PR to autocomplete (azure create PR API does have an option to set PR to autocomplete but unfortunately it does not work, hence we need to create a PR and then set it to autocomplete)/abandon existing PR for which we need to use the azure update PR API. So I created to separate method which can be used for updating other PR aesthetics like title, description,etc.
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.
@milind009 is this something that could maybe live in the project that you use to run dependabot? It doesn't seem to rely on anything dependabot-specific?
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.
Cool makes sense. I'll add this in our project. Thanks for the prompt replies!