forked from hub4j/github-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGHCommitStatus.java
More file actions
81 lines (73 loc) · 1.78 KB
/
Copy pathGHCommitStatus.java
File metadata and controls
81 lines (73 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package org.kohsuke.github;
import java.io.IOException;
import java.net.URL;
/**
* Represents a status of a commit.
*
* @author Kohsuke Kawaguchi
* @see GHRepository#getLastCommitStatus(String) GHRepository#getLastCommitStatus(String)
* @see GHCommit#getLastStatus() GHCommit#getLastStatus()
* @see GHRepository#createCommitStatus(String, GHCommitState, String, String) GHRepository#createCommitStatus(String,
* GHCommitState, String, String)
*/
public class GHCommitStatus extends GHObject {
String state;
String target_url, description;
String context;
GHUser creator;
/**
* Gets state.
*
* @return the state
*/
public GHCommitState getState() {
for (GHCommitState s : GHCommitState.values()) {
if (s.name().equalsIgnoreCase(state))
return s;
}
throw new IllegalStateException("Unexpected state: " + state);
}
/**
* The URL that this status is linked to.
* <p>
* This is the URL specified when creating a commit status.
*
* @return the target url
*/
public String getTargetUrl() {
return target_url;
}
/**
* Gets description.
*
* @return the description
*/
public String getDescription() {
return description;
}
/**
* Gets creator.
*
* @return the creator
* @throws IOException
* the io exception
*/
public GHUser getCreator() throws IOException {
return root().intern(creator);
}
/**
* Gets context.
*
* @return the context
*/
public String getContext() {
return context;
}
/**
* @deprecated This object has no HTML URL.
*/
@Override
public URL getHtmlUrl() {
return null;
}
}