-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: CI action / label that makes it easy to cherry-pick just a commit against cosmos SDK main #12478
Conversation
Currently failing at hub PR action.
do we have to go to the repo to tag prs? what is the label we need to request teams to create? |
No actions needed from team. This action automatically creates a cherry
picked PR from pull requests in forks made to main
…On Sat, Jul 9, 2022 at 7:53 AM Marko ***@***.***> wrote:
Cherry picks the commit of any fork of cosmos-sdk upon a merged PR to main
on fork.
do we have to go to the repo to tag prs? what is the label we need to
request teams to create?
—
Reply to this email directly, view it on GitHub
<#12478 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASH4FPTELL5Y4PY766FDOM3VTFR5HANCNFSM525XNYKQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
P.s. main of fork, which gets cherry picked into PR
…On Sat, Jul 9, 2022 at 10:33 AM Xiangan He ***@***.***> wrote:
No actions needed from team. This action automatically creates a cherry
picked PR from pull requests in forks made to main
On Sat, Jul 9, 2022 at 7:53 AM Marko ***@***.***> wrote:
> Cherry picks the commit of any fork of cosmos-sdk upon a merged PR to
> main on fork.
>
> do we have to go to the repo to tag prs? what is the label we need to
> request teams to create?
>
> —
> Reply to this email directly, view it on GitHub
> <#12478 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASH4FPTELL5Y4PY766FDOM3VTFR5HANCNFSM525XNYKQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
So we have to essentially merge this PR to see if it really works, correct? |
ah this is because external people don't get keys injected into ci for security purposes by GitHub actions |
Sorry, I’m not exactly sure what that means in the context of fixing this,
could you clarify?
…On Tue, Jul 26, 2022 at 3:51 AM Marko ***@***.***> wrote:
https://github.com/peepmaster/cosmos-sdk/runs/7390327769?check_suite_focus=true
This is the latest CI run that proves that this 'works'. I'm getting a 403
error from the API for "Forbidden" using the Pull Request API - I think we
may have to merge to test this but would love to know what others think of
the cause / fixes of the 403.
ah this is because external people don't get keys injected into ci for
security purposes by GitHub actions
—
Reply to this email directly, view it on GitHub
<#12478 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASH4FPWTIIEHPRWFZO5E4K3VV6KHVANCNFSM525XNYKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Actually sorry, I think I do understand now and that's exactly to our discussion earlier that this needs to be merged in to test. |
Ok, @marbar3778 are you OK with merging first and seeing if this works? If it doesn't, we either patch it or revert it. |
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.
ack
Is it supposed to run at each PR? I don't think it works https://github.com/cosmos/cosmos-sdk/actions/workflows/fork-cherry-pick.yml |
cc @xBalbinus ^^ |
Ooh hmm, it is supposed to run with each PR, I will debug & see what’s
wrong.
…On Wed, Jul 27, 2022 at 4:31 PM Marko ***@***.***> wrote:
cc @xBalbinus <https://github.com/xBalbinus> ^^
—
Reply to this email directly, view it on GitHub
<#12478 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASH4FPQVLCSGDK7DNEJSN7DVWGMDVANCNFSM525XNYKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
After a bit of investigation @marbar3778 @julienrbrt , it seems that there's an issue with the origin of the PR? The way the action is supposed to function is:
I think what I need to do here is actually also add another trigger limiter that says this should only trigger from FORK PRs, not main? |
Alright but why this action is on the Cosmos SDK repo then? If I understand properly it's to the fork that wants to submit PR of their changes that should have this action instead of the Cosmos SDK itself. |
To my understanding the original reason was that the action would then be generalizable across all forks of cosmos SDK... |
I've temporarily disabled the workflow as I debug, will re-enable when set. |
I think it should be disabled at all times on the sdk, then when a fork appears like osmosis, they can reenable it |
I understand, makes sense. One more question, what happens if there is two PRs from a same fork? It seems that the branch name is hardcoded to |
@marbar3778 Agreed! Thank you for the very good idea. And @julienrbrt you are totally right on that as well. I will make the branch name pr-patch- to make each unique to avoid bumping into issues like that via. a PR. Thank you all for your help! |
While you are at it can you add a name to the workflow :) So it will display better on GitHub. |
Yessir! You got it. |
## Description A sequel to #12478 Adds a Github action that makes it easy to cherry pick commits from a fork PR to main under fork-cherry-pick.yml. The necessity for this PR arises from Mergify / GitHub marketplace currently not having tooling for this kind of action. Changelog: - Added templating for the commit-branch that the action creates on the fork. - Added a name to the Github action. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [x] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [x] added a changelog entry to `CHANGELOG.md` - [x] included comments for [documenting Go code](https://blog.golang.org/godoc) - [x] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
Unfortunately, I believe so. Would love if you have any other suggestions
to test though, I’d gladly take any safer alternative that we hadn’t tried
before.
…On Mon, Jul 25, 2022 at 7:44 PM Aleksandr Bezobchuk < ***@***.***> wrote:
So we have to essentially merge this PR to see if it really works, correct?
—
Reply to this email directly, view it on GitHub
<#12478 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASH4FPR5GGH27JZ6TJEEQPLVV4RGLANCNFSM525XNYKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Description
Closes: #268
Adds a Github action that makes it easy to cherry pick commits from a fork PR to main under fork-cherry-pick.yml. The necessity for this PR arises from Mergify / GitHub marketplace currently not having tooling for this kind of action.
How it works:
pr-patch
branch; makes PR from pr-patch to cosmos:mainAuthor Checklist
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change