Skip to content

Commit 3b1f176

Browse files
committed
Merge remote-tracking branch 'upstream/master' into download-repository-archives
2 parents 4d9aed9 + d2732bc commit 3b1f176

325 files changed

Lines changed: 50552 additions & 2446 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.

pom.xml

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.kohsuke</groupId>
44
<artifactId>github-api</artifactId>
5-
<version>1.119-SNAPSHOT</version>
5+
<version>1.123-SNAPSHOT</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>
@@ -33,18 +33,19 @@
3333

3434
<properties>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<spotbugs-maven-plugin.version>4.1.4</spotbugs-maven-plugin.version>
36+
<spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version>
3737
<spotbugs.version>4.1.3</spotbugs.version>
3838
<spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
3939
<hamcrest.version>2.2</hamcrest.version>
4040
<okhttp3.version>4.4.1</okhttp3.version>
4141
<okio.version>2.5.0</okio.version>
4242
<spotless-maven-plugin.goal>apply</spotless-maven-plugin.goal>
4343
<!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. -->
44-
<jacoco.coverage.target.bundle.method>0.60</jacoco.coverage.target.bundle.method>
45-
<jacoco.coverage.target.class.method>0.25</jacoco.coverage.target.class.method>
44+
<jacoco.coverage.target.bundle.method>0.70</jacoco.coverage.target.bundle.method>
45+
<jacoco.coverage.target.class.method>0.50</jacoco.coverage.target.class.method>
4646
<!-- For non-ci builds we'd like the build to still complete if jacoco metrics aren't met. -->
4747
<jacoco.haltOnFailure>false</jacoco.haltOnFailure>
48+
<jjwt.suite.version>0.11.2</jjwt.suite.version>
4849
</properties>
4950

5051
<build>
@@ -152,59 +153,39 @@
152153
<!-- Sample only -->
153154
<exclude>org.kohsuke.github.example.*</exclude>
154155

155-
<!-- No methods -->
156-
<exclude>org.kohsuke.github.Previews</exclude>
157156

158157
<!-- Deprecated -->
159158
<exclude>org.kohsuke.github.extras.OkHttp3Connector</exclude>
160159
<exclude>org.kohsuke.github.EnforcementLevel</exclude>
161160
<exclude>org.kohsuke.github.GHPerson.1</exclude>
162-
163-
<!-- These fail coverage on windows because tests are disabled -->
164-
<exclude>org.kohsuke.github.GHAsset</exclude>
165-
<exclude>org.kohsuke.github.GHReleaseBuilder</exclude>
166-
<exclude>org.kohsuke.github.GHRelease</exclude>
161+
<!-- TODO: Some coverage, but more needed -->
162+
<exclude>org.kohsuke.github.GHPullRequestReviewBuilder.DraftReviewComment</exclude>
163+
<exclude>org.kohsuke.github.GHIssue.PullRequest</exclude>
164+
<exclude>org.kohsuke.github.GHCommitSearchBuilder</exclude>
165+
<exclude>org.kohsuke.github.GHRepositorySearchBuilder</exclude>
166+
<exclude>org.kohsuke.github.GHUserSearchBuilder</exclude>
167167

