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 247b013

Browse filesBrowse files
committed
add deprecated annotations to preview usage
1 parent 12ca5d8 commit 247b013
Copy full SHA for 247b013

File tree

Expand file treeCollapse file tree

6 files changed

+55
-2
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+55
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeployment.java
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ public Object getPayloadObject() {
9595
/**
9696
* The environment defined when the deployment was first created.
9797
*
98+
* @deprecated until preview feature has graduated to stable
99+
*
98100
* @return the original deployment environment
99101
*/
102+
@Deprecated
100103
@Preview(Previews.FLASH)
101104
public String getOriginalEnvironment() {
102105
return original_environment;
@@ -115,8 +118,11 @@ public String getEnvironment() {
115118
* Specifies if the given environment is specific to the deployment and will no longer exist at some point in the
116119
* future.
117120
*
121+
* @deprecated until preview feature has graduated to stable
122+
*
118123
* @return the environment is transient
119124
*/
125+
@Deprecated
120126
@Preview(Previews.ANT_MAN)
121127
public boolean isTransientEnvironment() {
122128
return transient_environment;
@@ -125,8 +131,11 @@ public boolean isTransientEnvironment() {
125131
/**
126132
* Specifies if the given environment is one that end-users directly interact with.
127133
*
134+
* @deprecated until preview feature has graduated to stable
135+
*
128136
* @return the environment is used by end-users directly
129137
*/
138+
@Deprecated
130139
@Preview(Previews.ANT_MAN)
131140
public boolean isProductionEnvironment() {
132141
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
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ public GHDeploymentBuilder environment(String environment) {
120120
* Specifies if the given environment is specific to the deployment and will no longer exist at some point in the
121121
* future.
122122
*
123+
* @deprecated until preview feature has graduated to stable
124+
*
123125
* @param transientEnvironment
124126
* the environment is transient
125127
*
126128
* @return the gh deployment builder
127129
*/
130+
@Deprecated
128131
@Preview(Previews.ANT_MAN)
129132
public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) {
130133
builder.with("transient_environment", transientEnvironment);
@@ -134,11 +137,14 @@ public GHDeploymentBuilder transientEnvironment(boolean transientEnvironment) {
134137
/**
135138
* Specifies if the given environment is one that end-users directly interact with.
136139
*
140+
* @deprecated until preview feature has graduated to stable
141+
*
137142
* @param productionEnvironment
138143
* the environment is used by end-users directly
139144
*
140145
* @return the gh deployment builder
141146
*/
147+
@Deprecated
142148
@Preview(Previews.ANT_MAN)
143149
public GHDeploymentBuilder productionEnvironment(boolean productionEnvironment) {
144150
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
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,30 @@ public enum GHDeploymentState {
99
ERROR,
1010
FAILURE,
1111

12+
/**
13+
* The state of the deployment currently reflects it's in progress.
14+
*
15+
* @deprecated until preview feature has graduated to stable
16+
*/
17+
@Deprecated
1218
@Preview(Previews.FLASH)
1319
IN_PROGRESS,
1420

21+
/**
22+
* The state of the deployment currently reflects it's queued up for processing.
23+
*
24+
* @deprecated until preview feature has graduated to stable
25+
*/
26+
@Deprecated
1527
@Preview(Previews.FLASH)
1628
QUEUED,
1729

30+
/**
31+
* The state of the deployment currently reflects it's no longer active.
32+
*
33+
* @deprecated until preview feature has graduated to stable
34+
*/
35+
@Deprecated
1836
@Preview(Previews.ANT_MAN)
1937
INACTIVE
2038
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatus.java
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ public URL getTargetUrl() {
5151
* <p>
5252
* This method replaces {@link #getTargetUrl() getTargetUrl}}.
5353
*
54+
* @deprecated until preview feature has graduated to stable
55+
*
5456
* @return the target url
5557
*/
58+
@Preview(Previews.ANT_MAN)
5659
public URL getLogUrl() {
57-
return GitHubClient.parseURL(target_url);
60+
return GitHubClient.parseURL(log_url);
5861
}
5962

6063
/**
@@ -69,8 +72,12 @@ public URL getDeploymentUrl() {
6972
/**
7073
* Gets deployment environment url.
7174
*
75+
* @deprecated until preview feature has graduated to stable
76+
*
7277
* @return the deployment environment url
7378
*/
79+
@Deprecated
80+
@Preview(Previews.ANT_MAN)
7481
public URL getEnvironmentUrl() {
7582
return GitHubClient.parseURL(environment_url);
7683
}

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatusBuilder.java
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ public GHDeploymentStatusBuilder(GHRepository repo, int deploymentId, GHDeployme
4444
* Add an inactive status to all prior non-transient, non-production environment deployments with the same
4545
* repository and environment name as the created status's deployment.
4646
*
47+
* @deprecated until preview feature has graduated to stable
48+
*
4749
* @param autoInactive
4850
* Add inactive status flag
4951
*
5052
* @return the gh deployment status builder
5153
*/
54+
@Deprecated
5255
@Preview({ Previews.ANT_MAN, Previews.FLASH })
5356
public GHDeploymentStatusBuilder autoInactive(boolean autoInactive) {
5457
this.builder.with("auto_inactive", autoInactive);
@@ -71,11 +74,14 @@ public GHDeploymentStatusBuilder description(String description) {
7174
/**
7275
* Name for the target deployment environment, which can be changed when setting a deploy status.
7376
*
77+
* @deprecated until preview feature has graduated to stable
78+
*
7479
* @param environment
7580
* the environment name
7681
*
7782
* @return the gh deployment status builder
7883
*/
84+
@Deprecated
7985
@Preview(Previews.FLASH)
8086
public GHDeploymentStatusBuilder environment(String environment) {
8187
this.builder.with("environment", environment);
@@ -85,11 +91,14 @@ public GHDeploymentStatusBuilder environment(String environment) {
8591
/**
8692
* The URL for accessing the environment
8793
*
94+
* @deprecated until preview feature has graduated to stable
95+
*
8896
* @param environmentUrl
8997
* the environment url
9098
*
9199
* @return the gh deployment status builder
92100
*/
101+
@Deprecated
93102
@Preview(Previews.ANT_MAN)
94103
public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {
95104
this.builder.with("environment_url", environmentUrl);
@@ -101,11 +110,14 @@ public GHDeploymentStatusBuilder environmentUrl(String environmentUrl) {
101110
* <p>
102111
* This method replaces {@link #targetUrl(String) targetUrl}.
103112
*
113+
* @deprecated until preview feature has graduated to stable
114+
*
104115
* @param logUrl
105116
* the deployment output url
106117
*
107118
* @return the gh deployment status builder
108119
*/
120+
@Deprecated
109121
@Preview(Previews.ANT_MAN)
110122
public GHDeploymentStatusBuilder logUrl(String logUrl) {
111123
this.builder.with("log_url", logUrl);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/Preview.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
* Indicates that the method/class/etc marked maps to GitHub API in the preview period.
99
* <p>
1010
* These APIs are subject to change and not a part of the backward compatibility commitment. Always used in conjunction
11-
* with 'deprecated' to raise awareness to clients.
11+
* with 'deprecated' to raise awareness to clients. In addition, it's advised to update the targets documentation to
12+
* signify that the deprecation is required until preview feature being used is promoted to stable.
1213
*
1314
* @author Kohsuke Kawaguchi
1415
*/

0 commit comments

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