Skip to content

Commit fe04d00

Browse files
committed
Merge tag 'github-api-2.0-rc.7' into release/v2.x
github-api-2.0-rc.7
2 parents 1e8ebdb + 79bee5a commit fe04d00

62 files changed

Lines changed: 3684 additions & 219 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,32 @@ updates:
33
- package-ecosystem: "maven"
44
directory: "/"
55
rebase-strategy: "disabled"
6+
target-branch: "main"
7+
open-pull-requests-limit: 10
68
schedule:
79
interval: "monthly"
810
time: "02:00"
911
- package-ecosystem: "github-actions"
1012
directory: "/"
1113
rebase-strategy: "disabled"
14+
target-branch: "main"
15+
open-pull-requests-limit: 10
16+
schedule:
17+
interval: "monthly"
18+
time: "02:00"
19+
- package-ecosystem: "maven"
20+
directory: "/"
21+
rebase-strategy: "disabled"
22+
target-branch: "main-1.x"
23+
open-pull-requests-limit: 10
24+
schedule:
25+
interval: "monthly"
26+
time: "02:00"
27+
- package-ecosystem: "github-actions"
28+
directory: "/"
29+
rebase-strategy: "disabled"
30+
target-branch: "main-1.x"
31+
open-pull-requests-limit: 10
1232
schedule:
1333
interval: "monthly"
1434
time: "02:00"

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
java-version: 17
4949

5050
- name: Checkout repository
51-
uses: actions/checkout@v6
51+
uses: actions/checkout@v7
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: Initialize CodeQL

.github/workflows/create_release_tag_and_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
create_release_tag:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@v7
1414
with:
1515
fetch-depth: 0
1616

.github/workflows/maven-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- main-2.x
7+
- main-1.x
88
- '!/refs/heads/dependabot/*'
99
pull_request:
1010
branches:
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: true
2727
steps:
28-
- uses: actions/checkout@v6
28+
- uses: actions/checkout@v7
2929
- name: Set up JDK
3030
uses: actions/setup-java@v5
3131
with:
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
steps:
50-
- uses: actions/checkout@v6
50+
- uses: actions/checkout@v7
5151
- name: Set up JDK
5252
uses: actions/setup-java@v5
5353
with:
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: true
7070
steps:
71-
- uses: actions/checkout@v6
71+
- uses: actions/checkout@v7
7272
- name: Set up JDK
7373
uses: actions/setup-java@v5
7474
with:
@@ -90,7 +90,7 @@ jobs:
9090
os: [ ubuntu, windows ]
9191
java: [ 17, 21 ]
9292
steps:
93-
- uses: actions/checkout@v6
93+
- uses: actions/checkout@v7
9494
- name: Set up JDK
9595
uses: actions/setup-java@v5
9696
with:
@@ -120,13 +120,13 @@ jobs:
120120
needs: test
121121
runs-on: ubuntu-latest
122122
steps:
123-
- uses: actions/checkout@v6
123+
- uses: actions/checkout@v7
124124
- uses: actions/download-artifact@v8
125125
with:
126126
name: maven-test-target-directory
127127
path: target
128128
- name: Codecov Report
129-
uses: codecov/codecov-action@v6.0.0
129+
uses: codecov/codecov-action@v7.0.0
130130
with:
131131
# Codecov token from https://app.codecov.io/gh/hub4j/github-api/settings
132132
token: ${{ secrets.CODECOV_TOKEN }}
@@ -138,7 +138,7 @@ jobs:
138138
needs: build
139139
runs-on: ubuntu-latest
140140
steps:
141-
- uses: actions/checkout@v6
141+
- uses: actions/checkout@v7
142142
- uses: actions/download-artifact@v8
143143
with:
144144
name: maven-target-directory

.github/workflows/publish_release_branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@v7
1616
- name: Set up Maven Central Repository
1717
uses: actions/setup-java@v5
1818
with:
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
needs: build
3737
steps:
38-
- uses: actions/checkout@v6
38+
- uses: actions/checkout@v7
3939
- name: Set up Maven Central Repository
4040
uses: actions/setup-java@v5
4141
with:
@@ -69,7 +69,7 @@ jobs:
6969
needs: build
7070
if: ${{ github.ref == 'refs/heads/release/v2.x' }}
7171
steps:
72-
- uses: actions/checkout@v6
72+
- uses: actions/checkout@v7
7373
with:
7474
fetch-depth: 0
7575

