From 7b6f09621ebd6aa6c8928111ec31feea837f8ba1 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Wed, 25 Jun 2025 13:38:29 -0400 Subject: [PATCH 1/3] Feat(pull): Add pullhero for first pass PR reviews --- .github/workflows/pullhero.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/pullhero.yaml diff --git a/.github/workflows/pullhero.yaml b/.github/workflows/pullhero.yaml new file mode 100644 index 0000000..ebfb4a8 --- /dev/null +++ b/.github/workflows/pullhero.yaml @@ -0,0 +1,27 @@ +on: + pull_request: + types: [opened, review_requested] + +jobs: + pullhero: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install pullhero + run: pip3 install pullhero + + - name: Push code review + run: > + pullhero --vcs-provider github + --vcs-token ${{ GITHUB_TOKEN }} + --vcs-change-id ${{ github.event.pull_request.number }} + --vcs-repository ${{ github.repository }} + --agent review + --agent-action comment + --vcs-base-branch ${{ github.event.pull_request.base.ref }} + --vcs-head-branch ${{ github.event.pull_request.head.ref }} + --llm-api-key ${{ secrets.PULLHERO_API_KEY }} + --llm-api-host ${{ secrets.PULLHERO_API_HOST }} + --llm-api-model ${{ secrets.PULLHERO_API_MODEL }} From 61d4016dd7ed87d2102d056e71fd8af6527903ec Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Wed, 25 Jun 2025 13:40:40 -0400 Subject: [PATCH 2/3] Fix(pull): Add secrets to enable the github token to work --- .github/workflows/pullhero.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pullhero.yaml b/.github/workflows/pullhero.yaml index ebfb4a8..0cd282b 100644 --- a/.github/workflows/pullhero.yaml +++ b/.github/workflows/pullhero.yaml @@ -15,7 +15,7 @@ jobs: - name: Push code review run: > pullhero --vcs-provider github - --vcs-token ${{ GITHUB_TOKEN }} + --vcs-token ${{ secrets.GITHUB_TOKEN }} --vcs-change-id ${{ github.event.pull_request.number }} --vcs-repository ${{ github.repository }} --agent review From 35a4dc910ca6cf497d4399c58b3bf0bf8ba6e212 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Wed, 25 Jun 2025 13:42:44 -0400 Subject: [PATCH 3/3] Fix(pull): Add required argument --- .github/workflows/pullhero.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pullhero.yaml b/.github/workflows/pullhero.yaml index 0cd282b..5da1be0 100644 --- a/.github/workflows/pullhero.yaml +++ b/.github/workflows/pullhero.yaml @@ -1,6 +1,6 @@ on: pull_request: - types: [opened, review_requested] + types: [opened, review_requested, edited] jobs: pullhero: @@ -18,6 +18,7 @@ jobs: --vcs-token ${{ secrets.GITHUB_TOKEN }} --vcs-change-id ${{ github.event.pull_request.number }} --vcs-repository ${{ github.repository }} + --vcs-change-type pr --agent review --agent-action comment --vcs-base-branch ${{ github.event.pull_request.base.ref }}