File tree 2 files changed +41
-0
lines changed
main/java/org/gitlab4j/api/models
test/resources/org/gitlab4j/api
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import java .util .Date ;
4
4
import java .util .List ;
5
+ import java .util .Map ;
5
6
6
7
import org .gitlab4j .api .utils .JacksonJson ;
7
8
9
+ import com .fasterxml .jackson .annotation .JsonIgnore ;
10
+ import com .fasterxml .jackson .annotation .JsonProperty ;
11
+
8
12
public class Release {
9
13
10
14
private String name ;
@@ -20,6 +24,8 @@ public class Release {
20
24
private String tagPath ;
21
25
private String evidenceSha ;
22
26
private Assets assets ;
27
+ @ JsonProperty ("_links" )
28
+ private Map <String , String > links ;
23
29
24
30
public String getName () {
25
31
return name ;
@@ -125,6 +131,23 @@ public void setAssets(Assets assets) {
125
131
this .assets = assets ;
126
132
}
127
133
134
+ public Map <String , String > getLinks () {
135
+ return links ;
136
+ }
137
+
138
+ public void setLinks (Map <String , String > links ) {
139
+ this .links = links ;
140
+ }
141
+
142
+ @ JsonIgnore
143
+ public String getLinkByName (String name ) {
144
+ if (links == null || links .isEmpty ()) {
145
+ return (null );
146
+ }
147
+
148
+ return (links .get (name ));
149
+ }
150
+
128
151
@ Override
129
152
public String toString () {
130
153
return (JacksonJson .toJsonString (this ));
Original file line number Diff line number Diff line change 94
94
}
95
95
],
96
96
"evidence_file_path" :" https://gitlab.example.com/root/awesome-app/-/releases/v0.2/evidence.json"
97
+ },
98
+ "_links" : {
99
+ "closed_issues_url" : " https://gitlab.example.com/root/awesome-app/-/issues?release_tag=v0.2&scope=all&state=closed" ,
100
+ "closed_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.2&scope=all&state=closed" ,
101
+ "edit_url" : " https://gitlab.example.com/root/awesome-app/-/releases/v0.2/edit" ,
102
+ "merged_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.2&scope=all&state=merged" ,
103
+ "opened_issues_url" : " https://gitlab.example.com/root/awesome-app/-/issues?release_tag=v0.2&scope=all&state=opened" ,
104
+ "opened_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.2&scope=all&state=opened" ,
105
+ "self" : " https://gitlab.example.com/root/awesome-app/-/releases/v0.2"
97
106
}
98
107
},
99
108
{
152
161
153
162
],
154
163
"evidence_file_path" :" https://gitlab.example.com/root/awesome-app/-/releases/v0.1/evidence.json"
164
+ },
165
+ "_links" : {
166
+ "closed_issues_url" : " https://gitlab.example.com/root/awesome-app/-/issues?release_tag=v0.1&scope=all&state=closed" ,
167
+ "closed_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.1&scope=all&state=closed" ,
168
+ "edit_url" : " https://gitlab.example.com/root/awesome-app/-/releases/v0.1/edit" ,
169
+ "merged_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.1&scope=all&state=merged" ,
170
+ "opened_issues_url" : " https://gitlab.example.com/root/awesome-app/-/issues?release_tag=v0.1&scope=all&state=opened" ,
171
+ "opened_merge_requests_url" : " https://gitlab.example.com/root/awesome-app/-/merge_requests?release_tag=v0.1&scope=all&state=opened" ,
172
+ "self" : " https://gitlab.example.com/root/awesome-app/-/releases/v0.1"
155
173
}
156
174
}
157
175
]
You can’t perform that action at this time.
0 commit comments