mirror of
https://github.com/github/codeql-action.git
synced 2026-11-10 14:56:01 +00:00
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:
12
.github/actions/post-comment/action.yml
vendored
12
.github/actions/post-comment/action.yml
vendored
@@ -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"
|
||||
|
||||
4
.github/workflows/pr-checks.yml
vendored
4
.github/workflows/pr-checks.yml
vendored
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user