File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
src/main/java/jenkins/plugins/gerrit/workflow Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ multi-branch pipeline job execution.
44
44
Parameters:
45
45
46
46
- ``` label ```
47
- The review label to add to the Gerrit change.
47
+ If non-null, the review label to add to the Gerrit change.
48
48
Default: 'Verified'.
49
49
50
50
- ``` score ```
Original file line number Diff line number Diff line change @@ -71,13 +71,16 @@ protected Void run() throws Exception {
71
71
72
72
String credentialsId = envVars .get ("GERRIT_CREDENTIALS_ID" );
73
73
String gerritApiUrl = envVars .get ("GERRIT_API_URL" );
74
- String notify = score < 0 ? ", \" notify\" : \" OWNER\" " : "" ;
75
- String jsonPayload =
76
- "{\" labels\" :{\" "
74
+ String labels = label == null ? "" :
75
+ "\" labels\" :{\" "
77
76
+ label
78
77
+ "\" :"
79
78
+ score
80
- + "},"
79
+ + "}," ;
80
+ String notify = score < 0 ? ", \" notify\" : \" OWNER\" " : "" ;
81
+ String jsonPayload =
82
+ "{"
83
+ + labels
81
84
+ " \" message\" : \" "
82
85
+ message
83
86
+ "\" "
You can’t perform that action at this time.
0 commit comments