Skip to content

feat: PR comment test summary per TestJob (Story 3.13)#10

Merged
maximn merged 4 commits into
mainfrom
feat/3-13-pr-comment-test-summary
Mar 18, 2026
Merged

feat: PR comment test summary per TestJob (Story 3.13)#10
maximn merged 4 commits into
mainfrom
feat/3-13-pr-comment-test-summary

Conversation

@maximn
Copy link
Copy Markdown
Contributor

@maximn maximn commented Mar 18, 2026

Summary

  • Add optional github-token input to post/update a PR comment with test highlights per TestJob
  • Uses HTML comment markers (<!-- tj:{name} -->) for multi-TestJob upsert — each CI job updates its own section in a single unified comment
  • Non-blocking: all errors caught and logged as core.warning(), never affects Action exit code
  • 22 new tests (13 template rendering, 6 GitHub API, 3 integration), 235 total passing

Test plan

  • Verify pnpm test passes with 235 tests, zero regressions
  • Verify pnpm build compiles cleanly with @actions/github bundled
  • Verify pnpm lint reports no errors
  • Test in a real PR workflow with github-token: ${{ github.token }} to confirm comment creation
  • Test multi-job workflow to confirm upsert merges sections correctly
  • Test without github-token to confirm no comment is posted (backward compatible)
  • Test on push-to-main event to confirm no comment is posted (AC5)

maximn added 4 commits March 18, 2026 11:50
Add optional `github-token` input to post/update a PR comment with
test highlights. Uses HTML comment markers for multi-TestJob upsert
so each job updates its own section in a single unified comment.
Non-blocking — errors are logged as warnings, never fail the Action.
When github-token input is not provided, falls back to GITHUB_TOKEN
environment variable so users get PR comments without extra config.
…EADME

Add fallback to github.context.issue.number for issue_comment events
where payload.pull_request is undefined. Update README with github-token
and test-job-name inputs, PR comment example, and corrected non-blocking
guarantee section.
@maximn maximn merged commit 770fda1 into main Mar 18, 2026
5 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.

1 participant