-
Notifications
You must be signed in to change notification settings - Fork 2
feat(review): let a repository analyze without commenting #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,10 @@ inputs: | |
| description: 'Run a full sync analysis instead of reusing the committed baseline.' | ||
| required: false | ||
| default: 'false' | ||
| post_comment: | ||
| description: 'Post the review to the pull request. false still analyzes and uploads the artifact.' | ||
| required: false | ||
| default: 'true' | ||
| outputs: | ||
| diagram_md: | ||
| description: 'Path to the rendered Mermaid review diagram.' | ||
|
|
@@ -102,6 +106,7 @@ runs: | |
| HEAD_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }} | ||
| TARGET_BRANCH_INPUT: ${{ inputs.target_branch }} | ||
| SYNC_STRATEGY: ${{ inputs.sync_strategy }} | ||
| POST_COMMENT_INPUT: ${{ inputs.post_comment }} | ||
| COMMENT_BODY: ${{ github.event.comment.body }} | ||
| AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }} | ||
| ISSUE_PR_URL: ${{ github.event.issue.pull_request.url }} | ||
|
|
@@ -127,7 +132,7 @@ runs: | |
| run: GH_HOST="${GITHUB_SERVER_URL#*://}" gh api -X POST "repos/${REPOSITORY}/issues/comments/${COMMENT_ID}/reactions" -f content=eyes >/dev/null | ||
|
|
||
| - name: Post review progress | ||
| if: steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' | ||
| if: steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' && steps.guard.outputs.post_comment != 'false' | ||
| continue-on-error: true | ||
| uses: marocchino/sticky-pull-request-comment@v2 | ||
| with: | ||
|
|
@@ -402,7 +407,7 @@ runs: | |
|
|
||
| - name: Post review comment | ||
| id: review_comment | ||
| if: steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' | ||
| if: steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' && steps.guard.outputs.post_comment != 'false' | ||
| uses: marocchino/sticky-pull-request-comment@v2 | ||
| with: | ||
| header: ${{ steps.guard.outputs.comment_id }} | ||
|
|
@@ -411,7 +416,7 @@ runs: | |
| path: ${{ steps.review_body.outputs.path }} | ||
|
|
||
| - name: Post review failure | ||
| if: failure() && steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' && steps.review_comment.outcome != 'success' | ||
| if: failure() && steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' && steps.guard.outputs.post_comment != 'false' && steps.review_comment.outcome != 'success' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| continue-on-error: true | ||
| uses: marocchino/sticky-pull-request-comment@v2 | ||
| with: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The surrounding setup and all other v2 examples use
@v2, but this new example selects@v1; because the old major does not receive the breaking v2 action, it does not recognizepost_commentand retains its normal commenting behavior. A user copying this exact silence recipe therefore gets an unexpected PR comment, so the example should use@v2.AGENTS.md reference: AGENTS.md:L55-L58
Useful? React with 👍 / 👎.