Skip to content

Commit 1df527b

Browse files
committed
Merge tag 'github-api-1.317' into update-kohsuke-client-lib
[maven-release-plugin] copy for tag github-api-1.317
2 parents 6377342 + 90f22bd commit 1df527b

File tree

498 files changed

+83318
-1391
lines changed

Some content is hidden

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

498 files changed

+83318
-1391
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# Before submitting a PR:
66

77
- [ ] Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, [CONTRIBUTING.md](CONTRIBUTING.md) for details.
8-
- [ ] Add JavaDocs and other comments as appropriate. Consider including links in comments to relevant documentation on https://docs.github.com/en/rest .
8+
- [ ] Add JavaDocs and other comments explaining the behavior.
9+
- [ ] When adding or updating methods that fetch entities, add `@link` JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
910
- [ ] Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1011
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
1112
- [ ] Push your changes to a branch other than `main`. You will create your PR from that branch.
@@ -14,6 +15,6 @@
1415

1516
- [ ] Fill in the "Description" above with clear summary of the changes. This includes:
1617
- [ ] If this PR fixes one or more issues, include "Fixes #<issue number>" lines for each issue.
17-
- [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible.
18+
- [ ] Provide links to relevant documentation on https://docs.github.com/en/rest where possible. If not including links, explain why not.
1819
- [ ] All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
1920
- [ ] Enable "Allow edits from maintainers".

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Checkout repository
45-
uses: actions/checkout@v3
45+
uses: actions/checkout@v4
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL

.github/workflows/maven-build.yml

Lines changed: 28 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,64 +19,44 @@ permissions:
1919

2020
jobs:
2121
build:
22-
name: build-only (Java ${{ matrix.java }})
22+
name: build-only (Java 17)
2323
runs-on: ubuntu-latest
2424
strategy:
25-
fail-fast: false
26-
matrix:
27-
java: [ 17 ]
25+
fail-fast: true
2826
steps:
29-
- uses: actions/checkout@v3
30-
- name: Set up JDK
31-
uses: actions/setup-java@v3
32-
with:
33-
java-version: ${{ matrix.java }}
34-
distribution: 'zulu'
35-
cache: 'maven'
36-
- name: Maven Install (skipTests)
37-
env:
38-
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
39-
run: mvn -B clean install -DskipTests --file pom.xml
27+
- uses: actions/checkout@v4
28+
- name: Set up JDK
29+
uses: actions/setup-java@v3
30+
with:
31+
java-version: 17
32+
distribution: 'temurin'
33+
cache: 'maven'
34+
- name: Maven Install (skipTests)
35+
env:
36+
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
37+
run: mvn -B clean install -DskipTests --file pom.xml
38+
- uses: actions/upload-artifact@v3
39+
with:
40+
name: maven-target-directory
41+
path: target/
42+
retention-days: 3
4043
site:
41-
name: site (Java ${{ matrix.java }})
44+
name: site (Java 17)
4245
runs-on: ubuntu-latest
4346
strategy:
4447
fail-fast: false
45-
matrix:
46-
java: [ 17 ]
4748
steps:
48-
- uses: actions/checkout@v3
49-
- name: Set up JDK
50-
uses: actions/setup-java@v3
51-
with:
52-
java-version: ${{ matrix.java }}
53-
distribution: 'adopt'
54-
cache: 'maven'
55-
- name: Maven Site
56-
env:
57-
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
58-
run: mvn -B clean site -D enable-ci --file pom.xml
59-
test-8:
60-
name: test (${{ matrix.os }}, Java 8)
61-
runs-on: ${{ matrix.os }}-latest
62-
strategy:
63-
fail-fast: false
64-
matrix:
65-
os: [ ubuntu ]
66-
java: [ 8 ]
67-
steps:
68-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
6950
- name: Set up JDK
7051
uses: actions/setup-java@v3
7152
with:
72-
java-version: ${{ matrix.java }}
73-
distribution: 'zulu'
53+
java-version: 17
54+
distribution: 'temurin'
7455
cache: 'maven'
75-
# JDK 8
76-
- name: Maven Install with Code Coverage
77-
run: mvn -B clean install -D enable-ci -Djapicmp.skip --file pom.xml
78-
- name: Codecov Report
79-
uses: codecov/codecov-action@v3.1.1
56+
- name: Maven Site
57+
env:
58+
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
59+
run: mvn -B clean site -D enable-ci --file pom.xml
8060
test:
8161
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
8262
runs-on: ${{ matrix.os }}-latest
@@ -86,12 +66,12 @@ jobs:
8666
os: [ ubuntu, windows ]
8767
java: [ 11, 17 ]
8868
steps:
89-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
9070
- name: Set up JDK
9171
uses: actions/setup-java@v3
9272
with:
9373
java-version: ${{ matrix.java }}
94-
distribution: 'zulu'
74+
distribution: 'temurin'
9575
cache: 'maven'
9676
# JDK 11+
9777
- 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: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<connection>scm:git:git@github.com/hub4j/${project.artifactId}.git</connection>
1212
<developerConnection>scm:git:ssh://git@github.com/hub4j/${project.artifactId}.git</developerConnection>
1313
<url>https://github.com/hub4j/github-api/</url>
14-
<tag>HEAD</tag>
14+
<tag>github-api-1.317</tag>
1515
</scm>
1616

1717
<distributionManagement>
@@ -38,7 +38,7 @@
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>
41-
<okio.version>2.10.0</okio.version>
41+
<okio.version>3.5.0</okio.version>
4242
<!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. -->
4343
<jacoco.coverage.target.bundle.method>0.70</jacoco.coverage.target.bundle.method>
4444
<jacoco.coverage.target.class.method>0.50</jacoco.coverage.target.class.method>
@@ -92,17 +92,17 @@
9292
<plugin>
9393
<groupId>org.apache.maven.plugins</groupId>
9494
<artifactId>maven-source-plugin</artifactId>
95-
<version>3.2.1</version>
95+
<version>3.3.0</version>
9696
</plugin>
9797
<plugin>
9898
<groupId>org.apache.maven.plugins</groupId>
9999
<artifactId>maven-gpg-plugin</artifactId>
100-
<version>3.0.1</version>
100+
<version>3.1.0</version>
101101
</plugin>
102102
<plugin>
103103
<groupId>org.jacoco</groupId>
104104
<artifactId>jacoco-maven-plugin</artifactId>
105-
<version>0.8.8</version>
105+
<version>0.8.10</version>
106106
<configuration>
107107
<!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing -->
108108
<excludes>
@@ -241,6 +241,9 @@
241241
<artifactId>java18</artifactId>
242242
<version>1.0</version>
243243
</signature>
244+
<ignores>
245+
java.net.http.*
246+
</ignores>
244247
</configuration>
245248
<executions>
246249
<execution>
@@ -278,7 +281,7 @@
278281
<plugin>
279282
<groupId>org.apache.maven.plugins</groupId>
280283
<artifactId>maven-project-info-reports-plugin</artifactId>
281-
<version>3.4.1</version>
284+
<version>3.4.2</version>
282285
<dependencies>
283286
<dependency>
284287
<groupId>org.apache.bcel</groupId>
@@ -301,19 +304,52 @@
301304
</annotationProcessorPath>
302305
</annotationProcessorPaths>
303306
</configuration>
307+
<executions>
308+
<execution>
309+
<id>compile-java-11</id>
310+
<phase>compile</phase>
311+
<goals>
312+
<goal>compile</goal>
313+
</goals>
314+
<configuration>
315+
<release>11</release>
316+
<source>11</source>
317+
<target>11</target>
318+
<compileSourceRoots>
319+
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
320+
</compileSourceRoots>
321+
<multiReleaseOutput>true</multiReleaseOutput>
322+
</configuration>
323+
</execution>
324+
</executions>
304325
</plugin>
305326
<plugin>
306327
<artifactId>maven-surefire-plugin</artifactId>
328+
<configuration>
329+
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine}</argLine>
330+
</configuration>
307331
<executions>
308332
<execution>
309333
<id>default-test</id>
310334
<configuration>
311335
<excludesFile>src/test/resources/slow-or-flaky-tests.txt</excludesFile>
312-
<argLine>@{jacoco.surefire.argLine} ${surefire.argLine}</argLine>
313336
</configuration>
314337
</execution>
315338
</executions>
316339
</plugin>
340+
<plugin>
341+
<groupId>org.apache.maven.plugins</groupId>
342+
<artifactId>maven-jar-plugin</artifactId>
343+
<version>3.3.0</version>
344+
<configuration>
345+
<archive>
346+
<manifestEntries>
347+
<Automatic-Module-Name>org.kohsuke.github.api</Automatic-Module-Name>
348+
<Multi-Release>true</Multi-Release>
349+
</manifestEntries>
350+
</archive>
351+
</configuration>
352+
</plugin>
317353
<plugin>
318354
<groupId>org.codehaus.mojo</groupId>
319355
<artifactId>animal-sniffer-maven-plugin</artifactId>
@@ -431,7 +467,7 @@
431467
<dependency>
432468
<groupId>com.tngtech.archunit</groupId>
433469
<artifactId>archunit</artifactId>
434-
<version>0.23.1</version>
470+
<version>1.1.0</version>
435471
<scope>test</scope>
436472
</dependency>
437473
<dependency>
@@ -453,6 +489,12 @@
453489
<version>${hamcrest.version}</version>
454490
<scope>test</scope>
455491
</dependency>
492+
<dependency>
493+
<groupId>com.github.npathai</groupId>
494+
<artifactId>hamcrest-optional</artifactId>
495+
<version>2.0.0</version>
496+
<scope>test</scope>
497+
</dependency>
456498
<dependency>
457499
<groupId>junit</groupId>
458500
<artifactId>junit</artifactId>
@@ -468,7 +510,7 @@
468510
<dependency>
469511
<groupId>com.fasterxml.jackson.core</groupId>
470512
<artifactId>jackson-databind</artifactId>
471-
<version>2.14.0</version>
513+
<version>2.15.2</version>
472514
</dependency>
473515
<dependency>
474516
<groupId>commons-io</groupId>
@@ -485,7 +527,7 @@
485527
<dependency>
486528
<groupId>commons-fileupload</groupId>
487529
<artifactId>commons-fileupload</artifactId>
488-
<version>1.4</version>
530+
<version>1.5</version>
489531
<scope>test</scope>
490532
</dependency>
491533
<!-- for stapler-jetty -->
@@ -511,7 +553,7 @@
511553
<dependency>
512554
<groupId>org.eclipse.jgit</groupId>
513555
<artifactId>org.eclipse.jgit</artifactId>
514-
<version>6.4.0.202211300538-r</version>
556+
<version>6.7.0.202309050840-r</version>
515557
<scope>test</scope>
516558
</dependency>
517559
<dependency>
@@ -579,7 +621,7 @@
579621
<dependency>
580622
<groupId>com.github.tomakehurst</groupId>
581623
<artifactId>wiremock-jre8-standalone</artifactId>
582-
<version>2.32.0</version>
624+
<version>2.35.1</version>
583625
<scope>test</scope>
584626
</dependency>
585627
<dependency>
@@ -591,7 +633,7 @@
591633
<dependency>
592634
<groupId>org.slf4j</groupId>
593635
<artifactId>slf4j-simple</artifactId>
594-
<version>2.0.3</version>
636+
<version>2.0.7</version>
595637
<scope>test</scope>
596638
</dependency>
597639
</dependencies>
@@ -610,7 +652,7 @@
610652
<profiles>
611653
<!-- only enable slow-or-flaky-test if -Dtest= is not present -->
612654
<profile>
613-
<id>slow-or-flaky-test</id>
655+
<id>test-slow-multireleasejar-flaky</id>
614656
<activation>
615657
<property>
616658
<name>!test</name>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package org.kohsuke.github;
2+
3+
/**
4+
* A GitHub App with the additional attributes returned during its creation.
5+
*
6+
* @author Daniel Baur
7+
* @see GitHub#createAppFromManifest(String)
8+
*/
9+
public class GHAppFromManifest extends GHApp {
10+
11+
private String clientId;
12+
private String clientSecret;
13+
private String webhookSecret;
14+
private String pem;
15+
16+
/**
17+
* Gets the client id
18+
*
19+
* @return the client id
20+
*/
21+
public String getClientId() {
22+
return clientId;
23+
}
24+
25+
/**
26+
* Gets the client secret
27+
*
28+
* @return the client secret
29+
*/
30+
public String getClientSecret() {
31+
return clientSecret;
32+
}
33+
34+
/**
35+
* Gets the webhook secret
36+
*
37+
* @return the webhook secret
38+
*/
39+
public String getWebhookSecret() {
40+
return webhookSecret;
41+
}
42+
43+
/**
44+
* Gets the pem
45+
*
46+
* @return the pem
47+
*/
48+
public String getPem() {
49+
return pem;
50+
}
51+
}

0 commit comments

Comments
 (0)