Skip to content

Commit 29799cd

Browse files
committed
Fix errors
1 parent 4c6c312 commit 29799cd

File tree

201 files changed

+3999
-740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+3999
-740
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
<source>8</source>
219219
<failOnWarnings>true</failOnWarnings>
220220
<doclint>all</doclint>
221+
<show>protected</show>
221222
</configuration>
222223
</plugin>
223224
<plugin>

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

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@
55
import javax.annotation.CheckForNull;
66
import javax.annotation.Nonnull;
77

8+
// TODO: Auto-generated Javadoc
89
/**
910
* An abstract data object builder/updater.
10-
*
11+
*
1112
* This class can be use to make a Builder that supports both batch and single property changes.
1213
* <p>
1314
* Batching looks like this:
1415
* </p>
15-
*
16+
*
1617
* <pre>
1718
* update().someName(value).otherName(value).done()
1819
* </pre>
1920
* <p>
2021
* Single changes look like this:
2122
* </p>
22-
*
23+
*
2324
* <pre>
2425
* set().someName(value);
2526
* set().otherName(value);
@@ -32,13 +33,10 @@
3233
* If {@link S} is not the same as {@link R}, {@link #with(String, Object)} will batch together multiple changes and let
3334
* the user call {@link #done()} when they are ready.
3435
*
35-
* @param <R>
36-
* Final return type built by this builder returned when {@link #done()}} is called.
37-
* @param <S>
38-
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
39-
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
40-
*
4136
* @author Liam Newman
37+
* @param <R> Final return type built by this builder returned when {@link #done()}} is called.
38+
* @param <S> Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
39+
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
4240
*/
4341
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
4442

@@ -50,28 +48,26 @@ abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
5048
@CheckForNull
5149
private final R baseInstance;
5250

51+
/** The requester. */
5352
@Nonnull
5453
protected final Requester requester;
5554

5655
// TODO: Not sure how update-in-place behavior should be controlled
5756
// However, it certainly can be controlled dynamically down to the instance level or inherited for all children of
5857
// some
58+
/** The update in place. */
5959
// connection.
6060
protected boolean updateInPlace;
6161

6262
/**
6363
* Creates a builder.
6464
*
65-
* @param root
66-
* the GitHub instance to connect to.
67-
* @param intermediateReturnType
68-
* the intermediate return type of type {@link S} returned by calls to {@link #with(String, Object)}.
65+
* @param finalReturnType the final return type for built by this builder returned when {@link #done()}} is called.
66+
* @param intermediateReturnType the intermediate return type of type {@link S} returned by calls to {@link #with(String, Object)}.
6967
* Must either be equal to {@code builtReturnType} or this instance must be castable to this class. If
7068
* not, the constructor will throw {@link IllegalArgumentException}.
71-
* @param finalReturnType
72-
* the final return type for built by this builder returned when {@link #done()}} is called.
73-
* @param baseInstance
74-
* optional instance on which to base this builder.
69+
* @param root the GitHub instance to connect to.
70+
* @param baseInstance optional instance on which to base this builder.
7571
*/
7672
protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
7773
@Nonnull Class<S> intermediateReturnType,

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,27 @@
22

33
import java.util.Locale;
44

