mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
.github: Don't add cherry-pick reminder if it's already present
This commit is contained in:
17
.github/workflows/PROpenedOrUpdated.yml
vendored
17
.github/workflows/PROpenedOrUpdated.yml
vendored
@@ -26,18 +26,13 @@ jobs:
|
|||||||
if: github.event.action == 'opened'
|
if: github.event.action == 'opened'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
CHERRY_PICK_REMINDER: ${{vars.CHERRY_PICK_REMINDER}}
|
||||||
run: |
|
run: |
|
||||||
cat <<-EOF | gh pr comment --repo ${{github.repository}} ${{env.PR_NUMBER}} -F -
|
# If there's already a reminder comment, don't add another one.
|
||||||
REMINDER: If this PR applies to other branches, please add a
|
gh pr view --json comments \
|
||||||
comment with the appropriate "cherry-pick-to" headers as per
|
--jq ".comments[].body | select(. | startswith(\"${CHERRY_PICK_REMINDER:0:20}\")) | halt_error(1)" \
|
||||||
the [Create a Pull Request](https://wiki.asterisk.org/wiki/display/AST/Code+Contribution#CodeContribution-CreateaPullRequest) process.
|
${{env.PR_NUMBER}} >/dev/null 2>&1 || exit 0
|
||||||
If you don't want it cherry-picked, please add a comment stating
|
gh pr comment --repo ${{github.repository}} -b "${CHERRY_PICK_REMINDER}" ${{env.PR_NUMBER}}
|
||||||
"No cherry-picks required" so we don't keep asking.
|
|
||||||
|
|
||||||
If, after adding "cherry-pick-to" comments, you change your mind,
|
|
||||||
please edit the comment to DELETE the header lines and add
|
|
||||||
"No cherry-picks required".
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Set Labels
|
- name: Set Labels
|
||||||
env:
|
env:
|
||||||
|
Reference in New Issue
Block a user