Test/comment key e2e#2
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Add a new optional input to the GitHub Action. When set,
OpenCode upserts a single comment per issue/PR thread instead of creating
a new comment on every run.
- github/action.yml: add input, wire as COMMENT_KEY env var
- github.ts: export buildCommentKeyDigest and appendCommentAnchor pure
helpers; add commentKeyDigest(), findExistingStickyComment() and
publishComment() inside the run handler; replace all createComment()
call sites with publishComment()
- test: add unit tests for buildCommentKeyDigest and appendCommentAnchor
- docs: add Sticky comments section with usage table and key explanation;
update PR Example to include comment_key
Behaviour:
- COMMENT_KEY unset/blank → create a new comment every run (no change)
- COMMENT_KEY set → search current issue/PR for a bot comment
whose body contains
<!-- opencode:comment-key:sha256:<digest> -->
and update it; create if not found
- Multiple matches → update the most recent one, log a warning
89fa88e to
ef0bc30
Compare
e85c32b to
a58b427
Compare
ae71f1a to
768244a
Compare
|
Sticky comment test - run anomalyco#11, attempt #1. |
|
Non-sticky comment test - run anomalyco#11, attempt #1. |
|
Sticky comment test - run anomalyco#12, attempt #1. |
|
Non-sticky comment test - run anomalyco#12, attempt #1. |
5321fdd to
d434fcc
Compare
|
Sticky comment test - run anomalyco#16, attempt #1. |
|
Non-sticky comment test - run anomalyco#13, attempt #1. |
d434fcc to
e6f2c6a
Compare
|
Non-sticky comment test - run anomalyco#14, attempt #1. |
e6f2c6a to
9a4abdb
Compare
|
Non-sticky comment test - run anomalyco#15, attempt #1. |
9a4abdb to
55d1855
Compare
|
Non-sticky comment test - run anomalyco#16, attempt #1. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |









Issue for this PR
Closes #
Type of change
What does this PR do?
Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.