pom.xml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.kohsuke</groupId>
55
<artifactId>${github-api.artifactId}</artifactId>
6-
<version>2.0-rc.6</version>
6+
<version>2.0-rc.7</version>
77
<name>GitHub API for Java</name>
88
<description>GitHub API for Java</description>
99
<url>https://hub4j.github.io/github-api/</url>
@@ -75,10 +75,10 @@
7575
<!-- This project was registered before 2021, so it uses the old server. -->
7676
<nexus.serverUrl>https://ossrh-staging-api.central.sonatype.com</nexus.serverUrl>
7777
<okhttp3.version>4.12.0</okhttp3.version>
78-
<okio.version>3.16.0</okio.version>
78+
<okio.version>3.17.0</okio.version>
7979
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8080
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
81-
<spotbugs-maven-plugin.version>4.9.8.2</spotbugs-maven-plugin.version>
81+
<spotbugs-maven-plugin.version>4.9.8.3</spotbugs-maven-plugin.version>
8282
<spotbugs.version>4.8.6</spotbugs.version>
8383
<spring.boot.version>3.4.5</spring.boot.version>
8484
<surefire.argLine></surefire.argLine>
@@ -89,7 +89,7 @@
8989
<dependency>
9090
<groupId>com.fasterxml.jackson</groupId>
9191
<artifactId>jackson-bom</artifactId>
92-
<version>2.21.0</version>
92+
<version>2.21.2</version>
9393
<type>pom</type>
9494
<scope>import</scope>
9595
</dependency>
@@ -103,7 +103,7 @@
103103
<dependency>
104104
<groupId>org.slf4j</groupId>
105105
<artifactId>slf4j-bom</artifactId>
106-
<version>2.0.17</version>
106+
<version>2.0.18</version>
107107
<type>pom</type>
108108
<scope>import</scope>
109109
</dependency>
@@ -194,7 +194,7 @@
194194
<dependency>
195195
<groupId>org.apache.commons</groupId>
196196
<artifactId>commons-lang3</artifactId>
197-
<version>3.19.0</version>
197+
<version>3.20.0</version>
198198
</dependency>
199199
<dependency>
200200
<groupId>com.github.npathai</groupId>
@@ -211,19 +211,19 @@
211211
<dependency>
212212
<groupId>com.google.code.gson</groupId>
213213
<artifactId>gson</artifactId>
214-
<version>2.13.2</version>
214+
<version>2.14.0</version>
215215
<scope>test</scope>
216216
</dependency>
217217
<dependency>
218218
<groupId>com.google.guava</groupId>
219219
<artifactId>guava</artifactId>
220-
<version>33.4.6-jre</version>
220+
<version>33.5.0-jre</version>
221221
<scope>test</scope>
222222
</dependency>
223223
<dependency>
224224
<groupId>com.tngtech.archunit</groupId>
225225
<artifactId>archunit</artifactId>
226-
<version>1.4.1</version>
226+
<version>1.4.2</version>
227227
<scope>test</scope>
228228
</dependency>
229229
<dependency>
@@ -268,7 +268,7 @@
268268
<dependency>
269269
<groupId>org.mockito</groupId>
270270
<artifactId>mockito-core</artifactId>
271-
<version>5.21.0</version>
271+
<version>5.23.0</version>
272272
<scope>test</scope>
273273
</dependency>
274274
<!--
@@ -340,11 +340,11 @@
340340
</plugin>
341341
<plugin>
342342
<artifactId>maven-resources-plugin</artifactId>
343-
<version>3.3.1</version>
343+
<version>3.5.0</version>
344344
</plugin>
345345
<plugin>
346346
<artifactId>maven-source-plugin</artifactId>
347-
<version>3.3.1</version>
347+
<version>3.4.0</version>
348348
</plugin>
349349
<plugin>
350350
<artifactId>maven-surefire-plugin</artifactId>
@@ -357,12 +357,12 @@
357357
<plugin>
358358
<groupId>org.codehaus.mojo</groupId>
359359
<artifactId>versions-maven-plugin</artifactId>
360-
<version>2.18.0</version>
360+
<version>2.21.0</version>
361361
</plugin>
362362
<plugin>
363363
<groupId>org.jacoco</groupId>
364364
<artifactId>jacoco-maven-plugin</artifactId>
365-
<version>0.8.14</version>
365+
<version>0.8.15</version>
366366
<configuration>
367367
<!-- no need to get data about external code. It dramatically reduces performance of JaCoCo for nothing -->
368368
<excludes>
@@ -535,7 +535,7 @@
535535
<plugin>
536536
<groupId>com.github.siom79.japicmp</groupId>
537537
<artifactId>japicmp-maven-plugin</artifactId>
538-
<version>0.23.1</version>
538+
<version>0.26.1</version>
539539
<configuration>
540540
<parameter>
541541
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
@@ -585,7 +585,7 @@
585585
</plugin>
586586
<plugin>
587587
<artifactId>maven-compiler-plugin</artifactId>
588-
<version>3.14.0</version>
588+
<version>3.15.0</version>
589589
<configuration>
590590
<source>11</source>
591591
<target>11</target>
@@ -602,7 +602,7 @@
602602
<plugin>
603603
<groupId>org.apache.maven.plugins</groupId>
604604
<artifactId>maven-jar-plugin</artifactId>
605-
<version>3.4.2</version>
605+
<version>3.5.0</version>
606606
<configuration>
607607
<archive>
608608
<manifestEntries>
@@ -626,7 +626,7 @@
626626
<plugin>
627627
<groupId>org.apache.maven.plugins</groupId>
628628
<artifactId>maven-release-plugin</artifactId>
629-
<version>3.1.1</version>
629+
<version>3.3.1</version>
630630
<configuration>
631631
<autoVersionSubmodules>true</autoVersionSubmodules>
632632
<useReleaseProfile>false</useReleaseProfile>
@@ -637,7 +637,7 @@
637637
<plugin>
638638
<groupId>org.apache.maven.plugins</groupId>
639639
<artifactId>maven-site-plugin</artifactId>
640-
<version>3.21.0</version>
640+
<version>3.22.0</version>
641641
</plugin>
642642
<plugin>
643643
<artifactId>maven-surefire-plugin</artifactId>
@@ -683,7 +683,7 @@
683683
<extension>
684684
<groupId>org.apache.maven.scm</groupId>
685685
<artifactId>maven-scm-provider-gitexe</artifactId>
686-
<version>2.1.0</version>
686+
<version>2.2.1</version>
687687
</extension>
688688
<extension>
689689
<groupId>org.apache.maven.scm</groupId>
@@ -904,7 +904,7 @@
904904
<plugin>
905905
<groupId>org.apache.maven.plugins</groupId>
906906
<artifactId>maven-enforcer-plugin</artifactId>
907-
<version>3.5.0</version>
907+
<version>3.6.3</version>
908908
<executions>
909909
<execution>
910910
<id>enforce-jacoco-exist</id>

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

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ public GHRepository getForkee() {
529529
// ContentReferenceEvent
530530
// DeployKeyEvent DownloadEvent FollowEvent ForkApplyEvent GitHubAppAuthorizationEvent GistEvent GollumEvent
531531
// InstallationEvent InstallationRepositoriesEvent IssuesEvent LabelEvent MarketplacePurchaseEvent MemberEvent
532-
// MembershipEvent MetaEvent MilestoneEvent OrganizationEvent OrgBlockEvent PackageEvent PageBuildEvent
532+
// MembershipEvent MetaEvent OrganizationEvent OrgBlockEvent PackageEvent PageBuildEvent
533533
// ProjectCardEvent ProjectColumnEvent ProjectEvent RepositoryDispatchEvent RepositoryImportEvent
534534
// RepositoryVulnerabilityAlertEvent SecurityAdvisoryEvent StarEvent StatusEvent TeamEvent TeamAddEvent WatchEvent
535535

@@ -1005,6 +1005,41 @@ void lateBind() {
10051005
}
10061006
}
10071007

