Skip to content

Commit 0b185f2

Browse files
authored
Merge branch 'main' into issue/enhance-pull-request-comment-model
2 parents 8494720 + 24832b1 commit 0b185f2

564 files changed

Lines changed: 29732 additions & 1552 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "maven"
4-
directory: "/"
5-
schedule:
6-
interval: "monthly"
7-
time: "02:00"
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
schedule:
11-
interval: "monthly"
12-
time: "02:00"
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
rebase-strategy: "disabled"
6+
schedule:
7+
interval: "monthly"
8+
time: "02:00"
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
rebase-strategy: "disabled"
12+
schedule:
13+
interval: "monthly"
14+
time: "02:00"

.github/workflows/maven-build.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/setup-java@v3
3232
with:
3333
java-version: ${{ matrix.java }}
34-
distribution: 'zulu'
34+
distribution: 'temurin'
3535
cache: 'maven'
3636
- name: Maven Install (skipTests)
3737
env:
@@ -43,16 +43,18 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
java: [ 11 ]
46+
java: [ 17 ]
4747
steps:
4848
- uses: actions/checkout@v3
4949
- name: Set up JDK
5050
uses: actions/setup-java@v3
5151
with:
5252
java-version: ${{ matrix.java }}
53-
distribution: 'adopt'
53+
distribution: 'temurin'
5454
cache: 'maven'
5555
- name: Maven Site
56+
env:
57+
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
5658
run: mvn -B clean site -D enable-ci --file pom.xml
5759
test-8:
5860
name: test (${{ matrix.os }}, Java 8)
@@ -68,13 +70,13 @@ jobs:
6870
uses: actions/setup-java@v3
6971
with:
7072
java-version: ${{ matrix.java }}
71-
distribution: 'zulu'
73+
distribution: 'temurin'
7274
cache: 'maven'
7375
# JDK 8
7476
- name: Maven Install with Code Coverage
7577
run: mvn -B clean install -D enable-ci -Djapicmp.skip --file pom.xml
7678
- name: Codecov Report
77-
uses: codecov/[email protected].0
79+
uses: codecov/[email protected].1
7880
test:
7981
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
8082
runs-on: ${{ matrix.os }}-latest
@@ -89,7 +91,7 @@ jobs:
8991
uses: actions/setup-java@v3
9092
with:
9193
java-version: ${{ matrix.java }}
92-
distribution: 'zulu'
94+
distribution: 'temurin'
9395
cache: 'maven'
9496
# JDK 11+
9597
- name: Maven Install without Code Coverage

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ When modifying existing tests, you can change the stubbed WireMock data files by
8282
#### Manual editing of data (minor changes only)
8383

8484
If you know what data will change, it is sometimes simplest to make any required changes to the data files manually.
85-
This can be easier if the changes are minor or when you development environment is not setup to to take updated snapshots.
85+
This can be easier if the changes are minor or when you development environment is not setup to take updated snapshots.
8686

8787
#### Generating a new snapshot
8888

pom.xml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.kohsuke</groupId>
44
<artifactId>github-api</artifactId>
5-
<version>1.307-SNAPSHOT</version>
5+
<version>1.314-SNAPSHOT</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>
@@ -33,8 +33,8 @@
3333

