File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : Check for Duplicated Code
2
2
3
3
on :
4
- pull_request :
4
+ pull_request_target :
5
5
branches :
6
6
- master
7
7
40
40
- name : Run jscpd on entire codebase
41
41
run : jscpd
42
42
43
+ - name : Fetch base and target branches
44
+ run : |
45
+ git fetch origin +refs/heads/${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }}
46
+ git fetch origin +refs/pull/${{ github.event.pull_request.number }}/merge:refs/remotes/pull/${{ github.event.pull_request.number }}/merge
47
+
43
48
- name : Get the diff
44
- run : git diff origin/master...HEAD --name-only > changed_files.txt
49
+ run : git diff --name-only origin/${{ github.event.pull_request.base.ref }}...refs/remotes/pull/${{ github.event.pull_request.number }}/merge > changed_files.txt
45
50
46
51
- name : List generated files (debug)
47
52
run : ls -l
You can’t perform that action at this time.
0 commit comments