mirror of
https://github.com/github/codeql-action.git
synced 2026-11-10 23:05:27 +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"
|
||||
|
||||
Reference in New Issue
Block a user