Skip to content

Commit 0a28687

Browse files
Gregory Pettwwong
authored andcommitted
Adding javadoc comments that were missing
1 parent 7deb119 commit 0a28687

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

src/main/java/org/kohsuke/github/GHCodeScanningAlertInstance.java

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
import java.util.Collections;
77
import java.util.List;
88

9+
/**
10+
* Code scanning alert instance for a repository
11+
*
12+
* <a href="https://docs.github.com/en/rest/reference/code-scanning"></a>
13+
*/
914
public class GHCodeScanningAlertInstance {
1015
private String ref;
1116
private String analysis_key;
@@ -16,34 +21,74 @@ public class GHCodeScanningAlertInstance {
1621
private Message message;
1722
private Location location;
1823

24+
/**
25+
* Ref that the alert instance was triggered on
26+
*
27+
* @return ref of the alert instance
28+
*/
1929
public String getRef() {
2030
return ref;
2131
}
2232

33+
/**
34+
* Analysis key of the alert instance
35+
*
36+
* @return the analysis key
37+
*/
2338
public String getAnalysisKey() {
2439
return analysis_key;
2540
}
2641

42+
/**
43+
* Environment the alert instance was triggered in
44+
*
45+
* @return the environment
46+
*/
2747
public String getEnvironment() {
2848
return environment;
2949
}
3050

51+
/**
52+
* State of alert instance
53+
*
54+
* @return the state
55+
*/
3156
public GHCodeScanningAlertState getState() {
3257
return state;
3358
}
3459

60+
/**
61+
* Commit Sha that triggered the alert instance
62+
*
63+
* @return the commit sha
64+
*/
3565
public String getCommitSha() {
3666
return commit_sha;
3767
}
3868

69+
/**
70+
* Classifications of the alert instance
71+
*
72+
* @return the list of classifications
73+
*/
3974
public List<String> getClassifications() {
4075
return Collections.unmodifiableList(Arrays.asList(classifications));
4176
}
4277

78+
/**
79+
* Message object associated with the alert instance
80+
*
81+
* @return the message object
82+
*/
4383
public Message getMessage() {
4484
return message;
4585
}
4686

87+
/**
88+
* Location of the alert instance (contains path, start_line, end_line, start_column, and end_column attributes)
89+
*
90+
* @return the location
91+
*/
4792
public Location getLocation() {
4893
return location;
4994
}

src/main/java/org/kohsuke/github/GHCodeScanningAlertInstancesIterable.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
import javax.annotation.Nonnull;
66

7+
/**
8+
* Iterable for github code scanning instances.
9+
*/
710
public class GHCodeScanningAlertInstancesIterable extends PagedIterable<GHCodeScanningAlertInstance> {
811
private final GHCodeScanningAlert owner;
912
private final GitHubRequest request;
@@ -23,6 +26,13 @@ public PagedIterator<GHCodeScanningAlertInstance> _iterator(int pageSize) {
2326
null);
2427
}
2528

29+
/**
30+
* Adapts {@link Iterator}.
31+
*
32+
* @param base
33+
* the base
34+
* @return the iterator
35+
*/
2636
protected Iterator<GHCodeScanningAlertInstance[]> adapt(final Iterator<GHCodeScanningAlertInstance[]> base) {
2737
return new Iterator<GHCodeScanningAlertInstance[]>() {
2838
public boolean hasNext() {
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
package org.kohsuke.github;
22

3+
/**
4+
* What is the current state of the Alert
5+
*/
36
public enum GHCodeScanningAlertState {
4-
OPEN, FIXED, DISMISSED
7+
/**
8+
* Alert is open and still an active issue.
9+
*/
10+
OPEN,
11+
/**
12+
* Issue that has caused the alert has been addressed.
13+
*/
14+
FIXED,
15+
/**
16+
* Alert has been dismissed by a user without being fixed.
17+
*/
18+
DISMISSED
519
}

0 commit comments

Comments
 (0)