Skip to content

Post one plain-words PR comment with Bite's result - #34

Merged
connabyss merged 2 commits into
mainfrom
claude/project-thread-siupu2
Oct 30, 2026
Merged

connabyss merged 2 commits into
mainfrom
claude/project-thread-siupu2

Conversation

@connabyss

Copy link
Copy Markdown
Owner

Requested by CH · project thread

Follow-up to #33. The Bite Action now leaves one comment on the pull request that a non-coder can read, and edits that same comment on later pushes instead of adding new ones.

The comment

  • Starts with one verdict line: "⚠️ Bite: 1 change worth a look", "✅ Bite: your tests really check the changes in this pull request", or "➖ Bite: nothing here it could check".
  • Then what to do, in one line, and the flagged commits.
  • Every commit and how Bite checked sit in a collapsed section.
  • A change no test checks is worded as "worth a look", not as a mistake, because tidy-ups, renames and docs are fine without a test.
  • Commit subjects are escaped, so a subject can't add HTML to the comment.

How

  • recent.py: each run writes bite_proof/COMMENT.md (new write_comment).
  • action.yml: posts it with gh api, finding its old comment by a hidden <!-- bite-check --> marker. If the token can't comment (for example on pull requests from forks), it prints a warning and the check still passes or fails as before. New inputs: comment (default true) and github-token.
  • The workflow and the README now ask for pull-requests: write.

Checked locally

  • python -m pytest: 63/63 selftest checks pass, including a new one for the comment's verdict, what-to-do line, collapsed section and escaping.
  • The action step run twice with a stand-in gh: the first run creates the comment and the second edits comment 123 instead of adding one.
  • This PR changes recent.py, so the bite check on it is a live run of the comment.

AI helped write this (Claude Code); the commit carries an Assisted-by: line.


Generated by Claude Code

Each run now writes bite_proof/COMMENT.md: a one-line verdict ("1 change
worth a look" or "your tests really check the changes"), what to do, and
each commit in a collapsed list. A change no test checks is worded as
worth a look, not as a mistake, since tidy-ups and docs are fine
without a test. Commit subjects are escaped.

The Action posts it on the pull request and edits the same comment on
later pushes (found by its <!-- bite-check --> marker). If the token
can't comment, as on pull requests from forks, it warns and the check
still passes or fails as before. New inputs: comment (default true) and
github-token. The workflow and README ask for pull-requests: write.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iCvMrHYVQGhoif8oRX
@connabyss connabyss self-assigned this Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Bite: your tests really check the changes in this pull request

Taking each change back out makes a test fail, so the tests would notice if it broke.

Every commit, and how Bite checked
  • e01a8163 Post one plain-words pull request comment with Bite's result: ✅ A test fails without this change, so the tests really check it.

Bite takes each commit's code change back out and runs your tests. A test that really checks a change fails when the change is gone. The steps to rerun each check yourself are on the job's summary page. What is Bite?

Only <, > and & need escaping in the comment; escaping quotes too showed
Bite's as Bite&#x27;s in the raw comment text.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iCvMrHYVQGhoif8oRX
@connabyss
connabyss merged commit 2c90666 into main Oct 30, 2026
7 checks passed
@connabyss
connabyss deleted the claude/project-thread-siupu2 branch October 30, 2026 04:40
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