File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : pull format
2
2
3
- on : [pull_request]
4
-
5
- permissions :
6
- contents : write
3
+ on :
4
+ pull_request_target :
5
+ types : [assigned, opened, synchronize, reopened]
7
6
8
7
jobs :
8
+ # This workflow closes invalid PR
9
+ close-pr :
10
+ name : closepr
11
+ # The type of runner that the job will run on
12
+ runs-on : ubuntu-latest
13
+ permissions : write-all
14
+
15
+ # Steps represent a sequence of tasks that will be executed as part of the job
16
+ steps :
17
+ - name : Close PR if it is not pointed to dev branch
18
+ if : github.event.pull_request.base.ref != 'dev'
19
+ uses : superbrothers/close-pull-request@v3
20
+ with :
21
+ # Optional. Post a issue comment just before closing a pull request.
22
+ comment : " Invalid PR to non-dev branch ${{ github.event.pull_request.base.ref }}."
23
+
9
24
pull_format :
10
25
runs-on : ${{ matrix.os }}
26
+ permissions :
27
+ contents : write
11
28
12
29
strategy :
13
30
matrix :
You can’t perform that action at this time.
0 commit comments