-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[Utils] Add new merge-release-pr.py script. #101630
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
Conversation
✅ With the latest revision this PR passed the Python code formatter. |
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.
Main comment is about using docstrings over just comments about the function (https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings). We don't have an official Python style guide (maybe we should start one), but I think it's a reasonable enough format and standardized enough, at least in the code that I read (which is a bit biased towards one style).
We could also use the Github API here to grab the PR info/do stuff, but using the gh
tool seems good enough, and if that's what the release managers have setup, then that's what we should go with because they're the ones ultimately using it.
Writing tests looks like it would mostly be integration tests while mocking the Github API/CLI tool, which would be a massive pain for not much benefit.
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 think this looks good. In theory, we might be able to add a workflow in the future to run this script automatically when a release manager approves a PR.
This script helps the release managers merge backport PR's. It does the following things: * Validate the PR, checks approval, target branch and many other things. * Rebases the PR * Checkout the PR locally * Pushes the PR to the release branch * Deletes the local branch I have found the script very helpful to merge the PR's.
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.
This script helps the release managers merge backport PR's.
It does the following things:
I have found the script very helpful to merge the PR's.