168168
<!-- TODO: These still need test coverage -->
169169
<exclude>org.kohsuke.github.GHBranchProtection.RequiredSignatures</exclude>
170170
<exclude>org.kohsuke.github.GHBranchProtectionBuilder.Restrictions</exclude>
171171
<exclude>org.kohsuke.github.GHBranchProtection.Restrictions</exclude>
172172
<exclude>org.kohsuke.github.GHCommentAuthorAssociation</exclude>
173-
<exclude>org.kohsuke.github.GHCommitBuilder.UserInfo</exclude>
174-
<exclude>org.kohsuke.github.GHCommitState</exclude>
175173
<exclude>org.kohsuke.github.GHCompare.Commit</exclude>
176174
<exclude>org.kohsuke.github.GHCompare.InnerCommit</exclude>
177-
<exclude>org.kohsuke.github.GHCompare.Status</exclude>
178175
<exclude>org.kohsuke.github.GHCompare.Tree</exclude>
179176
<exclude>org.kohsuke.github.GHCompare.User</exclude>
180177
<exclude>org.kohsuke.github.GHCompare</exclude>
181178
<exclude>org.kohsuke.github.GHDeployKey</exclude>
182-
<exclude>org.kohsuke.github.GHDeploymentStatusBuilder</exclude>
183-
<exclude>org.kohsuke.github.GHDirection</exclude>
184179
<exclude>org.kohsuke.github.GHEmail</exclude>
185-
<exclude>org.kohsuke.github.GHEventPayload.Ping</exclude>
186-
<exclude>org.kohsuke.github.GHEventPayload.Release</exclude>
187-
<exclude>org.kohsuke.github.GHException</exclude>
188-
<exclude>org.kohsuke.github.GHHook</exclude>
189-
<exclude>org.kohsuke.github.GHHooks.OrgContext</exclude>
190180
<exclude>org.kohsuke.github.GHInvitation</exclude>
191-
<exclude>org.kohsuke.github.GHMilestoneState</exclude>
192-
<exclude>org.kohsuke.github.GHOrgHook</exclude>
193-
<exclude>org.kohsuke.github.GHProject.ProjectStateFilter</exclude>
194181
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Authorship</exclude>
195182
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Commit</exclude>
196183
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.CommitPointer</exclude>
197184
<exclude>org.kohsuke.github.GHPullRequestCommitDetail.Tree</exclude>
198185
<exclude>org.kohsuke.github.GHPullRequestCommitDetail</exclude>
199186
<exclude>org.kohsuke.github.GHPullRequestFileDetail</exclude>
200-
<exclude>org.kohsuke.github.GHPullRequestQueryBuilder.Sort</exclude>
201187
<exclude>org.kohsuke.github.GHReleaseUpdater</exclude>
202-
<exclude>org.kohsuke.github.GHRepository.ForkSort</exclude>
203188
<exclude>org.kohsuke.github.GHRequestedAction</exclude>
204-
<exclude>org.kohsuke.github.GHStargazer</exclude>
205-
<exclude>org.kohsuke.github.GHTagObject</exclude>
206-
<exclude>org.kohsuke.github.GHTeam.Role</exclude>
207-
<exclude>org.kohsuke.github.GHUserSearchBuilder.Sort</exclude>
208189
<exclude>org.kohsuke.github.GHVerifiedKey</exclude>
209190
</excludes>
210191
</rule>
@@ -344,7 +325,7 @@
344325
<plugin>
345326
<groupId>com.diffplug.spotless</groupId>
346327
<artifactId>spotless-maven-plugin</artifactId>
347-
<version>2.6.1</version>
328+
<version>2.7.0</version>
348329
<executions>
349330
<execution>
350331
<id>spotless-check</id>
@@ -409,7 +390,7 @@
409390
<dependency>
410391
<groupId>com.tngtech.archunit</groupId>
411392
<artifactId>archunit</artifactId>
412-
<version>0.15.0</version>
393+
<version>0.16.0</version>
413394
<scope>test</scope>
414395
</dependency>
415396
<dependency>
@@ -489,20 +470,20 @@
489470
<dependency>
490471
<groupId>io.jsonwebtoken</groupId>
491472
<artifactId>jjwt-api</artifactId>
492-
<version>0.11.2</version>
493-
<scope>test</scope>
473+
<version>${jjwt.suite.version}</version>
474+
<optional>true</optional>
494475
</dependency>
495476
<dependency>
496477
<groupId>io.jsonwebtoken</groupId>
497478
<artifactId>jjwt-impl</artifactId>
498-
<version>0.11.2</version>
499-
<scope>test</scope>
479+
<version>${jjwt.suite.version}</version>
480+
<optional>true</optional>
500481
</dependency>
501482
<dependency>
502483
<groupId>io.jsonwebtoken</groupId>
503484
<artifactId>jjwt-jackson</artifactId>
504-
<version>0.11.2</version>
505-
<scope>test</scope>
485+
<version>${jjwt.suite.version}</version>
486+
<optional>true</optional>
506487
</dependency>
507488
<dependency>
508489
<groupId>com.squareup.okio</groupId>
@@ -539,7 +520,7 @@
539520
<dependency>
540521
<groupId>org.mockito</groupId>
541522
<artifactId>mockito-core</artifactId>
542-
<version>3.6.28</version>
523+
<version>3.7.7</version>
543524
<scope>test</scope>
544525
</dependency>
545526
<dependency>
@@ -591,6 +572,8 @@
591572
</os>
592573
</activation>
593574
<properties>
575+
<!-- Only fail code coverage on non-windows machines -->
576+
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
594577
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
595578
</properties>
596579
</profile>
@@ -601,9 +584,6 @@
601584
<name>enable-ci</name>
602585
</property>
603586
</activation>
604-
<properties>
605-
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
606-
</properties>
607587
<build>
608588
<plugins>
609589
<plugin>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
import static org.kohsuke.github.Previews.MACHINE_MAN;
8+
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
99

