File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run Copyright and License Check
2
+ on :
3
+ pull_request_target :
4
+ types : [opened, synchronize]
5
+
6
+ jobs :
7
+ copyright-license-detector :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Checkout PR head
11
+ uses : actions/checkout@v3
12
+ with :
13
+ fetch-depth : 0 # Full history so we can diff properly
14
+ ref : ${{ github.event.pull_request.head.ref }}
15
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
16
+
17
+ - name : Add PR base repo as remote and fetch it
18
+ run : |
19
+ git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }}.git
20
+ git fetch upstream
21
+
22
+ - name : Generate final patch between base and head
23
+ run : |
24
+ git diff upstream/${{ github.event.pull_request.base.ref }} > pr.patch
25
+ head -n 100 pr.patch
26
+
27
+ - name : Run copyright/license detector
28
+ uses : qualcomm/copyright-license-checker-action@main
29
+ with :
30
+ patch_file : pr.patch
31
+ repo_name : ${{ github.repository }}
You can’t perform that action at this time.
0 commit comments