-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete implementation of create deployment api
- Loading branch information
1 parent
425ae2d
commit bc518a9
Showing
4 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/main/java/org/kohsuke/github/GHDeployment.java
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,56 @@ | ||
package org.kohsuke.github; | ||
|
||
import java.net.URL; | ||
import java.util.Date; | ||
|
||
public class GHDeployment { | ||
private GHRepository owner; | ||
private GitHub root; | ||
protected String url; | ||
protected String sha; | ||
protected int id; | ||
protected String task; | ||
protected String payload; | ||
protected String environment; | ||
protected String description; | ||
protected String statuses_url; | ||
protected String repository_url; | ||
protected String created_at; | ||
protected String updated_at; | ||
protected GHUser creator; | ||
|
||
|
||
GHDeployment wrap(GHRepository owner) { | ||
this.owner = owner; | ||
this.root = owner.root; | ||
if(creator != null) creator.wrapUp(root); | ||
return this; | ||
} | ||
public Date getCreatedAt() { | ||
return GitHub.parseDate(created_at); | ||
} | ||
|
||
public URL getUrl() { | ||
return GitHub.parseURL(url); | ||
} | ||
|
||
public URL getStatusesUrl() { | ||
return GitHub.parseURL(statuses_url); | ||
} | ||
|
||
public URL getRepositoryUrl() { | ||
return GitHub.parseURL(repository_url); | ||
} | ||
|
||
public GHUser getCreator() { | ||
return creator; | ||
} | ||
|
||
public Date getUpdatedAt() { | ||
return GitHub.parseDate(updated_at); | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
} |
21 changes: 20 additions & 1 deletion
21
src/main/java/org/kohsuke/github/GHDeploymentBuilder.java
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters