File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 25
25
- name : Run automated tests
26
26
run : ./gradlew test -i
27
27
- name : Run Code Style Check
28
- run : ./gradlew checkstyleChanged -i
28
+ run : ./gradlew checkstyleCI -i
29
29
- name : Run PMD Quality Check
30
30
run : ./gradlew pmdMain -i
31
31
- name : Run Spotbugs Quality Check
48
48
- name : Run automated tests
49
49
run : ./gradlew test -i
50
50
- name : Run Code Style Check
51
- run : ./gradlew checkstyleChanged -i
51
+ run : ./gradlew checkstyleCI -i
52
52
- name : Run PMD Quality Check
53
53
run : ./gradlew pmdMain -i
54
54
- name : Run Spotbugs Quality Check
71
71
- name : Run automated tests
72
72
run : ./gradlew test -i
73
73
- name : Run Code Style Check
74
- run : ./gradlew checkstyleChanged -i
74
+ run : ./gradlew checkstyleCI -i
75
75
- name : Run PMD Quality Check
76
76
run : ./gradlew pmdMain -i
77
77
- name : Run Spotbugs Quality Check
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ task checkstyle(type: Checkstyle) {
52
52
}
53
53
54
54
// Execute Checkstyle on all modified files
55
- task checkstyleChanged (type : Checkstyle ) {
55
+ task checkstyleCI (type : Checkstyle ) {
56
56
def changedFiles = getChangedFiles()
57
57
include changedFiles
58
58
}
@@ -65,17 +65,17 @@ task checkstyleChanged(type: Checkstyle) {
65
65
*/
66
66
def getChangedFiles () {
67
67
// Get the target and source branch
68
- def ghprbTargetBranch = System . getenv(" ghprbTargetBranch " )
69
- def ghprbSourceBranch = System . getenv(" ghprbSourceBranch" )
68
+ def envTargetBranch = System . getenv(" github.event.pull_request.head.ref " )
69
+ def envSourceBranch = System . getenv(" ghprbSourceBranch" )
70
70
71
71
// Compare to master if no branch specified
72
72
def targetBranch
73
73
if (project. hasProperty(" branch" )) {
74
74
targetBranch = project. property(" branch" )
75
75
} else {
76
- targetBranch = ghprbTargetBranch ? " origin/${ ghprbTargetBranch } " : getParentBranch()
76
+ targetBranch = envTargetBranch ? " origin/${ envTargetBranch } " : getParentBranch()
77
77
}
78
- def sourceBranch = ghprbSourceBranch ? " origin/${ ghprbSourceBranch } " : " "
78
+ def sourceBranch = envSourceBranch ? " origin/${ envSourceBranch } " : " "
79
79
80
80
// Get list of all changed files including status
81
81
def systemOutStream = new ByteArrayOutputStream ()
You can’t perform that action at this time.
0 commit comments