fix workflow permissions
This commit is contained in:
parent
e257b71baa
commit
2af25bdd18
2 changed files with 13 additions and 2 deletions
7
.github/workflows/continue-review.yaml
vendored
7
.github/workflows/continue-review.yaml
vendored
|
|
@ -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 }}
|
||||
8
.github/workflows/pr_checks.yml
vendored
8
.github/workflows/pr_checks.yml
vendored
|
|
@ -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) }}
|
||||
Loading…
Add table
Reference in a new issue