From 2af25bdd187df18d185d0d6ed169c2ed6a6e2e28 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 20 Jul 2025 22:27:15 -0700 Subject: [PATCH] fix workflow permissions --- .github/workflows/continue-review.yaml | 7 +++++++ .github/workflows/pr_checks.yml | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continue-review.yaml b/.github/workflows/continue-review.yaml index 9cee70fb0..0eefee8be 100644 --- a/.github/workflows/continue-review.yaml +++ b/.github/workflows/continue-review.yaml @@ -27,6 +27,11 @@ on: required: false type: string +permissions: + contents: read + pull-requests: write + issues: write + jobs: code-review: name: AI Code Review @@ -191,11 +196,13 @@ jobs: repo: context.repo.repo, body: comment }); + console.log(`Successfully posted comment on PR #${prNumber}`); } else { console.log('Could not determine PR number for commenting'); } } catch (error) { console.log('Failed to post comment:', error.message); + console.log('Error details:', error); } env: GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index aa3568833..9c41b13f4 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -6,6 +6,11 @@ on: push: branches: [main] +permissions: + contents: read + pull-requests: write + issues: write + jobs: test: strategy: @@ -59,10 +64,9 @@ jobs: runs-on: ubuntu-latest needs: - test - - continue-review steps: - name: Decide whether the needed jobs succeeded or failed uses: re-actors/alls-green@release/v1 with: - jobs: ${{ toJSON(needs) }} + jobs: ${{ toJSON(needs) }} \ No newline at end of file