fix: permissions for PR labeler GH action workflow (#236)

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
vladislav doster 2022-04-29 02:11:14 -05:00 committed by GitHub
parent 08c705381e
commit 8a0d5678d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 20 deletions

22
.github/labeler.yml vendored
View file

@ -1,16 +1,6 @@
# Add 'zinit` label to any change in a zinit file
zinit:
- zinit*.zsh
# Add 'scripts` label to any change in scripts/ directory
scripts:
- scripts/*
# Add 'docs` label to any change in doc/ directory
docs:
- docs/*
- doc/**/*
# Add 'tests` label to any change in tests/ directory
tests:
- tests/*
ci/cd:
- .github/*
- .github/**/*
ci/cd: ['.github/**/*']
docker: ['docker/*']
docs: ['doc/**/*']
scripts: ['scripts/*']
tests: ['tests/**/*', '.zunit.yml']
zinit: ['zinit*.zsh', '_zinit']

View file

@ -1,18 +1,24 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
# This workflow will triage pull requests and apply a label based on the paths
# that are modified in the pull request.
name: Labeler
on: [pull_request]
on:
pull_request:
branches:
- main
jobs:
label-pull-requests:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true