Skip to content

Display the Plugin Check report in the PR as a comment.#456

Merged
swissspidy merged 6 commits intoWordPress:mainfrom
Utsav-Ladani:feature/pr-comment
Dec 7, 2025
Merged

Display the Plugin Check report in the PR as a comment.#456
swissspidy merged 6 commits intoWordPress:mainfrom
Utsav-Ladani:feature/pr-comment

Conversation

@Utsav-Ladani
Copy link
Copy Markdown
Contributor

@Utsav-Ladani Utsav-Ladani commented Nov 25, 2025

Summary

Display the Plugin Check report in the PR as a comment.

This PR:

  • Group PR comment related logs
  • Create new PR comment only if there's not existing comment. Otherwise update existing one.
  • Comment will be added in all cases to inform user about result w/o looking at logs.

Related issue: #1

Screenshots

Sample report when check passed

Sample report when check passed

Sample report when check failed

Sample report when check failed

@Utsav-Ladani Utsav-Ladani mentioned this pull request Nov 25, 2025
@swissspidy swissspidy linked an issue Nov 25, 2025 that may be closed by this pull request
@Utsav-Ladani
Copy link
Copy Markdown
Contributor Author

Thanks @swissspidy for the review. I made changes accordingly.

Copy link
Copy Markdown

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 adds functionality to display WordPress Plugin Check reports as PR comments, providing immediate visibility into code quality issues without requiring developers to check action logs.

Key Changes:

  • Creates a new comment management system to post, update, and delete PR comments
  • Implements a markdown formatter for presenting check results in a user-friendly format
  • Integrates PR commenting into the main workflow with appropriate error handling

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/pr-comment-manager.ts Implements PR comment CRUD operations with duplicate handling
src/pr-comment-formatter.ts Formats check results into markdown with collapsible sections
src/main.ts Integrates PR commenting with existing check result processing
package.json Adds @actions/github dependency for GitHub API access
package-lock.json Lockfile updates for new dependencies
dist/ Compiled distribution files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

- Group PR comment related logs
- Remove permission config from test action
- Update existing comment instead of deleting all and then create new one always
@Utsav-Ladani
Copy link
Copy Markdown
Contributor Author

@swissspidy The above review is false positive, we don't need that change. Also, I rebased my branch from the main branch and forced push for clean commit history.

Copy link
Copy Markdown
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

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

Thank you!

I'll merge this and test it in this repo in a follow-up PR.

@swissspidy swissspidy merged commit 4b8f40e into WordPress:main Dec 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PR comment

3 participants