Skip to content

Action: one sticky PR comment with the result #44

Closed

Description

@tmashara

What
The GitHub Action writes its result only to the job summary. Add an opt-in input (comment: true) that posts one PR comment and edits it in place on every later run.

Why
Reviewers live in the PR conversation and rarely open job summaries. One comment that updates (instead of one per push) shows the current state without noise.

How
In action.yml, after the summary step: when comment is set and the event is pull_request, find our earlier comment by a hidden marker <!-- renderdiff --> via gh api, then PATCH it, or POST if there's none. Body: the verdict line, the differing routes and widths, and a link to the run and its artifact. Needs pull-requests: write; document that in docs/github-action.md, including the fork-PR case where the token is read-only (fall back to the summary and say so).

Prior art

  • testivai-oss (action/src/index.ts:160-190, action/src/comment.ts): it lists comments, finds its own by a hidden marker and updates it, or creates one. The marker is namespaced per status context, so two renderdiff jobs in one workflow (say marketing and docs) each keep their own comment; use <!-- renderdiff:<job or input name> -->. A second marker, <!-- testivai-run:KEY -->, lets a later step check the comment still belongs to the same run before it edits it.

Activity

  1. added
    enhancement
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions