Skip to content

Commit

Permalink
Merge tag 'github-api-2.0.0-alpha-2' into release/v2.x
Browse files Browse the repository at this point in the history
github-api-2.0.0-alpha-2
  • Loading branch information
bitwiseman committed Sep 17, 2024
2 parents 0d3de03 + f4a0d34 commit f26f9bc
Show file tree
Hide file tree
Showing 179 changed files with 1,885 additions and 42 deletions.
4 changes: 3 additions & 1 deletion .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
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: 19 additions & 9 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</artifactId>
<version>2.0.0-alpha-1</version>
<version>2.0.0-alpha-2</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 @@ -86,7 +86,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 @@ -100,7 +100,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 @@ -202,8 +202,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<version>3.10.0</version>
<configuration>
<source>11</source>
<release>11</release>
<failOnWarnings>true</failOnWarnings>
<doclint>all</doclint>
Expand Down Expand Up @@ -269,7 +270,7 @@
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.9.0</version>
<version>6.10.0</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -279,6 +280,7 @@
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.jenkins-ci</groupId>
Expand Down Expand Up @@ -379,10 +381,18 @@
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.21.2</version>
<version>0.23.0</version>
<configuration>
<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>2.0.0-alpha-1</version>
<type>jar</type>
</dependency>
</oldVersion>
<parameter>
<!-- <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> -->
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> -->
<!-- <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning> -->
<onlyModified>true</onlyModified>
<includeSynthetic>true</includeSynthetic>
Expand Down Expand Up @@ -420,7 +430,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
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 @@ -11,6 +11,13 @@
* @see GHAppInstallation#createToken() GHAppInstallation#createToken()
*/
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 @@ -12,6 +12,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 @@ -48,6 +48,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 f26f9bc

Please sign in to comment.