Skip to content

Commit 4803dac

Browse files
authored
Merge branch 'master' into okhttp-close-responsebody
2 parents 5726ceb + e3e495b commit 4803dac

30 files changed

Lines changed: 385 additions & 66 deletions

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
<plugin>
262262
<groupId>org.apache.maven.plugins</groupId>
263263
<artifactId>maven-project-info-reports-plugin</artifactId>
264-
<version>3.1.0</version>
264+
<version>3.1.1</version>
265265
<dependencies>
266266
<dependency>
267267
<groupId>org.apache.bcel</groupId>
@@ -410,6 +410,12 @@
410410
<artifactId>commons-lang3</artifactId>
411411
<version>3.9</version>
412412
</dependency>
413+
<dependency>
414+
<groupId>com.tngtech.archunit</groupId>
415+
<artifactId>archunit</artifactId>
416+
<version>0.14.1</version>
417+
<scope>test</scope>
418+
</dependency>
413419
<dependency>
414420
<groupId>org.hamcrest</groupId>
415421
<artifactId>hamcrest</artifactId>

src/main/java/org/kohsuke/github/GHApp.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ GHApp wrapUp(GitHub root) {
189189
* @return a list of App installations
190190
* @see <a href="https://developer.github.com/v3/apps/#list-installations">List installations</a>
191191
*/
192-
@Preview
192+
@Preview(MACHINE_MAN)
193193
@Deprecated
194194
public PagedIterable<GHAppInstallation> listInstallations() {
195195
return root.createRequest()
@@ -210,7 +210,7 @@ public PagedIterable<GHAppInstallation> listInstallations() {
210210
* on error
211211
* @see <a href="https://developer.github.com/v3/apps/#get-an-installation">Get an installation</a>
212212
*/
213-
@Preview
213+
@Preview(MACHINE_MAN)
214214
@Deprecated
215215
public GHAppInstallation getInstallationById(long id) throws IOException {
216216
return root.createRequest()
@@ -233,7 +233,7 @@ public GHAppInstallation getInstallationById(long id) throws IOException {
233233
* @see <a href="https://developer.github.com/v3/apps/#get-an-organization-installation">Get an organization
234234
* installation</a>
235235
*/
236-
@Preview
236+
@Preview(MACHINE_MAN)
237237
@Deprecated
238238
public GHAppInstallation getInstallationByOrganization(String name) throws IOException {
239239
return root.createRequest()
@@ -258,7 +258,7 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc
258258
* @see <a href="https://developer.github.com/v3/apps/#get-a-repository-installation">Get a repository
259259
* installation</a>
260260
*/
261-
@Preview
261+
@Preview(MACHINE_MAN)
262262
@Deprecated
263263
public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException {
264264
return root.createRequest()
@@ -280,7 +280,7 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re
280280
* on error
281281
* @see <a href="https://developer.github.com/v3/apps/#get-a-user-installation">Get a user installation</a>
282282
*/
283-
@Preview
283+
@Preview(MACHINE_MAN)
284284
@Deprecated
285285
public GHAppInstallation getInstallationByUser(String name) throws IOException {
286286
return root.createRequest()

src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public GHAppCreateTokenBuilder permissions(Map<String, GHPermissionType> permiss
7878
* @throws IOException
7979
* on error
8080
*/
81-
@Preview
81+
@Preview(MACHINE_MAN)
8282
@Deprecated
8383
public GHAppInstallationToken create() throws IOException {
8484
return builder.method("POST")

src/main/java/org/kohsuke/github/GHAppInstallation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public String getRepositoriesUrl() {
124124
*
125125
* @return the paged iterable
126126
*/
127-
@Preview
127+
@Preview(MACHINE_MAN)
128128
@Deprecated
129129
public PagedSearchIterable<GHRepository> listRepositories() {
130130
GitHubRequest request;
@@ -322,7 +322,7 @@ GHAppInstallation wrapUp(GitHub root) {
322322
* on error
323323
* @see <a href="https://developer.github.com/v3/apps/#delete-an-installation">Delete an installation</a>
324324
*/
325-
@Preview
325+
@Preview(GAMBIT)
326326
@Deprecated
327327
public void deleteInstallation() throws IOException {
328328
root.createRequest()

src/main/java/org/kohsuke/github/GHBranch.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public boolean isProtected() {
8989
*
9090
* @return API URL that deals with the protection of this branch.
9191
*/
92-
@Preview
92+
@Preview(Previews.LUKE_CAGE)
9393
@Deprecated
9494
public URL getProtectionUrl() {
9595
return GitHubClient.parseURL(protection_url);
@@ -102,6 +102,8 @@ public URL getProtectionUrl() {
102102
* @throws IOException
103103
* the io exception
104104
*/
105+
@Preview(Previews.LUKE_CAGE)
106+
@Deprecated
105107
public GHBranchProtection getProtection() throws IOException {
106108
return root.createRequest()
107109
.withPreview(Previews.LUKE_CAGE)
@@ -135,7 +137,7 @@ public void disableProtection() throws IOException {
135137
* @return GHBranchProtectionBuilder for enabling protection
136138
* @see GHCommitStatus#getContext() GHCommitStatus#getContext()
137139
*/
138-
@Preview
140+
@Preview(Previews.LUKE_CAGE)
139141
@Deprecated
140142
public GHBranchProtectionBuilder enableProtection() {
141143
return new GHBranchProtectionBuilder(this);

src/main/java/org/kohsuke/github/GHBranchProtection.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class GHBranchProtection {
4343
* @throws IOException
4444
* the io exception
4545
*/
46-
@Preview
46+
@Preview(ZZZAX)
4747
@Deprecated
4848
public void enabledSignedCommits() throws IOException {
4949
requester().method("POST").withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class);
@@ -55,7 +55,7 @@ public void enabledSignedCommits() throws IOException {
5555
* @throws IOException
5656
* the io exception
5757
*/
58-
@Preview
58+
@Preview(ZZZAX)
5959
@Deprecated
6060
public void disableSignedCommits() throws IOException {
6161
requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send();
@@ -86,7 +86,7 @@ public RequiredReviews getRequiredReviews() {
8686
* @throws IOException
8787
* the io exception
8888
*/
89-
@Preview
89+
@Preview(ZZZAX)
9090
@Deprecated
9191
public boolean getRequiredSignatures() throws IOException {
9292
return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled;

src/main/java/org/kohsuke/github/GHCheckRun.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public static enum AnnotationLevel {
298298
*
299299
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
300300
*/
301-
@Preview
301+
@Preview(Previews.ANTIOPE)
302302
@Deprecated
303303
public @NonNull GHCheckRunBuilder update() {
304304
return new GHCheckRunBuilder(owner, getId());

src/main/java/org/kohsuke/github/GHCheckRunBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* @see <a href="https://developer.github.com/v3/checks/runs/#update-a-check-run">documentation</a>
4747
*/
4848
@SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "Jackson serializes these even without a getter")
49-
@Preview
49+
@Preview(Previews.ANTIOPE)
5050
@Deprecated
5151
public final class GHCheckRunBuilder {
5252

src/main/java/org/kohsuke/github/GHCommit.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.Date;
1212
import java.util.List;
1313

14+
import static org.kohsuke.github.Previews.ANTIOPE;
1415
import static org.kohsuke.github.Previews.GROOT;
1516

1617
/**
@@ -453,7 +454,7 @@ private GHUser resolveUser(User author) throws IOException {
453454
*
454455
* @return {@link PagedIterable} with the pull requests which contain this commit
455456
*/
456-
@Preview
457+
@Preview(GROOT)
457458
@Deprecated
458459
public PagedIterable<GHPullRequest> listPullRequests() {
459460
return owner.root.createRequest()
@@ -469,7 +470,7 @@ public PagedIterable<GHPullRequest> listPullRequests() {
469470
* @throws IOException
470471
* the io exception
471472
*/
472-
@Preview
473+
@Preview(GROOT)
473474
@Deprecated
474475
public PagedIterable<GHBranch> listBranchesWhereHead() throws IOException {
475476
return owner.root.createRequest()
@@ -565,7 +566,7 @@ public GHCommitStatus getLastStatus() throws IOException {
565566
* @throws IOException
566567
* on error
567568
*/
568-
@Preview
569+
@Preview(ANTIOPE)
569570
@Deprecated
570571
public PagedIterable<GHCheckRun> getCheckRuns() throws IOException {
571572
return owner.getCheckRuns(sha);

src/main/java/org/kohsuke/github/GHCommitComment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
133133
.wrap(owner.root);
134134
}
135135

136-
@Preview
136+
@Preview(SQUIRREL_GIRL)
137137
@Deprecated
138138
public PagedIterable<GHReaction> listReactions() {
139139
return owner.root.createRequest()

0 commit comments

Comments
 (0)