3434
<properties>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<spotbugs-maven-plugin.version>4.7.0.0</spotbugs-maven-plugin.version>
37-
<spotbugs.version>4.6.0</spotbugs.version>
36+
<spotbugs-maven-plugin.version>4.7.3.0</spotbugs-maven-plugin.version>
37+
<spotbugs.version>4.7.3</spotbugs.version>
3838
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
3939
<hamcrest.version>2.2</hamcrest.version>
4040
<okhttp3.version>4.9.2</okhttp3.version>
@@ -213,9 +213,9 @@
213213
<plugin>
214214
<groupId>org.apache.maven.plugins</groupId>
215215
<artifactId>maven-javadoc-plugin</artifactId>
216-
<version>3.4.0</version>
216+
<version>3.4.1</version>
217217
<configuration>
218-
<source>8</source>
218+
<release>8</release>
219219
<failOnWarnings>true</failOnWarnings>
220220
<doclint>all</doclint>
221221
</configuration>
@@ -234,7 +234,7 @@
234234
<plugin>
235235
<groupId>org.codehaus.mojo</groupId>
236236
<artifactId>animal-sniffer-maven-plugin</artifactId>
237-
<version>1.21</version>
237+
<version>1.22</version>
238238
<configuration>
239239
<signature>
240240
<groupId>org.codehaus.mojo.signature</groupId>
@@ -258,7 +258,7 @@
258258
<plugin>
259259
<groupId>org.apache.maven.plugins</groupId>
260260
<artifactId>maven-site-plugin</artifactId>
261-
<version>3.12.0</version>
261+
<version>3.12.1</version>
262262
</plugin>
263263
<plugin>
264264
<groupId>org.apache.maven.plugins</groupId>
@@ -278,12 +278,12 @@
278278
<plugin>
279279
<groupId>org.apache.maven.plugins</groupId>
280280
<artifactId>maven-project-info-reports-plugin</artifactId>
281-
<version>3.3.0</version>
281+
<version>3.4.2</version>
282282
<dependencies>
283283
<dependency>
284284
<groupId>org.apache.bcel</groupId>
285285
<artifactId>bcel</artifactId>
286-
<version>6.5.0</version>
286+
<version>6.6.1</version>
287287
</dependency>
288288
</dependencies>
289289
</plugin>
@@ -333,7 +333,7 @@
333333
<plugin>
334334
<groupId>com.diffplug.spotless</groupId>
335335
<artifactId>spotless-maven-plugin</artifactId>
336-
<version>2.22.8</version>
336+
<version>2.27.2</version>
337337
<executions>
338338
<execution>
339339
<id>spotless-check</id>
@@ -396,7 +396,7 @@
396396
<plugin>
397397
<groupId>com.github.siom79.japicmp</groupId>
398398
<artifactId>japicmp-maven-plugin</artifactId>
399-
<version>0.15.7</version>
399+
<version>0.16.0</version>
400400
<configuration>
401401
<parameter>
402402
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
@@ -453,6 +453,12 @@
453453
<version>${hamcrest.version}</version>
454454
<scope>test</scope>
455455
</dependency>
456+
<dependency>
457+
<groupId>com.github.npathai</groupId>
458+
<artifactId>hamcrest-optional</artifactId>
459+
<version>2.0.0</version>
460+
<scope>test</scope>
461+
</dependency>
456462
<dependency>
457463
<groupId>junit</groupId>
458464
<artifactId>junit</artifactId>
@@ -468,7 +474,7 @@
468474
<dependency>
469475
<groupId>com.fasterxml.jackson.core</groupId>
470476
<artifactId>jackson-databind</artifactId>
471-
<version>2.13.3</version>
477+
<version>2.14.0</version>
472478
</dependency>
473479
<dependency>
474480
<groupId>commons-io</groupId>
@@ -485,7 +491,7 @@
485491
<dependency>
486492
<groupId>commons-fileupload</groupId>
487493
<artifactId>commons-fileupload</artifactId>
488-
<version>1.4</version>
494+
<version>1.5</version>
489495
<scope>test</scope>
490496
</dependency>
491497
<!-- for stapler-jetty -->
@@ -511,7 +517,7 @@
511517
<dependency>
512518
<groupId>org.eclipse.jgit</groupId>
513519
<artifactId>org.eclipse.jgit</artifactId>
514-
<version>6.1.0.202203080745-r</version>
520+
<version>6.4.0.202211300538-r</version>
515521
<scope>test</scope>
516522
</dependency>
517523
<dependency>
@@ -567,7 +573,7 @@
567573
<dependency>
568574
<groupId>org.mockito</groupId>
569575
<artifactId>mockito-core</artifactId>
570-
<version>4.6.1</version>
576+
<version>4.11.0</version>
571577
<scope>test</scope>
572578
</dependency>
573579
<dependency>
@@ -579,19 +585,19 @@
579585
<dependency>
580586
<groupId>com.github.tomakehurst</groupId>
581587
<artifactId>wiremock-jre8-standalone</artifactId>
582-
<version>2.32.0</version>
588+
<version>2.35.0</version>
583589
<scope>test</scope>
584590
</dependency>
585591
<dependency>
586592
<groupId>com.google.code.gson</groupId>
587593
<artifactId>gson</artifactId>
588-
<version>2.9.0</version>
594+
<version>2.10</version>
589595
<scope>test</scope>
590596
</dependency>
591597
<dependency>
592598
<groupId>org.slf4j</groupId>
593599
<artifactId>slf4j-simple</artifactId>
594-
<version>1.7.36</version>
600+
<version>2.0.3</version>
595601
<scope>test</scope>
596602
</dependency>
597603
</dependencies>
@@ -817,7 +823,7 @@
817823
<plugin>
818824
<groupId>org.apache.maven.plugins</groupId>
819825
<artifactId>maven-jar-plugin</artifactId>
820-
<version>3.2.2</version>
826+
<version>3.3.0</version>
821827
<configuration>
822828
<archive>
823829
<manifestEntries>

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import javax.annotation.CheckForNull;
66
import javax.annotation.Nonnull;
77

8+
// TODO: Auto-generated Javadoc
89
/**
910
* An abstract data object builder/updater.
1011
*
@@ -32,13 +33,12 @@
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
*
36+
* @author Liam Newman
3537
* @param <R>
3638
* Final return type built by this builder returned when {@link #done()}} is called.
3739
* @param <S>
3840
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
3941
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
40-
*
41-
* @author Liam Newman
4242
*/
4343
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
4444

@@ -50,26 +50,28 @@ abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
5050
@CheckForNull
5151
private final R baseInstance;
5252

53+
/** The requester. */
5354
@Nonnull
5455
protected final Requester requester;
5556

5657
// TODO: Not sure how update-in-place behavior should be controlled
5758
// However, it certainly can be controlled dynamically down to the instance level or inherited for all children of
5859
// some
60+
/** The update in place. */
5961
// connection.
6062
protected boolean updateInPlace;
6163

6264
/**
6365
* Creates a builder.
6466
*
65-
* @param root
66-
* the GitHub instance to connect to.
67+
* @param finalReturnType
68+
* the final return type for built by this builder returned when {@link #done()}} is called.
6769
* @param intermediateReturnType
6870
* the intermediate return type of type {@link S} returned by calls to {@link #with(String, Object)}.
6971
* Must either be equal to {@code builtReturnType} or this instance must be castable to this class. If
7072
* 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 root
74+
* the GitHub instance to connect to.
7375
* @param baseInstance
7476
* optional instance on which to base this builder.
7577
*/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import javax.annotation.Nonnull;
1010

11+
// TODO: Auto-generated Javadoc
1112
/**
1213
* Pluggable strategy to determine what to do when the API abuse limit is hit.
1314
*

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;
1313

14+
/** The off. */
15+
OFF,
16+
/** The non admins. */
17+
NON_ADMINS,
18+
/** The everyone. */
19+
EVERYONE;
20+
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: 16 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
*
@@ -22,6 +23,7 @@ public class GHApp extends GHObject {
2223

2324
private GHUser owner;
2425
private String name;
26+
private String slug;
2527
private String description;
2628
private String externalUrl;
2729
private Map<String, String> permissions;
@@ -60,6 +62,15 @@ public String getName() {
6062
return name;
6163
}
6264

65+
/**
66+
* Gets the slug name of the GitHub app.
67+
*
68+
* @return the slug name of the GitHub app
69+
*/
70+
public String getSlug() {
71+
return slug;
72+
}
73+
6374
/**
6475
* Sets name.
6576
*
@@ -158,6 +169,11 @@ public void setInstallationsCount(long installationsCount) {
158169
throw new RuntimeException("Do not use this method.");
159170
}
160171

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

0 commit comments

Comments
 (0)