From e11d0a85e7e29a3f7b4f4ef78d6a43238e329092 Mon Sep 17 00:00:00 2001 From: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> Date: Sat, 4 May 2024 01:41:54 +0000 Subject: [PATCH] Add an action for an AI Pull Request helper Signed-off-by: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> --- .github/workflows/pr_agent.yaml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/pr_agent.yaml diff --git a/.github/workflows/pr_agent.yaml b/.github/workflows/pr_agent.yaml new file mode 100644 index 0000000..2dbb43f --- /dev/null +++ b/.github/workflows/pr_agent.yaml @@ -0,0 +1,37 @@ +on: + pull_request: + types: [opened, reopened, ready_for_review] + issue_comment: + types: [created] +jobs: + pr_agent_job: + if: ${{ github.event.sender.type != 'Bot' }} + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + contents: write + name: Run pr agent on every pull request, respond to user comments + steps: + - name: PR Agent action step + id: pr-agent + uses: Codium-ai/pr-agent@main + env: + OPENAI_KEY: ${{ secrets.OPENAI_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Describe - too noisy, I prefer to write the description myself. + github_action_config.auto_describe: "false" + pr_description.publish_labels: "false" + pr_description.publish_description_as_comment: "true" + # Review - remove parts that overlap with 'Improve' + github_action_config.auto_review: "true" + pr_reviewer.num_code_suggestions: "0" + pr_reviewer.require_score_review: "true" + pr_reviewer.enable_review_labels_security: "false" + pr_reviewer.enable_review_labels_effort: "false" + # Improve + github_action_config.auto_improve: "true" + pr_code_suggestions.rank_suggestions: "true" + pr_code_suggestions.commitable_code_suggestions: "true" + # Other + github_action_config.enable_output: "false"