step-security/Add PR Comment

Add a comment to a pull request or commit

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
messageThe message to print.no
message-pathA path or list of paths to a file to print as a message instead of a string.no
attach-pathA file path or glob pattern for files to upload as artifacts and link in the comment.no
attach-nameName for the uploaded artifact. Defaults to pr-comment-attachments.nopr-comment-attachments
attach-textMarkdown text appended for attachments. Use %ARTIFACT_URL% as a placeholder for the download link.no
message-idAn optional id to use for this message.noadd-pr-comment
refresh-message-positionIf a message with the same id, this option allow to refresh the position of the message to be the last one posted.nofalse
repo-ownerThe repo owner.no${{ github.repository_owner }}
repo-nameThe repo name.no${{ github.event.repository.name }}
repo-tokenA GitHub token for API access. Defaults to {{ github.token }}.no${{ github.token }}
allow-repeatsAllow messages to be repeated.nofalse
proxy-urlProxy URL for comment creationno
statusA job status for status headers. Defaults to {{ job.status }}.no${{ job.status }}
message-successOverride the message when a run is successful.no
message-failureOverride the message when a run fails.no
message-cancelledOverride the message when a run is cancelled.no
message-skippedOverride the message when a run is skipped.no
issueOverride the message when a run is cancelled.no
update-onlyOnly update the comment if it already exists.no
preformattedTreat message text (from a file or input) as pre-formatted and place it in a codeblock.no
template-variablesEnable template variable expansion in messages (e.g. %NOW%, %NOW:yyyy-MM-dd%).nofalse
truncateTruncation mode when the message exceeds the safe comment length. "artifact" (default) uploads the full message as a downloadable artifact and links it. "simple" truncates with a notice.noartifact
truncate-separatorCustom separator inserted before the truncation notice. Defaults to "---".no
comment-targetWhere to post the comment. Use "pr" for pull request/issue comments (default) or "commit" for commit comments.nopr
commit-shaThe commit SHA to comment on when comment-target is "commit". Defaults to the current commit.no
findA regular expression to find for replacement. Multiple lines become individual regular expressions.
replaceA replacement to use, overrides the message. Multple lines can replace same-indexed find patterns.
delete-on-statusDelete comment on specified status.
create-minimizedMinimize (collapse) the comment immediately after it is created. Applies only on creation, not updates. Not supported with proxy-url.nofalse
delete-methodWhat to do when delete-on-status matches. "delete" (default) removes the comment, "minimize" collapses it. Not supported with proxy-url.nodelete
minimize-reasonReason shown when a comment is minimized. One of: outdated (default), resolved, off-topic, duplicate, spam, abuse.nooutdated
namedescription
comment-createdWhether a comment was created.
comment-updatedWhether a comment was updated.
comment-minimizedWhether a comment was minimized.
comment-idIf a comment was created or updated, the comment id.
artifact-urlIf files were attached, the URL to download the artifact.
truncatedWhether the message was truncated.
truncated-artifact-urlIf the message was truncated in artifact mode, the URL to download the full message.