Skip to content
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

[infra] Reintroduce the cherry pick workflow #15293

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/cherry-pick-master-to-v7.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/cherry-pick-v7-to-v6.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/create-cherry-pick-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Create cherry-pick PR
on:
pull_request_target:
branches:
- 'v*.x'
- 'master'
types: ['closed']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michelengelen Do you think we can make cherry-pick possible after the PR was merged, but didn't have the "needs cherry-pick" label?
Take this PR for example: #15255 It was merged, and then we realized we want to cherry-pick it to v7. Since it's already merged, adding the "needs cherry-pick" label is too late.

Ideally, we would have 2 triggers for cherry-pick:

  1. PR is merged and has the "needs cherry-pick" label
  2. Label is added to the PR, the PR now has the "needs cherry-pick" label, and it's already merged.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great idea. 👍
It might prove slightly tricky to use because we would probably need to ensure the proper vX.x labels are added before adding the needs cherry-pick label. 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already on my list! But good observation! 💪🏻👍🏼

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative is to have a manual workflow_dispatch, with a required PR # to cherrypick and target


permissions: {}

jobs:
create_pr:
name: Create cherry-pick PR
uses: mui/mui-public/.github/workflows/prs_create-cherry-pick-pr.yml@master
permissions:
contents: write
issues: write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks suspicious: mui/mui-public#245

Suggested change
issues: write

#15456 opened

pull-requests: write
Loading