Skip to content

Commit

Permalink
Merge branch 'main' into issue/enhance-pull-request-comment-model
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman authored Feb 26, 2023
2 parents 8494720 + 24832b1 commit 0b185f2
Show file tree
Hide file tree
Showing 564 changed files with 29,732 additions and 1,552 deletions.
22 changes: 12 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "maven"
directory: "/"
rebase-strategy: "disabled"
schedule:
interval: "monthly"
time: "02:00"
- package-ecosystem: "github-actions"
directory: "/"
rebase-strategy: "disabled"
schedule:
interval: "monthly"
time: "02:00"
14 changes: 8 additions & 6 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
distribution: 'temurin'
cache: 'maven'
- name: Maven Install (skipTests)
env:
Expand All @@ -43,16 +43,18 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 11 ]
java: [ 17 ]
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
distribution: 'temurin'
cache: 'maven'
- name: Maven Site
env:
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
run: mvn -B clean site -D enable-ci --file pom.xml
test-8:
name: test (${{ matrix.os }}, Java 8)
Expand All @@ -68,13 +70,13 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
distribution: 'temurin'
cache: 'maven'
# JDK 8
- name: Maven Install with Code Coverage
run: mvn -B clean install -D enable-ci -Djapicmp.skip --file pom.xml
- name: Codecov Report
uses: codecov/[email protected].0
uses: codecov/[email protected].1
test:
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
runs-on: ${{ matrix.os }}-latest
Expand All @@ -89,7 +91,7 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
distribution: 'temurin'
cache: 'maven'
# JDK 11+
- name: Maven Install without Code Coverage
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ When modifying existing tests, you can change the stubbed WireMock data files by
#### Manual editing of data (minor changes only)

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

#### Generating a new snapshot

Expand Down
44 changes: 25 additions & 19 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>1.307-SNAPSHOT</version>
<version>1.314-SNAPSHOT</version>
<name>GitHub API for Java</name>
<url>https://github-api.kohsuke.org/</url>
<description>GitHub API for Java</description>
Expand Down Expand Up @@ -33,8 +33,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs-maven-plugin.version>4.7.0.0</spotbugs-maven-plugin.version>
<spotbugs.version>4.6.0</spotbugs.version>
<spotbugs-maven-plugin.version>4.7.3.0</spotbugs-maven-plugin.version>
<spotbugs.version>4.7.3</spotbugs.version>
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
<hamcrest.version>2.2</hamcrest.version>
<okhttp3.version>4.9.2</okhttp3.version>
Expand Down Expand Up @@ -213,9 +213,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<configuration>
<source>8</source>
<release>8</release>
<failOnWarnings>true</failOnWarnings>
<doclint>all</doclint>
</configuration>
Expand All @@ -234,7 +234,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.21</version>
<version>1.22</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
Expand All @@ -258,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.0</version>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -278,12 +278,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.2</version>
<dependencies>
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.5.0</version>
<version>6.6.1</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -333,7 +333,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.22.8</version>
<version>2.27.2</version>
<executions>
<execution>
<id>spotless-check</id>
Expand Down Expand Up @@ -396,7 +396,7 @@
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.15.7</version>
<version>0.16.0</version>
<configuration>
<parameter>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
Expand Down Expand Up @@ -453,6 +453,12 @@
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.npathai</groupId>
<artifactId>hamcrest-optional</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -468,7 +474,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.3</version>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand All @@ -485,7 +491,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
<version>1.5</version>
<scope>test</scope>
</dependency>
<!-- for stapler-jetty -->
Expand All @@ -511,7 +517,7 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.1.0.202203080745-r</version>
<version>6.4.0.202211300538-r</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -567,7 +573,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.6.1</version>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -579,19 +585,19 @@
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8-standalone</artifactId>
<version>2.32.0</version>
<version>2.35.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
<version>2.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<version>2.0.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -817,7 +823,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<version>3.3.0</version>
<configuration>
<archive>
<manifestEntries>
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/org/kohsuke/github/AbstractBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

// TODO: Auto-generated Javadoc
/**
* An abstract data object builder/updater.
*
Expand Down Expand Up @@ -32,13 +33,12 @@
* If {@link S} is not the same as {@link R}, {@link #with(String, Object)} will batch together multiple changes and let
* the user call {@link #done()} when they are ready.
*
* @author Liam Newman
* @param <R>
* Final return type built by this builder returned when {@link #done()}} is called.
* @param <S>
* 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)}.
*
* @author Liam Newman
*/
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {

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

/** The requester. */
@Nonnull
protected final Requester requester;

// 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
/** The update in place. */
// connection.
protected boolean updateInPlace;

/**
* Creates a builder.
*
* @param root
* the GitHub instance to connect to.
* @param finalReturnType
* the final return type for built by this builder returned when {@link #done()}} is called.
* @param intermediateReturnType
* the intermediate return type of type {@link S} returned by calls to {@link #with(String, Object)}.
* Must either be equal to {@code builtReturnType} or this instance must be castable to this class. If
* not, the constructor will throw {@link IllegalArgumentException}.
* @param finalReturnType
* the final return type for built by this builder returned when {@link #done()}} is called.
* @param root
* the GitHub instance to connect to.
* @param baseInstance
* optional instance on which to base this builder.
*/
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kohsuke/github/AbuseLimitHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import javax.annotation.Nonnull;

// TODO: Auto-generated Javadoc
/**
* Pluggable strategy to determine what to do when the API abuse limit is hit.
*
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/org/kohsuke/github/EnforcementLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@

import java.util.Locale;

// TODO: Auto-generated Javadoc
/**
* This was added during preview API period but it has changed since then.
*
* @author Kohsuke Kawaguchi
*/
@Deprecated
public enum EnforcementLevel {
OFF, NON_ADMINS, EVERYONE;

/** The off. */
OFF,
/** The non admins. */
NON_ADMINS,
/** The everyone. */
EVERYONE;

/**
* To string.
*
* @return the string
*/
public String toString() {
return name().toLowerCase(Locale.ENGLISH);
}
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/kohsuke/github/GHApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

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

// TODO: Auto-generated Javadoc
/**
* A Github App.
*
Expand All @@ -22,6 +23,7 @@ public class GHApp extends GHObject {

private GHUser owner;
private String name;
private String slug;
private String description;
private String externalUrl;
private Map<String, String> permissions;
Expand Down Expand Up @@ -60,6 +62,15 @@ public String getName() {
return name;
}

/**
* Gets the slug name of the GitHub app.
*
* @return the slug name of the GitHub app
*/
public String getSlug() {
return slug;
}

/**
* Sets name.
*
Expand Down Expand Up @@ -158,6 +169,11 @@ public void setInstallationsCount(long installationsCount) {
throw new RuntimeException("Do not use this method.");
}

/**
* Gets the html url.
*
* @return the html url
*/
public URL getHtmlUrl() {
return GitHubClient.parseURL(htmlUrl);
}
Expand Down
Loading

0 comments on commit 0b185f2

Please sign in to comment.