Simplify if condition of CHANGELOG-comment-post step

This commit is contained in:
Mario Campos
2026-10-08 15:26:56 -05:00
parent 27d37d97e2
commit 9fe741e77d

View File

@@ -272,19 +272,10 @@ jobs:
# Release, backport, mergeback, and bundle-update PRs deliberately modify CHANGELOG.md,
# so skip comment management entirely for these automation flows.
if: >-
!(
startsWith(github.event.pull_request.title, 'Merge main into releases/v') &&
startsWith(github.event.pull_request.head.ref, 'update-v') &&
startsWith(github.event.pull_request.base.ref, 'releases/v') ||
startsWith(github.event.pull_request.title, 'Merge releases/v') &&
contains(github.event.pull_request.title, ' into releases/v') &&
startsWith(github.event.pull_request.head.ref, 'backport-v') &&
startsWith(github.event.pull_request.base.ref, 'releases/v') ||
startsWith(github.event.pull_request.title, 'Mergeback ') &&
startsWith(github.event.pull_request.head.ref, 'mergeback/') ||
startsWith(github.event.pull_request.title, 'Update default bundle to ') &&
startsWith(github.event.pull_request.head.ref, 'update-bundle/')
)
!startsWith(github.event.pull_request.head.ref, 'update-v') &&
!startsWith(github.event.pull_request.head.ref, 'backport-v') &&
!startsWith(github.event.pull_request.head.ref, 'mergeback/') &&
!startsWith(github.event.pull_request.head.ref, 'update-bundle/')
env:
COMMENT_MARKER: "<!-- changelog-warning-bot -->"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}