Issue Reviewer
This guide shows how to automate reviewing issues with a GenAIScript that provides feedback and code analysis in GitHub Actions.
Resolving the issue
The script starts by getting the current issue information from the GitHub API.
The github.getIssue
assumes that GenAIScript is running in a GitHub Action,
it will have access to the github token (GITHUB_TOKEN
) and the GITHUB_ISSUE
issue id.
The GITHUB_ISSUE
needs to be configured in the GitHub Action from the github.event.issue
object.
The task
The prompt sets the task and how to perform the review in a system message.
The context
Then it adds the issue title and body to the prompt.
Automation in Github Actions
Add this step to your Github Actions workflow to automate the issue review process.
The -prc
flag stands for —pull-request-comment
and takes care of upserting a comment in the pull request/issue conversation.