-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add merge-trunk-develop-pr action #71
Conversation
0a8e3cc
to
6a17d2c
Compare
to create a PR to merge `trunk` to `develop` after a release done by `woocommerce/grow/prepare-extension-release`. As automerging with `automerge-released-trunk` may not work with branch protections.
6a17d2c
to
91f51db
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.
Thanks for the work. LGTM.
This new GH action could be added to this list as well. (Maybe also add automerge-released-trunk
action by the way?)
All my comments are not blocking this PR.
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Set up git config" | ||
shell: bash | ||
# Use the github-actions bot account to commit. | ||
# https://api.github.com/users/github-actions%5Bbot%5D | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com |
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'm not pretty sure but maybe these two steps are not necessary because the next step doesn't require any repo files nor operates with git commit
. Perhaps it's worth trying to see if this action still works without them or at least the second one.
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.
Thanks :) I thought GHA needed an explicit username to create PRs.
But Github API calls works out of the box, away from CLI git
https://github.com/tomalec/grow/actions/runs/5787573264?pr=30 :)
Removed in 161b44a
a63eb30
to
a25a317
Compare
Github API calls does not need local repo. Addresses #71 (comment)
a25a317
to
161b44a
Compare
Thank you for the review, and great suggestions. Applied them all. |
Changes proposed in this Pull Request:
Add merge-trunk-develop-pr action to create a PR to merge
trunk
todevelop
after a release done bywoocommerce/grow/prepare-extension-release
. As automerging withautomerge-released-trunk
may not work with branch protections.Screenshots:
Detailed test instructions:
woocommerce/grow/prepare-extension-release
set up.actions-v1.9.1-pre
woocommerce/grow/prepare-extension-release
. Then merge it - check that a PR to mergetrunk
todevelop
gets created. Likewoocommerce/grow/prepare-extension-release
, switch a target branch to something else. Merge the PR. No PR should get createdwoocommerce/grow/prepare-extension-release
, close it without merging. No PR should get createdrelease/1.2.3
as a regular user, then merge it to trunk. No PR should get createdAdditional details:
Changelog entry