Skip to content

Commit

Permalink
Merge branch 'release/v1.x' into release/v1.x-unbridged
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman committed Sep 17, 2024
2 parents bfa107f + b6fcb9c commit 19ba058
Show file tree
Hide file tree
Showing 193 changed files with 2,325 additions and 426 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
- name: Maven Site
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean site -D enable-ci --file pom.xml
# running install site seems to more closely imitate real site deployment,
# more likely to prevent failed deployment
run: mvn -B clean install site -DskipTests --file pom.xml
test:
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
# Does not require build output, but orders execution to prevent launching test workflows when simple build fails
Expand Down Expand Up @@ -144,7 +146,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
java-version: 11
distribution: 'temurin'
cache: 'maven'
- name: Maven Test (no build) Java 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
publish_gh_pages:
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref == 'refs/heads/release/v1.x' }}
if: ${{ github.ref == 'refs/heads/release/v2.x' }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
28 changes: 17 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.kohsuke</groupId>
<artifactId>github-api-unbridged</artifactId>
<version>1.325</version>
<version>1.326</version>
<name>GitHub API for Java</name>
<url>https://github-api.kohsuke.org/</url>
<description>GitHub API for Java</description>
Expand Down Expand Up @@ -34,7 +34,7 @@
<properties>
<spring.boot.version>3.3.3</spring.boot.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs-maven-plugin.version>4.8.6.1</spotbugs-maven-plugin.version>
<spotbugs-maven-plugin.version>4.8.6.3</spotbugs-maven-plugin.version>
<spotbugs.version>4.8.6</spotbugs.version>
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
<hamcrest.version>3.0</hamcrest.version>
Expand Down Expand Up @@ -94,7 +94,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.3</version>
<version>3.5.0</version>
<configuration>
<!-- SUREFIRE-1226 workaround -->
<trimStackTrace>false</trimStackTrace>
Expand All @@ -108,7 +108,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<version>3.2.6</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down Expand Up @@ -226,7 +226,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<version>3.10.0</version>
<configuration>
<release>8</release>
<failOnWarnings>true</failOnWarnings>
Expand All @@ -250,7 +250,7 @@
<!--
This plugin is used to generate AOT metadata during tests so that it can be
compared against those in META-INF/native-image/org.kohsuke/github-api/*.
The tests are located in src/test/java/org.kohsuke.aot
The tests are start with the name "Aot..."
-->
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -293,7 +293,7 @@
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.9.0</version>
<version>6.10.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -427,10 +427,16 @@
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.17.2</version>
<version>0.23.0</version>
<configuration>
<!-- Disabled until 1.318 unbridged is published -->
<skip>true</skip>
<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>1.325</version>
<type>jar</type>
</dependency>
</oldVersion>
<parameter>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<onlyModified>true</onlyModified>
Expand Down Expand Up @@ -471,7 +477,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
Expand Down
16 changes: 5 additions & 11 deletions src/main/java/org/kohsuke/github/AbstractBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

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

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

// TODO: Not sure how update-in-place behavior should be controlled
// However, it certainly can be controlled dynamically down to the instance level or inherited for all children of
// some
// some connection.

/** The update in place. */
// connection.
protected boolean updateInPlace;

/**
Expand Down Expand Up @@ -96,14 +95,9 @@ protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
}

/**
* Finishes an update, committing changes.
*
* This method may update-in-place or not. Either way it returns the resulting instance.
*
* @return an instance with updated current data
* @throws IOException
* if there is an I/O Exception
* {@inheritDoc}
*/
@Override
@Nonnull
@BetaApi
public R done() throws IOException {
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/org/kohsuke/github/AbuseLimitHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
@Deprecated
public abstract class AbuseLimitHandler extends GitHubAbuseLimitHandler {

/**
* Create default AbuseLimitHandler instance
*/
public AbuseLimitHandler() {
}

/**
* Called when the library encounters HTTP error indicating that the API abuse limit is reached.
*
Expand Down Expand Up @@ -102,6 +108,9 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException {
}
};

// If "Retry-After" missing, wait for unambiguously over one minute per GitHub guidance
static long DEFAULT_WAIT_MILLIS = 61 * 1000;

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

try {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
*/
public class GHApp extends GHObject {

/**
* Create default GHApp instance
*/
public GHApp() {
}

private GHUser owner;
private String name;
private String slug;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHAppFromManifest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
*/
public class GHAppFromManifest extends GHApp {

/**
* Create default GHAppFromManifest instance
*/
public GHAppFromManifest() {
}

private String clientId;
private String clientSecret;
private String webhookSecret;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/kohsuke/github/GHAppInstallation.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
* @see GHApp#getInstallationByUser(String) GHApp#getInstallationByUser(String)
*/
public class GHAppInstallation extends GHObject {

/**
* Create default GHAppInstallation instance
*/
public GHAppInstallation() {
}

private GHUser account;

@JsonProperty("access_tokens_url")
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/kohsuke/github/GHAppInstallationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
* @see GHAppInstallation#createToken(Map) GHAppInstallation#createToken(Map)
*/
public class GHAppInstallationToken extends GitHubInteractiveObject {

/**
* Create default GHAppInstallationToken instance
*/
public GHAppInstallationToken() {
}

private String token;

/** The expires at. */
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHArtifact.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
*/
public class GHArtifact extends GHObject {

/**
* Create default GHArtifact instance
*/
public GHArtifact() {
}

// Not provided by the API.
@JsonIgnore
private GHRepository owner;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHAsset.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
*/
public class GHAsset extends GHObject {

/**
* Create default GHAsset instance
*/
public GHAsset() {
}

/** The owner. */
GHRepository owner;
private String name;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHAuthorization.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
*/
public class GHAuthorization extends GHObject {

/**
* Create default GHAuthorization instance
*/
public GHAuthorization() {
}

/** The Constant USER. */
public static final String USER = "user";

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/kohsuke/github/GHBlob.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
* @see <a href="https://developer.github.com/v3/git/blobs/#get-a-blob">Get a blob</a>
*/
public class GHBlob {

/**
* Create default GHBlob instance
*/
public GHBlob() {
}

private String content, encoding, url, sha;
private long size;

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/kohsuke/github/GHBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public class GHBranch extends GitHubInteractiveObject {
*/
public static class Commit {

/**
* Create default Commit instance
*/
public Commit() {
}

/** The sha. */
String sha;

Expand Down
Loading

0 comments on commit 19ba058

Please sign in to comment.