5+
// TODO: Auto-generated Javadoc
56
/**
67
* This was added during preview API period but it has changed since then.
78
*
89
* @author Kohsuke Kawaguchi
910
*/
1011
@Deprecated
1112
public enum EnforcementLevel {
12-
OFF, NON_ADMINS, EVERYONE;
13+
14+
/** The off. */
15+
OFF,
16+
/** The non admins. */
17+
NON_ADMINS,
18+
/** The everyone. */
19+
EVERYONE;
1320

21+
/**
22+
* To string.
23+
*
24+
* @return the string
25+
*/
1426
public String toString() {
1527
return name().toLowerCase(Locale.ENGLISH);
1628
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
1414

15+
// TODO: Auto-generated Javadoc
1516
/**
1617
* A Github App.
1718
*
@@ -168,6 +169,11 @@ public void setInstallationsCount(long installationsCount) {
168169
throw new RuntimeException("Do not use this method.");
169170
}
170171

172+
/**
173+
* Gets the html url.
174+
*
175+
* @return the html url
176+
*/
171177
public URL getHtmlUrl() {
172178
return GitHubClient.parseURL(htmlUrl);
173179
}

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,40 @@
77

88
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
99

10+
// TODO: Auto-generated Javadoc
1011
/**
11-
* Creates a access token for a GitHub App Installation
12+
* Creates a access token for a GitHub App Installation.
1213
*
1314
* @author Paulo Miguel Almeida
1415
* @see GHAppInstallation#createToken(Map) GHAppInstallation#createToken(Map)
1516
* @see GHAppInstallation#createToken() GHAppInstallation#createToken()
1617
*/
1718
public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
19+
20+
/** The builder. */
1821
protected final Requester builder;
1922
private final String apiUrlTail;
2023

24+
/**
25+
* Instantiates a new GH app create token builder.
26+
*
27+
* @param root the root
28+
* @param apiUrlTail the api url tail
29+
*/
2130
@BetaApi
2231
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail) {
2332
super(root);
2433
this.apiUrlTail = apiUrlTail;
2534
this.builder = root.createRequest();
2635
}
2736

37+
/**
38+
* Instantiates a new GH app create token builder.
39+
*
40+
* @param root the root
41+
* @param apiUrlTail the api url tail
42+
* @param permissions the permissions
43+
*/
2844
@BetaApi
2945
GHAppCreateTokenBuilder(GitHub root, String apiUrlTail, Map<String, GHPermissionType> permissions) {
3046
this(root, apiUrlTail);

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import static org.kohsuke.github.internal.Previews.GAMBIT;
1515
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
1616

17+
// TODO: Auto-generated Javadoc
1718
/**
1819
* A Github App Installation.
1920
*
@@ -45,6 +46,11 @@ public class GHAppInstallation extends GHObject {
4546
private GHRepositorySelection repositorySelection;
4647
private String htmlUrl;
4748

49+
/**
50+
* Gets the html url.
51+
*
52+
* @return the html url
53+
*/
4854
public URL getHtmlUrl() {
4955
return GitHubClient.parseURL(htmlUrl);
5056
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.io.IOException;
77
import java.util.*;
88

9+
// TODO: Auto-generated Javadoc
910
/**
1011
* A Github App Installation Token.
1112
*
@@ -14,6 +15,8 @@
1415
*/
1516
public class GHAppInstallationToken extends GitHubInteractiveObject {
1617
private String token;
18+
19+
/** The expires at. */
1720
protected String expires_at;
1821
private Map<String, String> permissions;
1922
private List<GHRepository> repositories;

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,32 @@
44

55
import javax.annotation.Nonnull;
66

7+
// TODO: Auto-generated Javadoc
78
/**
89
* Iterable for GHAppInstallation listing.
910
*/
1011
class GHAppInstallationsIterable extends PagedIterable<GHAppInstallation> {
12+
13+
/** The Constant APP_INSTALLATIONS_URL. */
1114
public static final String APP_INSTALLATIONS_URL = "/user/installations";
1215
private final transient GitHub root;
1316
private GHAppInstallationsPage result;
1417

18+
/**
19+
* Instantiates a new GH app installations iterable.
20+
*
21+
* @param root the root
22+
*/
1523
public GHAppInstallationsIterable(GitHub root) {
1624
this.root = root;
1725
}
1826

27+
/**
28+
* Iterator.
29+
*
30+
* @param pageSize the page size
31+
* @return the paged iterator
32+
*/
1933
@Nonnull
2034
@Override
2135
public PagedIterator<GHAppInstallation> _iterator(int pageSize) {
@@ -25,6 +39,12 @@ public PagedIterator<GHAppInstallation> _iterator(int pageSize) {
2539
null);
2640
}
2741

42+
/**
43+
* Adapt.
44+
*
45+
* @param base the base
46+
* @return the iterator
47+
*/
2848
protected Iterator<GHAppInstallation[]> adapt(final Iterator<GHAppInstallationsPage> base) {
2949
return new Iterator<GHAppInstallation[]>() {
3050
public boolean hasNext() {

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
package org.kohsuke.github;
22

3+
// TODO: Auto-generated Javadoc
34
/**
45
* Represents the one page of GHAppInstallations.
56
*/
67
class GHAppInstallationsPage {
78
private int total_count;
89
private GHAppInstallation[] installations;
910

11+
/**
12+
* Gets the total count.
13+
*
14+
* @return the total count
15+
*/
1016
public int getTotalCount() {
1117
return total_count;
1218
}
1319

20+
/**
21+
* Gets the installations.
22+
*
23+
* @return the installations
24+
*/
1425
GHAppInstallation[] getInstallations() {
1526
return installations;
1627
}

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import static java.util.Objects.requireNonNull;
1414

15+
// TODO: Auto-generated Javadoc
1516
/**
1617
* An artifact from a workflow run.
1718
*
@@ -85,6 +86,10 @@ public GHRepository getRepository() {
8586
}
8687

8788
/**
89+
* Gets the html url.
90+
*
91+
* @return the html url
92+
* @throws IOException Signals that an I/O exception has occurred.
8893
* @deprecated This object has no HTML URL.
8994
*/
9095
@Override
@@ -105,13 +110,10 @@ public void delete() throws IOException {
105110
/**
106111
* Downloads the artifact.
107112
*
108-
* @param <T>
109-
* the type of result
110-
* @param streamFunction
111-
* The {@link InputStreamFunction} that will process the stream
112-
* @throws IOException
113-
* The IO exception.
113+
* @param <T> the type of result
114+
* @param streamFunction The {@link InputStreamFunction} that will process the stream
114115
* @return the result of reading the stream.
116+
* @throws IOException The IO exception.
115117
*/
116118
public <T> T download(InputStreamFunction<T> streamFunction) throws IOException {
117119
requireNonNull(streamFunction, "Stream function must not be null");
@@ -128,6 +130,12 @@ private String getApiRoute() {
128130
return "/repos/" + owner.getOwnerName() + "/" + owner.getName() + "/actions/artifacts/" + getId();
129131
}
130132

133+
/**
134+
* Wrap up.
135+
*
136+
* @param owner the owner
137+
* @return the GH artifact
138+
*/
131139
GHArtifact wrapUp(GHRepository owner) {
132140
this.owner = owner;
133141
return this;

0 commit comments

Comments
 (0)