Skip to content

Commit

Permalink
chore: add ci permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
toddbaert committed Jul 12, 2023
1 parent 95fcb98 commit 0fab3f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
# pull_request_target is needed instead of just pull_request
# because repository write permission is needed to assign reviewers
pull_request_target:

permissions:
contents: read # to read changed files
issues: write # to read/write issue assignees
pull-requests: write # to read/write PR reviewers

jobs:
run_self:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ on:
# the github token will not have sufficient permission to update the PR.
pull_request_target:

permissions:
contents: read # to read changed files
issues: write # to read/write issue assignees
pull-requests: write # to read/write PR reviewers

jobs:
run_self:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ async function main() {

const { base, head } = getRefs();

core.debug(`Base commit: ${base}`)
core.debug(`Head commit: ${head}`)
core.debug(`Base commit: ${base}`);
core.debug(`Head commit: ${head}`);

const configFile = await loadYaml(client, head, ownerFilePath);
const config = validateConfig(configFile);
Expand Down

0 comments on commit 0fab3f7

Please sign in to comment.