Skip to content

Commit ec6d51e

Browse files
authored
fix(ci-cd): don't run labeler on PRs from forks (#567)
instead use a cron schedule to label PRs from forks
1 parent c7a3cb7 commit ec6d51e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/labeler.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ on:
33
pull_request:
44
types: [opened, synchronize]
55
workflow_dispatch:
6+
schedule:
7+
# run every full hour (to still label PRs from forks)
8+
- cron: '0 * * * *'
69

710
jobs:
811
labeler:
912
permissions:
1013
contents: read
1114
pull-requests: write
1215
issues: write
16+
# don't run on PRs from forks (token has no write permissions)
17+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
1318
name: "Labeler"
1419
runs-on: ubuntu-latest
1520
steps:

0 commit comments

Comments
 (0)