forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (23 loc) · 1.16 KB
/
cherry-picks-warn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: cherry-picks-warn
on:
pull_request_target:
types:
- opened
branches:
- branch-[0-9]+.[0-9]+
jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
pull-requests: write # to post a comment on the PR
steps:
- uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '### 🚨 Important Reminder:\nAre you cherry-picking commits to a release branch? If so, please ensure you use the `Rebase and merge` option when merging this pull request. Do not use the `Squash and merge` option, as it makes reverting individual commits impossible. If the `Rebase and merge` option is disabled (it usually is), follow [Configuring commit rebasing for pull requests](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests) to temporarily enable it, and disable it once the PR is merged.'
});