formatting

This commit is contained in:
Marco Ferrer
2020-10-02 16:52:23 -04:00
parent a0d650a86c
commit 15e9ee30ee
4 changed files with 14 additions and 6 deletions

View File

@@ -112,8 +112,8 @@ public class GHDeployment extends GHObject {
}
/**
* Specifies if the given environment is specific to the deployment
* and will no longer exist at some point in the future.
* Specifies if the given environment is specific to the deployment and will no longer exist at some point in the
* future.
*
* @return the environment is transient
*/

View File

@@ -19,7 +19,9 @@ public class GHDeploymentBuilder {
*/
public GHDeploymentBuilder(GHRepository repo) {
this.repo = repo;
this.builder = repo.root.createRequest().withPreview(Previews.ANT_MAN).withPreview(Previews.FLASH)
this.builder = repo.root.createRequest()
.withPreview(Previews.ANT_MAN)
.withPreview(Previews.FLASH)
.method("POST");
}

View File

@@ -4,7 +4,10 @@ package org.kohsuke.github;
* Represents the state of deployment
*/
public enum GHDeploymentState {
PENDING, SUCCESS, ERROR, FAILURE,
PENDING,
SUCCESS,
ERROR,
FAILURE,
@Preview(Previews.FLASH)
IN_PROGRESS,

View File

@@ -32,7 +32,9 @@ public class GHDeploymentStatusBuilder {
GHDeploymentStatusBuilder(GHRepository repo, long deploymentId, GHDeploymentState state) {
this.repo = repo;
this.deploymentId = deploymentId;
this.builder = repo.root.createRequest().withPreview(Previews.ANT_MAN).withPreview(Previews.FLASH)
this.builder = repo.root.createRequest()
.withPreview(Previews.ANT_MAN)
.withPreview(Previews.FLASH)
.method("POST");
this.builder.with("state", state);
@@ -136,6 +138,7 @@ public class GHDeploymentStatusBuilder {
*/
public GHDeploymentStatus create() throws IOException {
return builder.withUrlPath(repo.getApiTailUrl("deployments/" + deploymentId + "/statuses"))
.fetch(GHDeploymentStatus.class).wrap(repo);
.fetch(GHDeploymentStatus.class)
.wrap(repo);
}
}