@@ -113,7 +113,8 @@ void merge(String msg)
113113 * @throws IOException IOException If there is any I/O problem
114114 */
115115 MergeState merge (String msg ,
116- String sha ) throws IOException ;
116+ String sha
117+ ) throws IOException ;
117118
118119 /**
119120 * Get Pull Comments.
@@ -123,13 +124,21 @@ MergeState merge(String msg,
123124 */
124125 PullComments comments () throws IOException ;
125126
127+ /**
128+ * Get Pull Checks.
129+ * @return Checks.
130+ * @throws IOException If there is any I/O problem.
131+ * @see <a href="https://developer.github.com/v3/checks/runs/">Checks API</a>
132+ */
133+ Checks checks () throws IOException ;
134+
126135 /**
127136 * Smart pull request with extra features.
128137 */
129138 @ Immutable
130139 @ ToString
131140 @ Loggable (Loggable .DEBUG )
132- @ EqualsAndHashCode (of = { "pull" , "jsn" })
141+ @ EqualsAndHashCode (of = {"pull" , "jsn" })
133142 final class Smart implements Pull {
134143 /**
135144 * Encapsulated pull request.
@@ -139,6 +148,7 @@ final class Smart implements Pull {
139148 * SmartJson object for convenient JSON parsing.
140149 */
141150 private final transient SmartJson jsn ;
151+
142152 /**
143153 * Public ctor.
144154 * @param pll Pull request
@@ -149,6 +159,7 @@ public Smart(
149159 this .pull = pll ;
150160 this .jsn = new SmartJson (pll );
151161 }
162+
152163 /**
153164 * Is it open?
154165 * @return TRUE if it's open
@@ -157,6 +168,7 @@ public Smart(
157168 public boolean isOpen () throws IOException {
158169 return Issue .OPEN_STATE .equals (this .state ());
159170 }
171+
160172 /**
161173 * Get its state.
162174 * @return State of pull request
@@ -165,6 +177,7 @@ public boolean isOpen() throws IOException {
165177 public String state () throws IOException {
166178 return this .jsn .text ("state" );
167179 }
180+
168181 /**
169182 * Change its state.
170183 * @param state State of pull request
@@ -177,6 +190,7 @@ public void state(
177190 Json .createObjectBuilder ().add ("state" , state ).build ()
178191 );
179192 }
193+
180194 /**
181195 * Get its title.
182196 * @return Title of pull request
@@ -185,6 +199,7 @@ public void state(
185199 public String title () throws IOException {
186200 return this .jsn .text ("title" );
187201 }
202+
188203 /**
189204 * Change its title.
190205 * @param text Title of pull request
@@ -197,6 +212,7 @@ public void title(
197212 Json .createObjectBuilder ().add ("title" , text ).build ()
198213 );
199214 }
215+
200216 /**
201217 * Get its body.
202218 * @return Body of pull request
@@ -205,6 +221,7 @@ public void title(
205221 public String body () throws IOException {
206222 return this .jsn .text ("body" );
207223 }
224+
208225 /**
209226 * Change its body.
210227 * @param text Body of pull request
@@ -217,6 +234,7 @@ public void body(
217234 Json .createObjectBuilder ().add ("body" , text ).build ()
218235 );
219236 }
237+
220238 /**
221239 * Get its URL.
222240 * @return URL of pull request
@@ -225,6 +243,7 @@ public void body(
225243 public URL url () throws IOException {
226244 return new URL (this .jsn .text ("url" ));
227245 }
246+
228247 /**
229248 * Get its HTML URL.
230249 * @return URL of pull request
@@ -233,6 +252,7 @@ public URL url() throws IOException {
233252 public URL htmlUrl () throws IOException {
234253 return new URL (this .jsn .text ("html_url" ));
235254 }
255+
236256 /**
237257 * When this pull request was created.
238258 * @return Date of creation
@@ -247,6 +267,7 @@ public Date createdAt() throws IOException {
247267 throw new IllegalStateException (ex );
248268 }
249269 }
270+
250271 /**
251272 * When this pull request was updated.
252273 * @return Date of update
@@ -261,6 +282,7 @@ public Date updatedAt() throws IOException {
261282 throw new IllegalStateException (ex );
262283 }
263284 }
285+
264286 /**
265287 * When this pull request was closed.
266288 * @return Date of closing
@@ -275,6 +297,7 @@ public Date closedAt() throws IOException {
275297 throw new IllegalStateException (ex );
276298 }
277299 }
300+
278301 /**
279302 * When this pull request was merged.
280303 * @return Date of merging
@@ -310,6 +333,7 @@ public User author() throws IOException {
310333 public Issue issue () {
311334 return this .pull .repo ().issues ().get (this .pull .number ());
312335 }
336+
313337 /**
314338 * Get comments count.
315339 * @return Count of comments
@@ -319,22 +343,27 @@ public Issue issue() {
319343 public int commentsCount () throws IOException {
320344 return this .jsn .number ("comments" );
321345 }
346+
322347 @ Override
323348 public Repo repo () {
324349 return this .pull .repo ();
325350 }
351+
326352 @ Override
327353 public int number () {
328354 return this .pull .number ();
329355 }
356+
330357 @ Override
331358 public Iterable <Commit > commits () throws IOException {
332359 return this .pull .commits ();
333360 }
361+
334362 @ Override
335363 public Iterable <JsonObject > files () throws IOException {
336364 return this .pull .files ();
337365 }
366+
338367 @ Override
339368 public void merge (
340369 final String msg
@@ -345,7 +374,8 @@ public void merge(
345374 @ Override
346375 public MergeState merge (
347376 final String msg ,
348- final String sha )
377+ final String sha
378+ )
349379 throws IOException {
350380 return this .pull .merge (msg , sha );
351381 }
@@ -355,16 +385,23 @@ public PullComments comments() throws IOException {
355385 return this .pull .comments ();
356386 }
357387
388+ @ Override
389+ public Checks checks () throws IOException {
390+ return this .pull .checks ();
391+ }
392+
358393 @ Override
359394 public JsonObject json () throws IOException {
360395 return this .pull .json ();
361396 }
397+
362398 @ Override
363399 public void patch (
364400 final JsonObject json
365401 ) throws IOException {
366402 this .pull .patch (json );
367403 }
404+
368405 @ Override
369406 public int compareTo (
370407 final Pull obj
0 commit comments