Skip to content

Commit 854d2d9

Browse files
authored
feat: Add additional PR field in CheckRunResponse and CheckSuite (#230)
* feat: Add additional PR field in CheckRunResponse and CheckSuite * refactor: Add overloads for long params for PRClient
1 parent ccd8ca9 commit 854d2d9

File tree

8 files changed

+295
-70
lines changed

8 files changed

+295
-70
lines changed

src/main/java/com/spotify/github/v3/checks/CheckRunResponse.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
2424
import com.spotify.github.GithubStyle;
25+
26+
import java.util.List;
2527
import java.util.Optional;
28+
29+
import com.spotify.github.v3.prs.PartialPullRequestItem;
2630
import org.immutables.value.Value;
2731

2832
/** The CheckRun response resource. */
@@ -73,4 +77,10 @@ public interface CheckRunResponse extends CheckRunBase {
7377
* @return the optional
7478
*/
7579
Optional<App> app();
80+
81+
/**
82+
* Pull Requests where this check is applied.
83+
* @return the list of pull requests
84+
*/
85+
List<PartialPullRequestItem> pullRequests();
7686
}

src/main/java/com/spotify/github/v3/checks/CheckSuite.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,23 +22,34 @@
2222

2323
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
2424
import com.spotify.github.GithubStyle;
25+
26+
import java.util.List;
2527
import java.util.Optional;
28+
29+
import com.spotify.github.v3.prs.PartialPullRequestItem;
2630
import org.immutables.value.Value;
2731

28-
/** Github CheckSuite */
32+
/** GitHub CheckSuite */
2933
@Value.Immutable
3034
@GithubStyle
3135
@JsonDeserialize(as = ImmutableCheckSuite.class)
3236
public interface CheckSuite {
3337

3438
/**
35-
* The Check Suite Id.
39+
* The Check Suite id.
3640
*
37-
* @return the integer
41+
* @return the long id
3842
*/
3943
Long id();
4044

4145
Optional<App> app();
4246

4347
Optional<String> headBranch();
48+
49+
/**
50+
* Pull Requests where this check suite is applied.
51+
*
52+
* @return the list of pull requests
53+
*/
54+
List<PartialPullRequestItem> pullRequests();
4455
}

0 commit comments

Comments
 (0)