-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
build: create merge script w/ cherry-picking #18856
Conversation
c88180e
to
cb4b3dc
Compare
cb4b3dc
to
d405bd6
Compare
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.
Overall, I think its in good shape, but just a few bigger questions to answer with the first one being are we okay with not having the PR marked as merged in the Github UI.
A couple higher level comments as well:
-
I don't know if its worth having the script support multiple merges with one command. We want to ensure we have a CI run for each PR that is merged so we would need to push multiple times anyway.
-
Some of these files are pretty lengthy, I am not sure if there is a best option, but I would be in favor of splitting some of the reusable pieces into other files if there are logical places to do so.
d405bd6
to
981a592
Compare
981a592
to
85d78a6
Compare
@jelbourn Addressed your feedback (and also simplified things a bit). Also, are you aware of the fact that this script doesn't preserve the purple I think we should just acknowledge that this is a Github limitation. Github should just provide an API for changing the PR state to |
Ah, if we can't preserve the purple "merged" status, then I would prefer to continue pressing the button in the UI. Maybe then the script could handle the cherry-picking after merging the PR. |
@jelbourn I think the problem here is that this script should be also usable in other repositories. If it would be only used in the components repository, then we could definitely use the Github PR merge API, and perform the cherry-picking locally. Though I wanted the script to be part of the shared dev-infra tools, so that it can be used in framework too. Framework relies on auto-squashing which isn't supported by the Github merge buttons. We don't perform fast-forward merges (we cannot), so if we ever want that behavior, Github needs to provide an API for us to set the merged state. Alternatively we can add opt-in options to the script that allow:
Basically, the script would be made "suitable" for requirements from both repositories where the script is used. I personally would prefer having a single canonical way, but I understand the reason for having it show up as Also only cherry-picking a merged PR through the Github API/UI will also complicate things, as it will be difficult for the script to find corresponding PR commits if the PR has been merged through the Another interesting alternative is that the PR can merged through API into a temporary |
85d78a6
to
b62c6ed
Compare
@jelbourn @josephperrott I made the changes we discussed in our meeting about this. The merge strategy for using the Github API turned a bit more code than initially anticipated, but I think that amount of code is reasonable and acceptable. Easy to remove if we ever want a canonical merge strategy across all repositories. |
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.
Looks good overall, just a few small comments
message: 'Please update the commit message', | ||
default: commitMessage, | ||
}); | ||
|
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.
Should we also be validating the commit message that is created here?
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.
I'd say yes, but that seems to be something we can tackle as a follow-up? Especially since we are not having commit message validation in the components repo yet. I'd like to set it up soon, but I think we need some upstream changes to account for a different scope
that we support.
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.
SGTM
Creates a merge script that automatically merges pull requests from Github and cherry-picks them into the right publish branches based on the PR target label. The script has been designed in an extensible and programmatically acessible way, so that it can be used in other Angular repositories too. The script provides infrastructure for PR merge safety checks. e.g. it currently enforces that the CLA is signed, or that the merge ready label is assigned, or that no CI checks are failing / pending.
b62c6ed
to
badd337
Compare
@jelbourn @josephperrott Addressed most of the feedback. Please have another look. |
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.
LGTM
Address feedback
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.
LGTM
* build: create merge script w/ cherry-picking Creates a merge script that automatically merges pull requests from Github and cherry-picks them into the right publish branches based on the PR target label. The script has been designed in an extensible and programmatically acessible way, so that it can be used in other Angular repositories too. The script provides infrastructure for PR merge safety checks. e.g. it currently enforces that the CLA is signed, or that the merge ready label is assigned, or that no CI checks are failing / pending. * fixup! build: create merge script w/ cherry-picking Address feedback
* build: create merge script w/ cherry-picking Creates a merge script that automatically merges pull requests from Github and cherry-picks them into the right publish branches based on the PR target label. The script has been designed in an extensible and programmatically acessible way, so that it can be used in other Angular repositories too. The script provides infrastructure for PR merge safety checks. e.g. it currently enforces that the CLA is signed, or that the merge ready label is assigned, or that no CI checks are failing / pending. * fixup! build: create merge script w/ cherry-picking Address feedback
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Creates a merge script that automatically merges pull
requests from Github and cherry-picks them into the
right publish branches based on the PR target label.
The script has been designed in an extensible and programmatically
acessible way, so that it can be used in other Angular repositories too.
The script provides infrastructure for PR merge safety checks. e.g.
it currently enforces that the CLA is signed, or that the merge ready
label is assigned, or that no CI checks are failing / pending.