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 9978678

Browse filesBrowse files
authored
Merge pull request hub4j#1184 from bitwiseman/no-deprecated
Remove @deprecated annotation from Preview and BetaApi elements
2 parents 66c74e9 + bf9e420 commit 9978678
Copy full SHA for 9978678
Expand file treeCollapse file tree

34 files changed

+4
-157
lines changed

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/AbstractBuilder.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
9999
*/
100100
@Nonnull
101101
@BetaApi
102-
@Deprecated
103102
public R done() throws IOException {
104103
R result;
105104
if (updateInPlace && baseInstance != null) {
@@ -129,7 +128,6 @@ public R done() throws IOException {
129128
*/
130129
@Nonnull
131130
@BetaApi
132-
@Deprecated
133131
protected S with(@Nonnull String name, Object value) throws IOException {
134132
requester.with(name, value);
135133
return continueOrDone();
@@ -150,7 +148,6 @@ protected S with(@Nonnull String name, Object value) throws IOException {
150148
*/
151149
@Nonnull
152150
@BetaApi
153-
@Deprecated
154151
protected S continueOrDone() throws IOException {
155152
// This little bit of roughness in this base class means all inheriting builders get to create Updater and
156153
// Setter classes from almost identical code. Creator can often be implemented with significant code reuse as

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHApp.java
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ GHApp wrapUp(GitHub root) {
194194
* @see <a href="https://developer.github.com/v3/apps/#list-installations">List installations</a>
195195
*/
196196
@Preview(MACHINE_MAN)
197-
@Deprecated
198197
public PagedIterable<GHAppInstallation> listInstallations() {
199198
return root.createRequest()
200199
.withPreview(MACHINE_MAN)
@@ -215,7 +214,6 @@ public PagedIterable<GHAppInstallation> listInstallations() {
215214
* @see <a href="https://developer.github.com/v3/apps/#get-an-installation">Get an installation</a>
216215
*/
217216
@Preview(MACHINE_MAN)
218-
@Deprecated
219217
public GHAppInstallation getInstallationById(long id) throws IOException {
220218
return root.createRequest()
221219
.withPreview(MACHINE_MAN)
@@ -238,7 +236,6 @@ public GHAppInstallation getInstallationById(long id) throws IOException {
238236
* installation</a>
239237
*/
240238
@Preview(MACHINE_MAN)
241-
@Deprecated
242239
public GHAppInstallation getInstallationByOrganization(String name) throws IOException {
243240
return root.createRequest()
244241
.withPreview(MACHINE_MAN)
@@ -263,7 +260,6 @@ public GHAppInstallation getInstallationByOrganization(String name) throws IOExc
263260
* installation</a>
264261
*/
265262
@Preview(MACHINE_MAN)
266-
@Deprecated
267263
public GHAppInstallation getInstallationByRepository(String ownerName, String repositoryName) throws IOException {
268264
return root.createRequest()
269265
.withPreview(MACHINE_MAN)
@@ -285,7 +281,6 @@ public GHAppInstallation getInstallationByRepository(String ownerName, String re
285281
* @see <a href="https://developer.github.com/v3/apps/#get-a-user-installation">Get a user installation</a>
286282
*/
287283
@Preview(MACHINE_MAN)
288-
@Deprecated
289284
public GHAppInstallation getInstallationByUser(String name) throws IOException {
290285
return root.createRequest()
291286
.withPreview(MACHINE_MAN)

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
1919
private final String apiUrlTail;
2020

2121
@BetaApi
22-
@Deprecated
2322
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail) {
2423
this.root = root;
2524
this.apiUrlTail = apiUrlTail;
2625
this.builder = root.createRequest();
2726
}
2827

2928
@BetaApi
30-
@Deprecated
3129
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail, Map<String, GHPermissionType> permissions) {
3230
this(root, apiUrlTail);
3331
permissions(permissions);
@@ -43,7 +41,6 @@ public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
4341
* @return a GHAppCreateTokenBuilder
4442
*/
4543
@BetaApi
46-
@Deprecated
4744
public GHAppCreateTokenBuilder repositoryIds(List<Long> repositoryIds) {
4845
this.builder.with("repository_ids", repositoryIds);
4946
return this;
@@ -58,7 +55,6 @@ public GHAppCreateTokenBuilder repositoryIds(List<Long> repositoryIds) {
5855
* @return a GHAppCreateTokenBuilder
5956
*/
6057
@BetaApi
61-
@Deprecated
6258
public GHAppCreateTokenBuilder permissions(Map<String, GHPermissionType> permissions) {
6359
Map<String, String> retMap = new HashMap<>();
6460
for (Map.Entry<String, GHPermissionType> entry : permissions.entrySet()) {
@@ -78,7 +74,6 @@ public GHAppCreateTokenBuilder permissions(Map<String, GHPermissionType> permiss
7874
* on error
7975
*/
8076
@Preview(MACHINE_MAN)
81-
@Deprecated
8277
public GHAppInstallationToken create() throws IOException {
8378
return builder.method("POST")
8479
.withPreview(MACHINE_MAN)

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppInstallation.java
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public String getRepositoriesUrl() {
126126
* @return the paged iterable
127127
*/
128128
@Preview(MACHINE_MAN)
129-
@Deprecated
130129
public PagedSearchIterable<GHRepository> listRepositories() {
131130
GitHubRequest request;
132131

@@ -326,7 +325,6 @@ GHAppInstallation wrapUp(GitHub root) {
326325
* @see <a href="https://developer.github.com/v3/apps/#delete-an-installation">Delete an installation</a>
327326
*/
328327
@Preview(GAMBIT)
329-
@Deprecated
330328
public void deleteInstallation() throws IOException {
331329
root.createRequest()
332330
.method("DELETE")
@@ -348,7 +346,6 @@ public void deleteInstallation() throws IOException {
348346
* @deprecated Use {@link GHAppInstallation#createToken()} instead.
349347
*/
350348
@BetaApi
351-
@Deprecated
352349
public GHAppCreateTokenBuilder createToken(Map<String, GHPermissionType> permissions) {
353350
return new GHAppCreateTokenBuilder(root,
354351
String.format("/app/installations/%d/access_tokens", getId()),
@@ -365,7 +362,6 @@ public GHAppCreateTokenBuilder createToken(Map<String, GHPermissionType> permiss
365362
* @return a GHAppCreateTokenBuilder instance
366363
*/
367364
@BetaApi
368-
@Deprecated
369365
public GHAppCreateTokenBuilder createToken() {
370366
return new GHAppCreateTokenBuilder(root, String.format("/app/installations/%d/access_tokens", getId()));
371367
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranch.java
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public String getName() {
7979
* @return true if the push to this branch is restricted via branch protection.
8080
*/
8181
@Preview(Previews.LUKE_CAGE)
82-
@Deprecated
8382
public boolean isProtected() {
8483
return protection;
8584
}
@@ -90,7 +89,6 @@ public boolean isProtected() {
9089
* @return API URL that deals with the protection of this branch.
9190
*/
9291
@Preview(Previews.LUKE_CAGE)
93-
@Deprecated
9492
public URL getProtectionUrl() {
9593
return GitHubClient.parseURL(protection_url);
9694
}
@@ -103,7 +101,6 @@ public URL getProtectionUrl() {
103101
* the io exception
104102
*/
105103
@Preview(Previews.LUKE_CAGE)
106-
@Deprecated
107104
public GHBranchProtection getProtection() throws IOException {
108105
return root.createRequest()
109106
.withPreview(Previews.LUKE_CAGE)
@@ -138,7 +135,6 @@ public void disableProtection() throws IOException {
138135
* @see GHCommitStatus#getContext() GHCommitStatus#getContext()
139136
*/
140137
@Preview(Previews.LUKE_CAGE)
141-
@Deprecated
142138
public GHBranchProtectionBuilder enableProtection() {
143139
return new GHBranchProtectionBuilder(this);
144140
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranchProtection.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class GHBranchProtection extends GitHubInteractiveObject {
4242
* the io exception
4343
*/
4444
@Preview(ZZZAX)
45-
@Deprecated
4645
public void enabledSignedCommits() throws IOException {
4746
requester().method("POST").withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class);
4847
}
@@ -54,7 +53,6 @@ public void enabledSignedCommits() throws IOException {
5453
* the io exception
5554
*/
5655
@Preview(ZZZAX)
57-
@Deprecated
5856
public void disableSignedCommits() throws IOException {
5957
requester().method("DELETE").withUrlPath(url + REQUIRE_SIGNATURES_URI).send();
6058
}
@@ -85,7 +83,6 @@ public RequiredReviews getRequiredReviews() {
8583
* the io exception
8684
*/
8785
@Preview(ZZZAX)
88-
@Deprecated
8986
public boolean getRequiredSignatures() throws IOException {
9087
return requester().withUrlPath(url + REQUIRE_SIGNATURES_URI).fetch(RequiredSignatures.class).enabled;
9188
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRun.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ public static enum AnnotationLevel {
334334
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
335335
*/
336336
@Preview(Previews.ANTIOPE)
337-
@Deprecated
338337
public @NonNull GHCheckRunBuilder update() {
339338
return new GHCheckRunBuilder(owner, getId());
340339
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRunBuilder.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
*/
4949
@SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "Jackson serializes these even without a getter")
5050
@Preview(Previews.ANTIOPE)
51-
@Deprecated
5251
public final class GHCheckRunBuilder {
5352

5453
protected final GHRepository repo;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommit.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ private GHUser resolveUser(User author) throws IOException {
454454
* @return {@link PagedIterable} with the pull requests which contain this commit
455455
*/
456456
@Preview(GROOT)
457-
@Deprecated
458457
public PagedIterable<GHPullRequest> listPullRequests() {
459458
return owner.root.createRequest()
460459
.withPreview(GROOT)
@@ -470,7 +469,6 @@ public PagedIterable<GHPullRequest> listPullRequests() {
470469
* the io exception
471470
*/
472471
@Preview(GROOT)
473-
@Deprecated
474472
public PagedIterable<GHBranch> listBranchesWhereHead() throws IOException {
475473
return owner.root.createRequest()
476474
.withPreview(GROOT)
@@ -566,7 +564,6 @@ public GHCommitStatus getLastStatus() throws IOException {
566564
* on error
567565
*/
568566
@Preview(ANTIOPE)
569-
@Deprecated
570567
public PagedIterable<GHCheckRun> getCheckRuns() throws IOException {
571568
return owner.getCheckRuns(sha);
572569
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommitComment.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ public void update(String body) throws IOException {
122122
}
123123

124124
@Preview(SQUIRREL_GIRL)
125-
@Deprecated
126125
public GHReaction createReaction(ReactionContent content) throws IOException {
127126
return owner.root.createRequest()
128127
.method("POST")
@@ -134,7 +133,6 @@ public GHReaction createReaction(ReactionContent content) throws IOException {
134133
}
135134

136135
@Preview(SQUIRREL_GIRL)
137-
@Deprecated
138136
public PagedIterable<GHReaction> listReactions() {
139137
return owner.root.createRequest()
140138
.withPreview(SQUIRREL_GIRL)

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* @see GitHub#searchCommits() GitHub#searchCommits()
1313
*/
1414
@Preview(Previews.CLOAK)
15-
@Deprecated
1615
public class GHCommitSearchBuilder extends GHSearchBuilder<GHCommit> {
1716
GHCommitSearchBuilder(GitHub root) {
1817
super(root, CommitSearchResult.class);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCreateRepositoryBuilder.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ public GHCreateRepositoryBuilder owner(String owner) throws IOException {
115115
* @see <a href="https://developer.github.com/v3/previews/">GitHub API Previews</a>
116116
*/
117117
@Preview(BAPTISTE)
118-
@Deprecated
119118
public GHCreateRepositoryBuilder fromTemplateRepository(String templateOwner, String templateRepo) {
120119
requester.withPreview(BAPTISTE).withUrlPath("/repos/" + templateOwner + "/" + templateRepo + "/generate");
121120
return this;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeployment.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ public Object getPayloadObject() {
100100
*
101101
* @return the original deployment environment
102102
*/
103-
@Deprecated
104103
@Preview(Previews.FLASH)
105104
public String getOriginalEnvironment() {
106105
return original_environment;
@@ -123,7 +122,6 @@ public String getEnvironment() {
123122
*
124123
* @return the environment is transient
125124
*/
126-
@Deprecated
127125
@Preview(Previews.ANT_MAN)
128126
public boolean isTransientEnvironment() {
129127
return transient_environment;
@@ -136,7 +134,6 @@ public boolean isTransientEnvironment() {
136134
*
137135
* @return the environment is used by end-users directly
138136
*/
139-
@Deprecated
140137
@Preview(Previews.ANT_MAN)
141138
public boolean isProductionEnvironment() {
142139
return production_environment;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentBuilder.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public GHDeploymentBuilder environment(String environment) {
129129
*
130130
* @return the gh deployment builder
131131
*/
132-
@Deprecated
133132
@Preview(Previews.ANT_MAN)
134133
public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) {
135134
builder.with("transient_environment", transientEnvironment);
@@ -146,7 +145,6 @@ public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) {
146145
*
147146
* @return the gh deployment builder
148147
*/
149-
@Deprecated
150148
@Preview(Previews.ANT_MAN)
151149
public GHDeploymentBuilder productionEnvironment(boolean productionEnvironment) {
152150
builder.with("production_environment", productionEnvironment);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentState.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public enum GHDeploymentState {
1616
*
1717
* @deprecated until preview feature has graduated to stable
1818
*/
19-
@Deprecated
2019
@Preview(Previews.FLASH)
2120
IN_PROGRESS,
2221

@@ -25,7 +24,6 @@ public enum GHDeploymentState {
2524
*
2625
* @deprecated until preview feature has graduated to stable
2726
*/
28-
@Deprecated
2927
@Preview(Previews.FLASH)
3028
QUEUED,
3129

@@ -34,7 +32,6 @@ public enum GHDeploymentState {
3432
*
3533
* @deprecated until preview feature has graduated to stable
3634
*/
37-
@Deprecated
3835
@Preview(Previews.ANT_MAN)
3936
INACTIVE
4037
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatus.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public URL getTargetUrl() {
5656
*
5757
* @return the target url
5858
*/
59-
@Deprecated
6059
@Preview(Previews.ANT_MAN)
6160
public URL getLogUrl() {
6261
return GitHubClient.parseURL(log_url);
@@ -78,7 +77,6 @@ public URL getDeploymentUrl() {
7877
*
7978
* @return the deployment environment url
8079
*/
81-
@Deprecated
8280
@Preview(Previews.ANT_MAN)
8381
public URL getEnvironmentUrl() {
8482
return GitHubClient.parseURL(environment_url);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeployme
5353
*
5454
* @return the gh deployment status builder
5555
*/
56-
@Deprecated
5756
@Preview({ Previews.ANT_MAN, Previews.FLASH })
5857
public GHDeploymentStatusBuilder autoInactive(boolean autoInactive) {
5958
this.builder.with("auto_inactive", autoInactive);
@@ -83,7 +82,6 @@ public GHDeploymentStatusBuilder description(String description) {
8382
*
8483
* @return the gh deployment status builder
8584
*/
86-
@Deprecated
8785
@Preview(Previews.FLASH)
8886
public GHDeploymentStatusBuilder environment(String environment) {
8987
this.builder.with("environment", environment);
@@ -100,7 +98,6 @@ public GHDeploymentStatusBuilder environment(String environment) {
10098
*
10199
* @return the gh deployment status builder
102100
*/
103-
@Deprecated
104101
@Preview(Previews.ANT_MAN)
105102
public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {
106103
this.builder.with("environment_url", environmentUrl);
@@ -119,7 +116,6 @@ public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {
119116
*
120117
* @return the gh deployment status builder
121118
*/
122-
@Deprecated
123119
@Preview(Previews.ANT_MAN)
124120
public GHDeploymentStatusBuilder logUrl(String logUrl) {
125121
this.builder.with("log_url", logUrl);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDiscussion.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static PagedIterable<GHDiscussion> readAll(GHTeam team) throws IOException {
129129
* @return a {@link GHDiscussion.Updater}
130130
*/
131131
@Preview(Previews.SQUIRREL_GIRL)
132-
@Deprecated
133132
public GHDiscussion.Updater update() {
134133
return new GHDiscussion.Updater(this);
135134
}
@@ -140,7 +139,6 @@ public GHDiscussion.Updater update() {
140139
* @return a {@link GHDiscussion.Setter}
141140
*/
142141
@Preview(Previews.SQUIRREL_GIRL)
143-
@Deprecated
144142
public GHDiscussion.Setter set() {
145143
return new GHDiscussion.Setter(this);
146144
}

0 commit comments

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