1008+
/**
1009+
* A milestone event has been triggered.
1010+
*
1011+
* @see <a href="https://docs.github.com/en/webhooks/webhook-events-and-payloads#milestone">milestone event</a>
1012+
*/
1013+
public static class Milestone extends GHEventPayload {
1014+
1015+
private GHMilestone milestone;
1016+
1017+
/**
1018+
* Create default Milestone instance
1019+
*/
1020+
public Milestone() {
1021+
}
1022+
1023+
/**
1024+
* Gets the milestone.
1025+
*
1026+
* @return the milestone
1027+
*/
1028+
@SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior")
1029+
public GHMilestone getMilestone() {
1030+
return milestone;
1031+
}
1032+
1033+
@Override
1034+
void lateBind() {
1035+
super.lateBind();
1036+
GHRepository repository = getRepository();
1037+
if (repository != null && milestone != null) {
1038+
milestone.lateBind(repository);
1039+
}
1040+
}
1041+
}
1042+
10081043
/**
10091044
* A ping.
10101045
*

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ protected static List<String> getLogins(Collection<GHUser> users) {
121121
/** The assignees. */
122122
protected GHUser[] assignees;
123123

124+
/** The author's association with the repository. */
125+
protected String authorAssociation;
126+
124127
/** The body. */
125128
@SkipFromToString
126129
protected String body;
@@ -349,6 +352,17 @@ public List<GHUser> getAssignees() {
349352
return Collections.unmodifiableList(Arrays.asList(assignees));
350353
}
351354

355+
/**
356+
* Gets the author's association with the repository.
357+
*
358+
* @return the author association
359+
*/
360+
public GHCommentAuthorAssociation getAuthorAssociation() {
361+
return EnumUtils.getEnumOrDefault(GHCommentAuthorAssociation.class,
362+
authorAssociation,
363+
GHCommentAuthorAssociation.UNKNOWN);
364+
}
365+
352366
/**
353367
* The description of this pull request.
354368
*

0 commit comments

Comments
 (0)