-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 1.51 KB
/
cherry-picks-warn.yml
File metadata and controls
40 lines (33 loc) · 1.51 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: cherry-picks-warn
on:
pull_request_target:
types:
- opened
branches:
- branch-[0-9]+.[0-9]+
defaults:
run:
shell: bash
jobs:
notify:
runs-on: ubuntu-slim
timeout-minutes: 5
permissions:
pull-requests: write # to post a comment on the PR
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
gh pr comment "$PR" --repo "$REPO" --body '# ⚠️ Important: Cherry-Pick Merge Instructions
**If you are cherry-picking commits to a release branch, "Rebase and merge" must be used when merging this PR, NOT "Squash and merge".**
### Why "Squash and merge" causes problems:
- It makes reverting individual commits impossible
- It removes the association between original and cherry-picked commits
- It makes it difficult to track which commits have been cherry-picked
- It causes incorrect results in:
- [`update-release-labels.yml`](.github/workflows/update-release-labels.yml)
- [`update_changelog.py`](dev/update_changelog.py)
- [`check_patch_prs.py`](dev/check_patch_prs.py)
If "Rebase and merge" is disabled, 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 enable it.'