Skip to content

Conversation

@puzzler7
Copy link
Collaborator

Changes the comment posting so it only happens on checking PRs, not on checking merge. Additionally, adds a continue on error, so that if there are future errors, they aren't blocking.

@puzzler7 puzzler7 requested review from TylerJang27 and Copilot and removed request for Copilot May 12, 2025 21:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the comment posting behavior so that comments are only posted when checking pull requests and not during merge checks, and it adds a continue-on-error feature to prevent future errors from blocking execution.

  • Updated the if condition for the "Find Comment" and "Post comment" steps to include a check for TRUNK_CHECK_MODE being "pull_request".
  • Added the "continue-on-error: true" property to both steps.

action.yaml Outdated
- name: Find Comment
uses: peter-evans/find-comment@v3
if: inputs.check-mode == 'payload' && env.INPUT_GITHUB_TOKEN
if:
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiline if condition may not be interpreted as a single string expression by GitHub Actions. Consider using a folded scalar (e.g., using > to create a multiline string) to ensure the entire condition is processed correctly.

Suggested change
if:
if: >

Copilot uses AI. Check for mistakes.
action.yaml Outdated
- name: Post comment
uses: peter-evans/create-or-update-comment@v4
if: inputs.check-mode == 'payload' && env.INPUT_GITHUB_TOKEN
if:
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, the multiline if condition here might lead to YAML parsing issues. Use a folded scalar to combine the condition into a single string to ensure proper evaluation.

Suggested change
if:
if: >

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@TylerJang27 TylerJang27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note copilot's note

@puzzler7 puzzler7 force-pushed the maverick/dont-comment-on-merge branch from 777f4e6 to 936431b Compare May 12, 2025 22:20
@puzzler7 puzzler7 enabled auto-merge (squash) May 12, 2025 22:20
@puzzler7 puzzler7 merged commit 06c428b into main May 12, 2025
24 of 40 checks passed
@puzzler7 puzzler7 deleted the maverick/dont-comment-on-merge branch May 12, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants