Skip to content

Commit 19ba058

Browse files
committed
Merge branch 'release/v1.x' into release/v1.x-unbridged
2 parents bfa107f + b6fcb9c commit 19ba058

File tree

193 files changed

+2325
-426
lines changed

Some content is hidden

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

193 files changed

+2325
-426
lines changed

.github/workflows/maven-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ jobs:
5757
- name: Maven Site
5858
env:
5959
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
60-
run: mvn -B clean site -D enable-ci --file pom.xml
60+
# running install site seems to more closely imitate real site deployment,
61+
# more likely to prevent failed deployment
62+
run: mvn -B clean install site -DskipTests --file pom.xml
6163
test:
6264
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
6365
# Does not require build output, but orders execution to prevent launching test workflows when simple build fails
@@ -144,7 +146,7 @@ jobs:
144146
- name: Set up JDK
145147
uses: actions/setup-java@v4
146148
with:
147-
java-version: 8
149+
java-version: 11
148150
distribution: 'temurin'
149151
cache: 'maven'
150152
- name: Maven Test (no build) Java 11

.github/workflows/publish_release_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
publish_gh_pages:
6060
runs-on: ubuntu-latest
6161
needs: build
62-
if: ${{ github.ref == 'refs/heads/release/v1.x' }}
62+
if: ${{ github.ref == 'refs/heads/release/v2.x' }}
6363
steps:
6464
- uses: actions/checkout@v4
6565
with:

pom.xml

Lines changed: 17 additions & 11 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-unbridged</artifactId>
5-
<version>1.325</version>
5+
<version>1.326</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>
@@ -34,7 +34,7 @@
3434
<properties>
3535
<spring.boot.version>3.3.3</spring.boot.version>
3636
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37-
<spotbugs-maven-plugin.version>4.8.6.1</spotbugs-maven-plugin.version>
37+
<spotbugs-maven-plugin.version>4.8.6.3</spotbugs-maven-plugin.version>
3838
<spotbugs.version>4.8.6</spotbugs.version>
3939
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
4040
<hamcrest.version>3.0</hamcrest.version>
@@ -94,7 +94,7 @@
9494
</plugin>
9595
<plugin>
9696
<artifactId>maven-surefire-plugin</artifactId>
97-
<version>3.2.3</version>
97+
<version>3.5.0</version>
9898
<configuration>
9999
<!-- SUREFIRE-1226 workaround -->
100100
<trimStackTrace>false</trimStackTrace>
@@ -108,7 +108,7 @@
108108
<plugin>
109109
<groupId>org.apache.maven.plugins</groupId>
110110
<artifactId>maven-gpg-plugin</artifactId>
111-
<version>3.2.4</version>
111+
<version>3.2.6</version>
112112
</plugin>
113113
<plugin>
114114
<groupId>org.jacoco</groupId>
@@ -226,7 +226,7 @@
226226
<plugin>
227227
<groupId>org.apache.maven.plugins</groupId>
228228
<artifactId>maven-javadoc-plugin</artifactId>
229-
<version>3.8.0</version>
229+
<version>3.10.0</version>
230230
<configuration>
231231
<release>8</release>
232232
<failOnWarnings>true</failOnWarnings>
@@ -250,7 +250,7 @@
250250
<!--
251251
This plugin is used to generate AOT metadata during tests so that it can be
252252
compared against those in META-INF/native-image/org.kohsuke/github-api/*.
253-
The tests are located in src/test/java/org.kohsuke.aot
253+
The tests are start with the name "Aot..."
254254
-->
255255
<plugin>
256256
<groupId>org.springframework.boot</groupId>
@@ -293,7 +293,7 @@
293293
<dependency>
294294
<groupId>org.apache.bcel</groupId>
295295
<artifactId>bcel</artifactId>
296-
<version>6.9.0</version>
296+
<version>6.10.0</version>
297297
</dependency>
298298
</dependencies>
299299
</plugin>
@@ -427,10 +427,16 @@
427427
<plugin>
428428
<groupId>com.github.siom79.japicmp</groupId>
429429
<artifactId>japicmp-maven-plugin</artifactId>
430-
<version>0.17.2</version>
430+
<version>0.23.0</version>
431431
<configuration>
432-
<!-- Disabled until 1.318 unbridged is published -->
433-
<skip>true</skip>
432+
<oldVersion>
433+
<dependency>
434+
<groupId>${project.groupId}</groupId>
435+
<artifactId>${project.artifactId}</artifactId>
436+
<version>1.325</version>
437+
<type>jar</type>
438+
</dependency>
439+
</oldVersion>
434440
<parameter>
435441
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
436442
<onlyModified>true</onlyModified>
@@ -471,7 +477,7 @@
471477
<dependency>
472478
<groupId>org.apache.commons</groupId>
473479
<artifactId>commons-lang3</artifactId>
474-
<version>3.14.0</version>
480+
<version>3.17.0</version>
475481
</dependency>
476482
<dependency>
477483
<groupId>com.tngtech.archunit</groupId>

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

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

10-
// TODO: Auto-generated Javadoc
1110
/**
1211
* An abstract data object builder/updater.
1312
*
@@ -42,7 +41,7 @@
4241
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
4342
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
4443
*/
45-
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
44+
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject implements GitHubRequestBuilderDone<R> {
4645

4746
@Nonnull
4847
private final Class<R> returnType;
@@ -58,9 +57,9 @@ abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
5857

5958
// TODO: Not sure how update-in-place behavior should be controlled
6059
// However, it certainly can be controlled dynamically down to the instance level or inherited for all children of
61-
// some
60+
// some connection.
61+
6262
/** The update in place. */
63-
// connection.
6463
protected boolean updateInPlace;
6564

6665
/**
@@ -96,14 +95,9 @@ protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
9695
}
9796

9897
/**
99-
* Finishes an update, committing changes.
100-
*
101-
* This method may update-in-place or not. Either way it returns the resulting instance.
102-
*
103-
* @return an instance with updated current data
104-
* @throws IOException
105-
* if there is an I/O Exception
98+
* {@inheritDoc}
10699
*/
100+
@Override
107101
@Nonnull
108102
@BetaApi
109103
public R done() throws IOException {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
@Deprecated
2626
public abstract class AbuseLimitHandler extends GitHubAbuseLimitHandler {
2727

28+
/**
29+
* Create default AbuseLimitHandler instance
30+
*/
31+
public AbuseLimitHandler() {
32+
}
33+
2834
/**
2935
* Called when the library encounters HTTP error indicating that the API abuse limit is reached.
3036
*
@@ -102,6 +108,9 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException {
102108
}
103109
};
104110

111+
// If "Retry-After" missing, wait for unambiguously over one minute per GitHub guidance
112+
static long DEFAULT_WAIT_MILLIS = 61 * 1000;
113+
105114
/*
106115
* Exposed for testability. Given an http response, find the retry-after header field and parse it as either a
107116
* number or a date (the spec allows both). If no header is found, wait for a reasonably amount of time.
@@ -110,7 +119,7 @@ long parseWaitTime(HttpURLConnection uc) {
110119
String v = uc.getHeaderField("Retry-After");
111120
if (v == null) {
112121
// can't tell, wait for unambiguously over one minute per GitHub guidance
113-
return 61 * 1000;
122+
return DEFAULT_WAIT_MILLIS;
114123
}
115124

116125
try {

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
*/
2121
public class GHApp extends GHObject {
2222

23+
/**
24+
* Create default GHApp instance
25+
*/
26+
public GHApp() {
27+
}
28+
2329
private GHUser owner;
2430
private String name;
2531
private String slug;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
*/
99
public class GHAppFromManifest extends GHApp {
1010

11+
/**
12+
* Create default GHAppFromManifest instance
13+
*/
14+
public GHAppFromManifest() {
15+
}
16+
1117
private String clientId;
1218
private String clientSecret;
1319
private String webhookSecret;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
* @see GHApp#getInstallationByUser(String) GHApp#getInstallationByUser(String)
2525
*/
2626
public class GHAppInstallation extends GHObject {
27+
28+
/**
29+
* Create default GHAppInstallation instance
30+
*/
31+
public GHAppInstallation() {
32+
}
33+
2734
private GHUser account;
2835

2936
@JsonProperty("access_tokens_url")

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
* @see GHAppInstallation#createToken(Map) GHAppInstallation#createToken(Map)
1515
*/
1616
public class GHAppInstallationToken extends GitHubInteractiveObject {
17+
18+
/**
19+
* Create default GHAppInstallationToken instance
20+
*/
21+
public GHAppInstallationToken() {
22+
}
23+
1724
private String token;
1825

1926
/** The expires at. */

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
*/
2121
public class GHArtifact extends GHObject {
2222

23+
/**
24+
* Create default GHArtifact instance
25+
*/
26+
public GHArtifact() {
27+
}
28+
2329
// Not provided by the API.
2430
@JsonIgnore
2531
private GHRepository owner;

0 commit comments

Comments
 (0)