Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4803dac

Browse filesBrowse files
authored
Merge branch 'master' into okhttp-close-responsebody
2 parents 5726ceb + e3e495b commit 4803dac
Copy full SHA for 4803dac
Expand file treeCollapse file tree

30 files changed

+385
-66
lines changed

‎pom.xml

Copy file name to clipboardExpand all lines: pom.xml
+7-1Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHApp.java
+5-5Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppInstallation.java
+2-2Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranch.java
+4-2Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranchProtection.java
+3-3Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRun.java
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRunBuilder.java
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommit.java
+4-3Lines 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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommitComment.java
+1-1Lines 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()

‎src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @author Marc de Verdelhan
1111
* @see GitHub#searchCommits() GitHub#searchCommits()
1212
*/
13-
@Preview
13+
@Preview(Previews.CLOAK)
1414
@Deprecated
1515
public class GHCommitSearchBuilder extends GHSearchBuilder<GHCommit> {
1616
GHCommitSearchBuilder(GitHub root) {

‎src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.io.IOException;
44
import java.net.URL;
55

6-
import static org.kohsuke.github.Previews.BAPTISE;
6+
import static org.kohsuke.github.Previews.BAPTISTE;
77

88
/**
99
* Creates a repository
@@ -209,10 +209,10 @@ public GHCreateRepositoryBuilder team(GHTeam team) {
209209
* true if enabled
210210
* @return a builder to continue with building
211211
*/
212-
@Preview
212+
@Preview(BAPTISTE)
213213
@Deprecated
214214
public GHCreateRepositoryBuilder templateRepository(boolean enabled) {
215-
this.builder.withPreview(BAPTISE);
215+
this.builder.withPreview(BAPTISTE);
216216
this.builder.with("is_template", enabled);
217217
return this;
218218
}
@@ -239,10 +239,10 @@ public GHCreateRepositoryBuilder owner(String owner) {
239239
* @return a builder to continue with building
240240
* @see <a href="https://developer.github.com/v3/previews/">GitHub API Previews</a>
241241
*/
242-
@Preview
242+
@Preview(BAPTISTE)
243243
@Deprecated
244244
public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, String templateRepo) {
245-
this.builder.withPreview(BAPTISE);
245+
this.builder.withPreview(BAPTISTE);
246246
this.apiUrlTail = "/repos/" + templateOwner + "/" + templateRepo + "/generate";
247247
return this;
248248
}

‎src/main/java/org/kohsuke/github/GHDiscussion.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDiscussion.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static PagedIterable<GHDiscussion> readAll(GHTeam team) throws IOException {
130130
*
131131
* @return a {@link GHDiscussion.Updater}
132132
*/
133-
@Preview
133+
@Preview(Previews.SQUIRREL_GIRL)
134134
@Deprecated
135135
public GHDiscussion.Updater update() {
136136
return new GHDiscussion.Updater(this);
@@ -141,7 +141,7 @@ public GHDiscussion.Updater update() {
141141
*
142142
* @return a {@link GHDiscussion.Setter}
143143
*/
144-
@Preview
144+
@Preview(Previews.SQUIRREL_GIRL)
145145
@Deprecated
146146
public GHDiscussion.Setter set() {
147147
return new GHDiscussion.Setter(this);

‎src/main/java/org/kohsuke/github/GHEventPayload.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHEventPayload.java
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,7 @@ public static class Status extends GHEventPayload {
12161216
private String description;
12171217
private GHCommitState state;
12181218
private GHCommit commit;
1219+
private String targetUrl;
12191220

12201221
/**
12211222
* Gets the status content.
@@ -1226,6 +1227,15 @@ public String getContext() {
12261227
return context;
12271228
}
12281229

1230+
/**
1231+
* The optional link added to the status.
1232+
*
1233+
* @return a url
1234+
*/
1235+
public String getTargetUrl() {
1236+
return targetUrl;
1237+
}
1238+
12291239
/**
12301240
* Gets the status description.
12311241
*

‎src/main/java/org/kohsuke/github/GHIssue.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHIssue.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public PagedIterable<GHIssueComment> listComments() throws IOException {
448448
.toIterable(GHIssueComment[].class, item -> item.wrapUp(this));
449449
}
450450

451-
@Preview
451+
@Preview(SQUIRREL_GIRL)
452452
@Deprecated
453453
public GHReaction createReaction(ReactionContent content) throws IOException {
454454
return root.createRequest()
@@ -460,7 +460,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
460460
.wrap(root);
461461
}
462462

463-
@Preview
463+
@Preview(SQUIRREL_GIRL)
464464
@Deprecated
465465
public PagedIterable<GHReaction> listReactions() {
466466
return root.createRequest()

‎src/main/java/org/kohsuke/github/GHIssueComment.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHIssueComment.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void delete() throws IOException {
126126
owner.root.createRequest().method("DELETE").withUrlPath(getApiRoute()).send();
127127
}
128128

129-
@Preview
129+
@Preview(SQUIRREL_GIRL)
130130
@Deprecated
131131
public GHReaction createReaction(ReactionContent content) throws IOException {
132132
return owner.root.createRequest()
@@ -138,7 +138,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
138138
.wrap(owner.root);
139139
}
140140

141-
@Preview
141+
@Preview(SQUIRREL_GIRL)
142142
@Deprecated
143143
public PagedIterable<GHReaction> listReactions() {
144144
return owner.root.createRequest()

‎src/main/java/org/kohsuke/github/GHPullRequest.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPullRequest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public GHPullRequest setBaseBranch(String newBaseBranch) throws IOException {
576576
* @throws IOException
577577
* the io exception
578578
*/
579-
@Preview
579+
@Preview(LYDIAN)
580580
@Deprecated
581581
public void updateBranch() throws IOException {
582582
root.createRequest()

‎src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPullRequestReviewComment.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public GHPullRequestReviewComment reply(String body) throws IOException {
198198
.wrapUp(owner);
199199
}
200200

201-
@Preview
201+
@Preview(SQUIRREL_GIRL)
202202
@Deprecated
203203
public GHReaction createReaction(ReactionContent content) throws IOException {
204204
return owner.root.createRequest()
@@ -210,7 +210,7 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
210210
.wrap(owner.root);
211211
}
212212

213-
@Preview
213+
@Preview(SQUIRREL_GIRL)
214214
@Deprecated
215215
public PagedIterable<GHReaction> listReactions() {
216216
return owner.root.createRequest()

‎src/main/java/org/kohsuke/github/GHReaction.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHReaction.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @author Kohsuke Kawaguchi
1212
* @see Reactable
1313
*/
14-
@Preview
14+
@Preview(SQUIRREL_GIRL)
1515
@Deprecated
1616
public class GHReaction extends GHObject {
1717
private GitHub root;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.