1010
/**
1111
* A Github App.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
import static org.kohsuke.github.Previews.MACHINE_MAN;
8+
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
99

1010
/**
1111
* Creates a access token for a GitHub App Installation

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import java.util.List;
99
import java.util.Map;
1010

11-
import static org.kohsuke.github.Previews.GAMBIT;
12-
import static org.kohsuke.github.Previews.MACHINE_MAN;
11+
import static org.kohsuke.github.internal.Previews.GAMBIT;
12+
import static org.kohsuke.github.internal.Previews.MACHINE_MAN;
1313

1414
/**
1515
* A Github App Installation.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.fasterxml.jackson.annotation.JsonCreator;
44
import com.fasterxml.jackson.annotation.JsonProperty;
55
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
6+
import org.kohsuke.github.internal.Previews;
67

78
import java.io.IOException;
89
import java.net.URL;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.io.IOException;
77
import java.util.Collection;
88

9-
import static org.kohsuke.github.Previews.ZZZAX;
9+
import static org.kohsuke.github.internal.Previews.ZZZAX;
1010

1111
/**
1212
* The type GHBranchProtection.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.Map;
1313
import java.util.Set;
1414

15-
import static org.kohsuke.github.Previews.*;
15+
import static org.kohsuke.github.internal.Previews.LUKE_CAGE;
1616

1717
/**
1818
* Builder to configure the branch protection settings.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.fasterxml.jackson.annotation.JsonProperty;
44
import edu.umd.cs.findbugs.annotations.NonNull;
55
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
6+
import org.kohsuke.github.internal.Previews;
67

78
import java.io.IOException;
89
import java.net.URL;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import edu.umd.cs.findbugs.annotations.CheckForNull;
2929
import edu.umd.cs.findbugs.annotations.NonNull;
3030
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
31+
import org.kohsuke.github.internal.Previews;
3132

3233
import java.io.IOException;
3334
import java.util.Collections;
@@ -151,7 +152,7 @@ private GHCheckRunBuilder(GHRepository repo, Requester requester) {
151152
}
152153
GHCheckRun run = requester.with("output", output).with("actions", actions).fetch(GHCheckRun.class).wrap(repo);
153154
while (!extraAnnotations.isEmpty()) {
154-
Output output2 = new Output(output.title, output.summary);
155+
Output output2 = new Output(output.title, output.summary).withText(output.text);
155156
int i = Math.min(extraAnnotations.size(), MAX_ANNOTATIONS);
156157
output2.annotations = extraAnnotations.subList(0, i);
157158
extraAnnotations = extraAnnotations.subList(i, extraAnnotations.size());

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import java.util.Date;
1212
import java.util.List;
1313

14-
import static org.kohsuke.github.Previews.ANTIOPE;
15-
import static org.kohsuke.github.Previews.GROOT;
14+
import static org.kohsuke.github.internal.Previews.ANTIOPE;
15+
import static org.kohsuke.github.internal.Previews.GROOT;
1616

1717
/**
1818
* A commit in a repository.

0 commit comments

Comments
 (0)