Modified the GitHub action for the new code review task - #202
Open
Pavel Elizarov (pavelthei) wants to merge 2 commits into
Open
Modified the GitHub action for the new code review task#202Pavel Elizarov (pavelthei) wants to merge 2 commits into
Pavel Elizarov (pavelthei) wants to merge 2 commits into
Conversation
Pavel Elizarov (pavelthei)
deployed
to
junie-review
August 11, 2026 12:14 — with
GitHub Actions
Active
Contributor
|
Address the validation and configuration concerns before merging to ensure the code review task is correctly triggered and the agent receives necessary instructions. Comments
Help us improve Junie code review (EAP): Share feedback |
Comment on lines
84
to
93
| const prNumber = context.entityNumber; | ||
| if (!prNumber) { | ||
| throw new Error("Code review requires a Pull Request number, but none was found in the event context."); | ||
| } | ||
| junieCLITask.codeReviewTask = { | ||
| description: promptText, | ||
| diffCommand | ||
| diffCommand, | ||
| fetchVcsInfo: true, | ||
| reviewTarget: remoteRequestReviewTarget(prNumber), | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| const prNumber = context.entityNumber; | |
| if (!prNumber) { | |
| throw new Error("Code review requires a Pull Request number, but none was found in the event context."); | |
| } | |
| junieCLITask.codeReviewTask = { | |
| description: promptText, | |
| diffCommand | |
| diffCommand, | |
| fetchVcsInfo: true, | |
| reviewTarget: remoteRequestReviewTarget(prNumber), | |
| } | |
| const prNumber = context.isPR ? context.entityNumber : undefined; | |
| if (!prNumber) { | |
| throw new Error("Code review requires a Pull Request number, but none was found in the event context."); | |
| } | |
| junieCLITask.codeReviewTask = { | |
| description: promptText, | |
| diffCommand, | |
| fetchVcsInfo: true, | |
| reviewTarget: remoteRequestReviewTarget(prNumber), | |
| } |
Use context.isPR to ensure prNumber is only retrieved for Pull Requests. entityNumber can also refer to issue numbers, which should not trigger a code review task.
Comment on lines
10
to
12
| export const MCP_TOOL_PROMPTS = { | ||
| mcp_github_checks_server: 'Use get_pr_failed_checks_info to retrieve detailed information about failed CI/CD checks if needed.', | ||
| mcp_github_inline_comment_server: 'MANDATORY for code reviews: Use post_inline_review_comment to provide inline code review comments. IMPORTANT: If you are responding to a question in an existing review thread (user tagged you in <user_instruction> in review thread), DO NOT use this tool - your summary will be automatically posted as a reply in that thread.', | ||
| youtrack: 'IMPORTANT: Do not post any comments - your summary will be automatically posted by system. And DO NOT update issue status if user did not request it. ALSO: do not look for other issues or any other external information unless explicitly requested by the user.', |
Contributor
There was a problem hiding this comment.
The removal of mcp_github_inline_comment_server prompt removes the mandatory instruction for code reviews. Verify if this is intended or if the instruction has been moved to another part of the task preparation.
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.