File tree Expand file tree Collapse file tree 5 files changed +41
-82
lines changed Expand file tree Collapse file tree 5 files changed +41
-82
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11name : Expo Preview
22on : [pull_request]
33
4+ permissions :
5+ contents : read
6+ pull-requests : write
7+
48jobs :
59 publish :
610 name : Install and publish
Original file line number Diff line number Diff line change 44 schedule :
55 - cron : ' 30 1 * * *'
66
7+ permissions :
8+ contents : read
9+ issues : write
10+ pull-requests : write
11+
712jobs :
813 stale :
914 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 33 issues :
44 types : [labeled]
55
6+ permissions :
7+ contents : read
8+ issues : write
9+
610jobs :
711 needs-more-info :
812 runs-on : ubuntu-latest
1317 with :
1418 github-token : ${{ secrets.GITHUB_TOKEN }}
1519 script : |
20+ const actor = context.actor;
21+ const { data: collaborators } = await github.rest.repos.listCollaborators({
22+ owner: context.repo.owner,
23+ repo: context.repo.repo,
24+ });
25+
26+ const isCollaborator = collaborators.some(collaborator => collaborator.login === actor);
27+ if (!isCollaborator) {
28+ console.log(`Actor ${actor} is not a collaborator, skipping workflow`);
29+ return;
30+ }
31+
1632 github.rest.issues.createComment({
1733 issue_number: context.issue.number,
1834 owner: context.repo.owner,
2945 with :
3046 github-token : ${{ secrets.GITHUB_TOKEN }}
3147 script : |
48+ const actor = context.actor;
49+ const { data: collaborators } = await github.rest.repos.listCollaborators({
50+ owner: context.repo.owner,
51+ repo: context.repo.repo,
52+ });
53+
54+ const isCollaborator = collaborators.some(collaborator => collaborator.login === actor);
55+ if (!isCollaborator) {
56+ console.log(`Actor ${actor} is not a collaborator, skipping workflow`);
57+ return;
58+ }
59+
3260 github.rest.issues.createComment({
3361 issue_number: context.issue.number,
3462 owner: context.repo.owner,
Original file line number Diff line number Diff line change 33 issues :
44 types : [opened, edited]
55
6+ permissions :
7+ contents : read
8+ issues : write
9+
610jobs :
711 check-versions :
812 if : ${{ github.event.label.name == 'bug' }}
You can’t perform that action at this time.
0 commit comments