Repository navigation
Add PR comment, reaction and user permission commands (superseded by #16) - #15
Closed
Andrey Hura (andrey-hura) wants to merge 1 commit into
Closed
Andrey Hura (andrey-hura) wants to merge 1 commit into
Andrey Hura (andrey-hura) wants to merge 1 commit into
Conversation
Add three commands so a pipeline triggered by a pull request comment can talk back to the PR: - upsertPrComment: create a PR comment, or with COMMENT_MARKER update the latest comment the token owner posted with the same hidden marker. The body can come from COMMENT_BODY or COMMENT_BODY_FILE. - addReaction: add an emoji reaction to a PR/issue comment. - getUserPermission: report a user's repository permission and whether it includes write access (unknown users are reported as none). Add unit tests against a local fake GitHub API, a CI workflow that runs gofmt, go vet and go test, and document every command in the README, including the previously undocumented AddPullRequestLabels, waitForStatus and getRef.
Andrey Hura (andrey-hura)
deleted the
andrey-hura/SUB-1084/pr-comment-commands
branch
November 2, 2026 14:51
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d1f2852. Configure here.
| func resolveCommentBody(body string, bodyFile string) string { | ||
| if bodyFile == "" { | ||
| return body | ||
| } |
There was a problem hiding this comment.
Null settings treated as real values
Medium Severity
Unset Harness plugin settings can arrive as the string null, which createPullRequest already treats as empty for PR_LABELS. resolveCommentBody only treats an empty COMMENT_BODY_FILE as omitted, so a step that only sets COMMENT_BODY can try to read a file named null and fail. The same value for COMMENT_MARKER is treated as a real marker.
Suggested change
| } | |
| if bodyFile == "" || bodyFile == "null" { | |
| return body | |
| } |
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d1f2852. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.