Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ All supported CLI argument inputs are [listed below](#arguments) with accompanyi
| UI | `expand-summary` | Expand the collapsible summary section.<br>Default: `false` |
| UI | `comment-pr` | Add a PR comment: `always`, `on-diff`, or `never`.<sup>4</sup><br>Default: `always` |
| UI | `comment-method` | PR comment by: `update` existing comment or `recreate` and delete previous one.<sup>5</sup><br>Default: `update` |
| UI | `comment-pos-N` | Markdown content to render at various positions in the PR comment.<br>Example: `> [!NOTE]\n> Reviewed by security.` |
| UI | `tag-actor` | Tag the workflow triggering actor: `always`, `on-diff`, or `never`.<sup>4</sup><br>Default: `always` |
| UI | `hide-args` | Hide comma-separated list of CLI arguments from the command input.<sup>6</sup><br>Default: `detailed-exitcode,parallelism,lock,out,var=` |
| UI | `show-args` | Show comma-separated list of CLI arguments in the command input.<sup>6</sup><br>Default: `workspace` |
Expand Down
42 changes: 36 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ runs:
GH_TRIGGERING_ACTOR: ${{ github.triggering_actor }}
INPUTS_COMMAND: ${{ inputs.command }}
INPUTS_COMMENT_METHOD: ${{ inputs.comment-method }}
INPUTS_COMMENT_POS_1: ${{ inputs.comment-pos-1 }}
INPUTS_COMMENT_POS_2: ${{ inputs.comment-pos-2 }}
INPUTS_COMMENT_POS_3: ${{ inputs.comment-pos-3 }}
INPUTS_COMMENT_POS_4: ${{ inputs.comment-pos-4 }}
INPUTS_COMMENT_POS_5: ${{ inputs.comment-pos-5 }}
INPUTS_COMMENT_POS_6: ${{ inputs.comment-pos-6 }}
INPUTS_COMMENT_PR: ${{ inputs.comment-pr }}
INPUTS_EXPAND_DIFF: ${{ inputs.expand-diff }}
INPUTS_EXPAND_SUMMARY: ${{ inputs.expand-summary }}
Expand Down Expand Up @@ -461,26 +467,26 @@ runs:

# Collate body content.
body=$(cat <<EOBODYTFVIAPR
<!-- placeholder-1 -->
${INPUTS_COMMENT_POS_1}
\`\`\`fish
${command}
\`\`\`
<!-- placeholder-2 -->
${INPUTS_COMMENT_POS_2}
${diff}
<!-- placeholder-3 -->
${INPUTS_COMMENT_POS_3}
<details${{ env.INPUTS_EXPAND_SUMMARY == 'true' && ' open' || '' }}><summary>${summary}</br>

<!-- placeholder-4 -->
${INPUTS_COMMENT_POS_4}
###### By ${tag_actor}${GH_TRIGGERING_ACTOR} at ${GH_EVENT_TIMESTAMP} [(view log)](${run_url}).
</summary>

\`\`\`${syntax}
${console}
\`\`\`
</details>
<!-- placeholder-5 -->
${INPUTS_COMMENT_POS_5}
<!-- $GH_IDENTIFIER_NAME -->
<!-- placeholder-6 -->
${INPUTS_COMMENT_POS_6}
EOBODYTFVIAPR
)

Expand Down Expand Up @@ -591,6 +597,30 @@ inputs:
default: "update"
description: "PR comment by: `update` existing comment or `recreate` and delete previous one (e.g., `update`)."
required: false
comment-pos-1:
default: "<!-- comment-pos-1 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `Before command`)."
required: false
comment-pos-2:
default: "<!-- comment-pos-2 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `Before diff`)."
required: false
comment-pos-3:
default: "<!-- comment-pos-3 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `Before summary`)."
required: false
comment-pos-4:
default: "<!-- comment-pos-4 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `Before footer`)."
required: false
comment-pos-5:
default: "<!-- comment-pos-5 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `Before identifier`)."
required: false
comment-pos-6:
default: "<!-- comment-pos-6 -->"
description: "Markdown content to render at various positions in the PR comment (e.g., `After identifier`)."
required: false
comment-pr:
default: "always"
description: "Add a PR comment: `always`, `on-diff`, or `never` (e.g., `always`)."
Expand Down
Loading