Skip to content

YETUS-1280. Support updating the GitHub PR comment in place - #405

Open
pan3793 wants to merge 1 commit into
apache:mainfrom
pan3793:github-update-comment
Open

pan3793 wants to merge 1 commit into
apache:mainfrom
pan3793:github-update-comment

Conversation

@pan3793

@pan3793 pan3793 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

https://issues.apache.org/jira/browse/YETUS-1280

--github-write-comment adds a new PR comment on every run. --github-update-comment[=<key>] implies it and updates the comment the token's user previously wrote with the same key instead.

  1. Marks the report with <!-- yetus-report:<key> --> and adds a Tested commit row.
  2. Finds the comment by marker and author (GET /user, or github-actions[bot] under GitHub Actions), skipping hidden ones, and PATCHes it. Lookup or PATCH failures fall back to POST.
  3. Skips the comment when the PR head moved past the tested commit, so a late build of an older commit cannot replace a newer report.

Tested with the new github_update_comment.bats.

Assisted-by: Claude Opus 5.5

--github-update-comment[=<key>] implies --github-write-comment, and
updates the comment the token's user previously wrote with the same key
instead of adding a new one on every run. The report is skipped when
the PR head moved past the tested commit.

Assisted-by: Claude Opus 5.5
@pan3793

pan3793 commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

Tested end to end against real GitHub on pan3793/yetus-comment-test#1, running test-patch --robot --build-tool=nobuild --plugins=github,blanks GH:1 from this branch:

  1. First run with --github-update-comment=test posts one comment with the marker and a Tested commit row.
  2. Running again edits that comment in place.
  3. After a new push, the next run edits the same comment, and Tested commit shows the new sha.
  4. A different key (other) gets its own comment and updates only that one.
  5. Once the comment is hidden as outdated, the next run leaves it alone and posts a new one, which later runs then update.
  6. --github-write-comment alone still posts a new comment each run, with no marker or Tested commit row.

The marker does not show in the rendered comment. The stale-build skip is covered by github_update_comment.bats only.

@pan3793

pan3793 commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

cc @aw-was-here @ndimiduk, could you please take a look? The current Yetus report (post a new comment for each report) keeps spamming the PR and makes it too hard for reviewers to find the real review comment ...

@ndimiduk

ndimiduk commented Nov 6, 2026

Copy link
Copy Markdown
Member

ACK. I'll make time to take a look in the next couple days, if Allen doesn't beat me to it.

@pan3793

pan3793 commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

friendly ping @ndimiduk ~

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.

2 participants