Replace --create-if-missing to --update-only

`--update-only` is disabled by default, whereas `--create-if-missing` should've been enabled by default but was not.
This commit is contained in:
Mario Campos
2026-10-30 10:41:05 -05:00
parent 9de5eacd23
commit d71593936c
4 changed files with 24 additions and 27 deletions

View File

@@ -9,12 +9,10 @@ inputs:
body:
description: "Full comment markdown."
required: true
create-if-missing:
description: >
Create a comment if no matching marker exists.
Set to 'false' to update existing comments only.
update-only:
description: Do nothing if no comment with the specified marker exists.
required: false
default: "true"
default: "false"
issue-id:
description: >
The issue or pull request number to post/update the comment on.
@@ -31,13 +29,13 @@ runs:
env:
BODY: ${{ inputs.body }}
MARKER: ${{ inputs.marker }}
CREATE_IF_MISSING: ${{ (inputs.create-if-missing == 'true' && '--create-if-missing') || '' }}
UPDATE_ONLY: ${{ (inputs.update-only == 'true' && '--update-only') || '' }}
GH_TOKEN: ${{ inputs.token }}
ISSUE_ID: ${{ inputs.issue-id || github.event.pull_request.number }}
run: |
npx tsx ./pr-checks/post-comment.ts \
--body "$BODY" \
--marker "$MARKER" \
$CREATE_IF_MISSING \
$UPDATE_ONLY \
--issue-id "$ISSUE_ID" \
--repository "$GITHUB_REPOSITORY"

View File

@@ -307,7 +307,7 @@ jobs:
- name: Mark the CHANGELOG.md concern as resolved
if: >-
needs.other-checks.outputs.changelog-modified != 'true' &&
needs.other-checks.outputs.changelog-modified == 'false' &&
!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/') &&
@@ -315,7 +315,7 @@ jobs:
uses: ./.github/actions/post-comment
with:
marker: "post-comment:CHANGELOG.md"
create-if-missing: "false"
update-only: true
body: |
⚠️ `CHANGELOG.md` has been modified in this PR. Please do not modify `CHANGELOG.md` directly.
Instead, create a change-note file in `unreleased-change-notes/`. The `CHANGELOG.md`