|
1 | | -package org.kohsuke.github; |
2 | | - |
3 | | -import java.net.URL; |
4 | | - |
5 | | -public class GHDeploymentStatus extends Identifiable { |
6 | | - private GHRepository owner; |
7 | | - private GitHub root; |
8 | | - protected GHUser creator; |
9 | | - protected String state; |
10 | | - protected String description; |
11 | | - protected String target_url; |
12 | | - protected String deployment_url; |
13 | | - protected String repository_url; |
14 | | - public GHDeploymentStatus wrap(GHRepository owner) { |
15 | | - this.owner = owner; |
16 | | - this.root = owner.root; |
17 | | - if(creator != null) creator.wrapUp(root); |
18 | | - return this; |
19 | | - } |
20 | | - public URL getTargetUrl() { |
21 | | - return GitHub.parseURL(target_url); |
22 | | - } |
23 | | - |
24 | | - public URL getDeploymentUrl() { |
25 | | - return GitHub.parseURL(deployment_url); |
26 | | - } |
27 | | - |
28 | | - public URL getRepositoryUrl() { |
29 | | - return GitHub.parseURL(repository_url); |
30 | | - } |
31 | | - public GHDeploymentState getState() { |
32 | | - return GHDeploymentState.valueOf(state.toUpperCase()); |
33 | | - } |
34 | | - |
35 | | - |
36 | | -} |
| 1 | +package org.kohsuke.github; |
| 2 | + |
| 3 | +import java.net.URL; |
| 4 | + |
| 5 | +public class GHDeploymentStatus extends GHObject { |
| 6 | + private GHRepository owner; |
| 7 | + private GitHub root; |
| 8 | + protected GHUser creator; |
| 9 | + protected String state; |
| 10 | + protected String description; |
| 11 | + protected String target_url; |
| 12 | + protected String deployment_url; |
| 13 | + protected String repository_url; |
| 14 | + public GHDeploymentStatus wrap(GHRepository owner) { |
| 15 | + this.owner = owner; |
| 16 | + this.root = owner.root; |
| 17 | + if(creator != null) creator.wrapUp(root); |
| 18 | + return this; |
| 19 | + } |
| 20 | + public URL getTargetUrl() { |
| 21 | + return GitHub.parseURL(target_url); |
| 22 | + } |
| 23 | + |
| 24 | + public URL getDeploymentUrl() { |
| 25 | + return GitHub.parseURL(deployment_url); |
| 26 | + } |
| 27 | + |
| 28 | + public URL getRepositoryUrl() { |
| 29 | + return GitHub.parseURL(repository_url); |
| 30 | + } |
| 31 | + public GHDeploymentState getState() { |
| 32 | + return GHDeploymentState.valueOf(state.toUpperCase()); |
| 33 | + } |
| 34 | + |
| 35 | + |
| 36 | +} |
0 commit comments