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 79b49a4

Browse filesBrowse files
committed
Clean up preview declarations
1 parent 9151102 commit 79b49a4
Copy full SHA for 79b49a4
Expand file treeCollapse file tree

23 files changed

+90
-65
lines changed

‎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/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;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+10-6Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public boolean isPrivate() {
708708
* @return the boolean
709709
*/
710710
@Deprecated
711-
@Preview
711+
@Preview(BAPTISTE)
712712
public boolean isTemplate() {
713713
// isTemplate is still in preview, we do not want to retrieve it unless needed.
714714
if (isTemplate == null) {
@@ -1925,7 +1925,7 @@ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException {
19251925
* @see <a href="https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref">List check runs
19261926
* for a specific ref</a>
19271927
*/
1928-
@Preview
1928+
@Preview(ANTIOPE)
19291929
@Deprecated
19301930
public PagedIterable<GHCheckRun> getCheckRuns(String ref) throws IOException {
19311931
GitHubRequest request = root.createRequest()
@@ -1999,7 +1999,7 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin
19991999
* the commit hash
20002000
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
20012001
*/
2002-
@Preview
2002+
@Preview(ANTIOPE)
20032003
@Deprecated
20042004
public @NonNull GHCheckRunBuilder createCheckRun(@NonNull String name, @NonNull String headSHA) {
20052005
return new GHCheckRunBuilder(this, name, headSHA);
@@ -2012,7 +2012,7 @@ public GHCommitStatus createCommitStatus(String sha1, GHCommitState state, Strin
20122012
* the existing checkId
20132013
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
20142014
*/
2015-
@Preview
2015+
@Preview(BAPTISTE)
20162016
@Deprecated
20172017
public @NonNull GHCheckRunBuilder updateCheckRun(long checkId) {
20182018
return new GHCheckRunBuilder(this, checkId);
@@ -2959,10 +2959,14 @@ void populate() throws IOException {
29592959
// There is bug in Push event payloads that returns the wrong url.
29602960
// All other occurrences of "url" take the form "https://api.github.com/...".
29612961
// For Push event repository records, they take the form "https://github.com/{fullName}".
2962-
root.createRequest().withPreview(BAPTISE).setRawUrlPath(url.toString()).fetchInto(this).wrap(root);
2962+
root.createRequest().withPreview(BAPTISTE).setRawUrlPath(url.toString()).fetchInto(this).wrap(root);
29632963
} catch (HttpException e) {
29642964
if (e.getCause() instanceof JsonParseException) {
2965-
root.createRequest().withPreview(BAPTISE).withUrlPath("/repos/" + full_name).fetchInto(this).wrap(root);
2965+
root.createRequest()
2966+
.withPreview(BAPTISTE)
2967+
.withUrlPath("/repos/" + full_name)
2968+
.fetchInto(this)
2969+
.wrap(root);
29662970
} else {
29672971
throw e;
29682972
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GitHub.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ public PagedIterable<GHAuthorization> listMyAuthorizations() throws IOException
10131013
* @see <a href="https://developer.github.com/v3/apps/#get-the-authenticated-github-app">Get the authenticated
10141014
* GitHub App</a>
10151015
*/
1016-
@Preview
1016+
@Preview(MACHINE_MAN)
10171017
@Deprecated
10181018
public GHApp getApp() throws IOException {
10191019
return createRequest().withPreview(MACHINE_MAN).withUrlPath("/app").fetch(GHApp.class).wrapUp(this);
@@ -1108,7 +1108,7 @@ public void checkApiUrlValidity() throws IOException {
11081108
*
11091109
* @return the gh commit search builder
11101110
*/
1111-
@Preview
1111+
@Preview(Previews.CLOAK)
11121112
@Deprecated
11131113
public GHCommitSearchBuilder searchCommits() {
11141114
return new GHCommitSearchBuilder(this);

0 commit comments

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