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 1
1
name : Expo Preview
2
2
on : [pull_request]
3
3
4
+ permissions :
5
+ contents : read
6
+ pull-requests : write
7
+
4
8
jobs :
5
9
publish :
6
10
name : Install and publish
Original file line number Diff line number Diff line change 4
4
schedule :
5
5
- cron : ' 30 1 * * *'
6
6
7
+ permissions :
8
+ contents : read
9
+ issues : write
10
+ pull-requests : write
11
+
7
12
jobs :
8
13
stale :
9
14
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 3
3
issues :
4
4
types : [labeled]
5
5
6
+ permissions :
7
+ contents : read
8
+ issues : write
9
+
6
10
jobs :
7
11
needs-more-info :
8
12
runs-on : ubuntu-latest
13
17
with :
14
18
github-token : ${{ secrets.GITHUB_TOKEN }}
15
19
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
+
16
32
github.rest.issues.createComment({
17
33
issue_number: context.issue.number,
18
34
owner: context.repo.owner,
29
45
with :
30
46
github-token : ${{ secrets.GITHUB_TOKEN }}
31
47
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
+
32
60
github.rest.issues.createComment({
33
61
issue_number: context.issue.number,
34
62
owner: context.repo.owner,
Original file line number Diff line number Diff line change 3
3
issues :
4
4
types : [opened, edited]
5
5
6
+ permissions :
7
+ contents : read
8
+ issues : write
9
+
6
10
jobs :
7
11
check-versions :
8
12
if : ${{ github.event.label.name == 'bug' }}
You can’t perform that action at this time.
0 commit comments