Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd4368f

Browse filesBrowse files
committed
Merge remote-tracking branch 'upstream/master' into jae/bulk-update
2 parents 4ec4b16 + a585b49 commit cd4368f
Copy full SHA for cd4368f

File tree

Expand file treeCollapse file tree

77 files changed

+217
-243
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

77 files changed

+217
-243
lines changed

‎pom.xml

Copy file name to clipboardExpand all lines: pom.xml
+27-33Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@
3333

3434
<properties>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36-
<spotbugs-maven-plugin.version>4.0.4</spotbugs-maven-plugin.version>
36+
<spotbugs-maven-plugin.version>4.1.4</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>
42-
<formatter-maven-plugin.goal>format</formatter-maven-plugin.goal>
43-
<impsort-maven-plugin.goal>sort</impsort-maven-plugin.goal>
42+
<spotless-maven-plugin.goal>apply</spotless-maven-plugin.goal>
4443
<!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. -->
4544
<jacoco.coverage.target.bundle.method>0.60</jacoco.coverage.target.bundle.method>
4645
<jacoco.coverage.target.class.method>0.25</jacoco.coverage.target.class.method>
@@ -343,37 +342,34 @@
343342
</executions>
344343
</plugin>
345344
<plugin>
346-
<groupId>net.revelc.code.formatter</groupId>
347-
<artifactId>formatter-maven-plugin</artifactId>
348-
<version>2.12.1</version>
345+
<groupId>com.diffplug.spotless</groupId>
346+
<artifactId>spotless-maven-plugin</artifactId>
347+
<version>2.6.1</version>
349348
<executions>
350349
<execution>
350+
<id>spotless-check</id>
351+
<phase>process-sources</phase>
351352
<goals>
352-
<goal>${formatter-maven-plugin.goal}</goal>
353+
<goal>${spotless-maven-plugin.goal}</goal>
353354
</goals>
354-
<configuration>
355-
<configFile>src/main/resources/eclipse/formatter.xml</configFile>
356-
<cachedir>${project.build.directory}/.cache</cachedir>
357-
</configuration>
358355
</execution>
359356
</executions>
360-
</plugin>
361-
<plugin>
362-
<groupId>net.revelc.code</groupId>
363-
<artifactId>impsort-maven-plugin</artifactId>
364-
<version>1.4.1</version>
365357
<configuration>
366-
<groups>*,java.,javax.</groups>
367-
<removeUnused>true</removeUnused>
368-
<staticAfter>true</staticAfter>
358+
<java>
359+
<eclipse>
360+
<file>${basedir}/src/build/eclipse/formatter.xml</file>
361+
</eclipse>
362+
363+
<importOrder>
364+
<file>${basedir}/src/build/eclipse/eclipse.importorder</file>
365+
</importOrder>
366+
<removeUnusedImports />
367+
368+
<trimTrailingWhitespace />
369+
<endWithNewline />
370+
371+
</java>
369372
</configuration>
370-
<executions>
371-
<execution>
372-
<goals>
373-
<goal>${impsort-maven-plugin.goal}</goal>
374-
</goals>
375-
</execution>
376-
</executions>
377373
</plugin>
378374
<plugin>
379375
<groupId>com.github.spotbugs</groupId>
@@ -413,7 +409,7 @@
413409
<dependency>
414410
<groupId>com.tngtech.archunit</groupId>
415411
<artifactId>archunit</artifactId>
416-
<version>0.14.1</version>
412+
<version>0.15.0</version>
417413
<scope>test</scope>
418414
</dependency>
419415
<dependency>
@@ -487,7 +483,7 @@
487483
<dependency>
488484
<groupId>org.eclipse.jgit</groupId>
489485
<artifactId>org.eclipse.jgit</artifactId>
490-
<version>5.9.0.202009080501-r</version>
486+
<version>5.10.0.202012080955-r</version>
491487
<scope>test</scope>
492488
</dependency>
493489
<dependency>
@@ -567,7 +563,7 @@
567563
<dependency>
568564
<groupId>org.slf4j</groupId>
569565
<artifactId>slf4j-simple</artifactId>
570-
<version>1.7.2</version>
566+
<version>1.7.30</version>
571567
<scope>test</scope>
572568
</dependency>
573569
</dependencies>
@@ -595,8 +591,7 @@
595591
</os>
596592
</activation>
597593
<properties>
598-
<formatter-maven-plugin.goal>validate</formatter-maven-plugin.goal>
599-
<impsort-maven-plugin.goal>check</impsort-maven-plugin.goal>
594+
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
600595
</properties>
601596
</profile>
602597
<profile>
@@ -621,8 +616,7 @@
621616
<profile>
622617
<id>release</id>
623618
<properties>
624-
<formatter-maven-plugin.goal>validate</formatter-maven-plugin.goal>
625-
<impsort-maven-plugin.goal>check</impsort-maven-plugin.goal>
619+
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
626620
</properties>
627621
<build>
628622
<plugins>

‎src/build/eclipse/eclipse.importorder

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Organize Import Order
2+
# Import this file in Window -> Preferences -> Java -> Code Style -> Organize Imports -> Import...
3+
0=
4+
1=java
5+
2=javax
6+
3=\#

‎src/main/java/org/kohsuke/github/AbstractBuilder.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/AbstractBuilder.java
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
* <p>
1313
* Batching looks like this:
1414
* </p>
15-
*
15+
*
1616
* <pre>
1717
* update().someName(value).otherName(value).done()
1818
* </pre>
1919
* <p>
2020
* Single changes look like this:
2121
* </p>
22-
*
22+
*
2323
* <pre>
2424
* set().someName(value);
2525
* set().otherName(value);
@@ -38,7 +38,7 @@
3838
* Intermediate return type for this builder returned by calls to {@link #with(String, Object)}. If {@link S}
3939
* the same as {@link R}, this builder will commit changes after each call to {@link #with(String, Object)}.
4040
*/
41-
abstract class AbstractBuilder<R, S> {
41+
abstract class AbstractBuilder<R, S> extends GitHubInteractiveObject {
4242

4343
@Nonnull
4444
private final Class<R> returnType;
@@ -51,9 +51,6 @@ abstract class AbstractBuilder<R, S> {
5151
@Nonnull
5252
protected final Requester requester;
5353

54-
@Nonnull
55-
protected final GitHub root;
56-
5754
// TODO: Not sure how update-in-place behavior should be controlled
5855
// However, it certainly can be controlled dynamically down to the instance level or inherited for all children of
5956
// some
@@ -78,7 +75,7 @@ protected AbstractBuilder(@Nonnull Class<R> finalReturnType,
7875
@Nonnull Class<S> intermediateReturnType,
7976
@Nonnull GitHub root,
8077
@CheckForNull R baseInstance) {
81-
this.root = root;
78+
super(root);
8279
this.requester = root.createRequest();
8380
this.returnType = finalReturnType;
8481
this.commitChangesImmediately = returnType.equals(intermediateReturnType);

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHApp.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
public class GHApp extends GHObject {
1717

18-
private GitHub root;
1918
private GHUser owner;
2019
private String name;
2120
private String description;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppCreateTokenBuilder.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
* @see GHAppInstallation#createToken(Map) GHAppInstallation#createToken(Map)
1515
* @see GHAppInstallation#createToken() GHAppInstallation#createToken()
1616
*/
17-
public class GHAppCreateTokenBuilder {
18-
private final GitHub root;
17+
public class GHAppCreateTokenBuilder extends GitHubInteractiveObject {
1918
protected final Requester builder;
2019
private final String apiUrlTail;
2120

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppInstallation.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* @see GHApp#getInstallationByUser(String) GHApp#getInstallationByUser(String)
2323
*/
2424
public class GHAppInstallation extends GHObject {
25-
private GitHub root;
2625
private GHUser account;
2726

2827
@JsonProperty("access_tokens_url")

‎src/main/java/org/kohsuke/github/GHAppInstallationToken.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAppInstallationToken.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
* @author Paulo Miguel Almeida
1515
* @see GHAppInstallation#createToken(Map) GHAppInstallation#createToken(Map)
1616
*/
17-
public class GHAppInstallationToken {
18-
private GitHub root;
19-
17+
public class GHAppInstallationToken extends GitHubInteractiveObject {
2018
private String token;
2119
protected String expires_at;
2220
private Map<String, String> permissions;

‎src/main/java/org/kohsuke/github/GHAsset.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAsset.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* @see GHRelease#getAssets() GHRelease#getAssets()
1010
*/
1111
public class GHAsset extends GHObject {
12-
GitHub root;
1312
GHRepository owner;
1413
private String name;
1514
private String label;

‎src/main/java/org/kohsuke/github/GHAuthorization.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHAuthorization.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public class GHAuthorization extends GHObject {
3333
public static final String WRITE_KEY = "write:public_key";
3434
public static final String ADMIN_KEY = "admin:public_key";
3535

36-
private GitHub root;
3736
private List<String> scopes;
3837
private String token;
3938
private String token_last_eight;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranch.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
2121
"URF_UNREAD_FIELD" },
2222
justification = "JSON API")
23-
public class GHBranch {
24-
private GitHub root;
23+
public class GHBranch extends GitHubInteractiveObject {
2524
private GHRepository owner;
2625

2726
private String name;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHBranchProtection.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
1818
"URF_UNREAD_FIELD" },
1919
justification = "JSON API")
20-
public class GHBranchProtection {
20+
public class GHBranchProtection extends GitHubInteractiveObject {
2121
private static final String REQUIRE_SIGNATURES_URI = "/required_signatures";
2222

2323
@JsonProperty
2424
private EnforceAdmins enforceAdmins;
2525

26-
private GitHub root;
27-
2826
@JsonProperty("required_pull_request_reviews")
2927
private RequiredReviews requiredReviews;
3028

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRun.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class GHCheckRun extends GHObject {
2222

2323
@JsonProperty("repository")
2424
GHRepository owner;
25-
GitHub root;
2625

2726
private String status;
2827
private String conclusion;
@@ -295,7 +294,7 @@ public static enum AnnotationLevel {
295294

296295
/**
297296
* Updates this check run.
298-
*
297+
*
299298
* @return a builder which you should customize, then call {@link GHCheckRunBuilder#create}
300299
*/
301300
@Preview(Previews.ANTIOPE)

‎src/main/java/org/kohsuke/github/GHCheckRunsIterable.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckRunsIterable.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Iterable for check-runs listing.
99
*/
1010
class GHCheckRunsIterable extends PagedIterable<GHCheckRun> {
11-
private GitHub root;
11+
private final transient GitHub root;
1212
private final GitHubRequest request;
1313

1414
private GHCheckRunsPage result;

‎src/main/java/org/kohsuke/github/GHCheckSuite.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCheckSuite.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class GHCheckSuite extends GHObject {
2121

2222
@JsonProperty("repository")
2323
GHRepository owner;
24-
GitHub root;
2524

2625
private String nodeId;
2726
private String headBranch;

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

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommit.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public PagedIterable<GHCheckRun> getCheckRuns() throws IOException {
574574

575575
/**
576576
* Some of the fields are not always filled in when this object is retrieved as a part of another API call.
577-
*
577+
*
578578
* @throws IOException
579579
* on error
580580
*/

‎src/main/java/org/kohsuke/github/GHCommitStatus.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHCommitStatus.java
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public class GHCommitStatus extends GHObject {
1818
String context;
1919
GHUser creator;
2020

21-
private GitHub root;
22-
2321
GHCommitStatus wrapUp(GitHub root) {
2422
if (creator != null)
2523
creator.wrapUp(root);

‎src/main/java/org/kohsuke/github/GHContent.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHContent.java
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
* @see GHRepository#getFileContent(String) GHRepository#getFileContent(String)
1616
*/
1717
@SuppressWarnings({ "UnusedDeclaration" })
18-
public class GHContent implements Refreshable {
18+
public class GHContent extends GitHubInteractiveObject implements Refreshable {
1919
/*
2020
* In normal use of this class, repository field is set via wrap(), but in the code search API, there's a nested
2121
* 'repository' field that gets populated from JSON.
2222
*/
2323
private GHRepository repository;
2424

25-
private GitHub root;
26-
2725
private String type;
2826
private String encoding;
2927
private long size;
@@ -102,7 +100,7 @@ public String getPath() {
102100

103101
/**
104102
* Gets target of a symlink. This will only be set if {@code "symlink".equals(getType())}
105-
*
103+
*
106104
* @return the target
107105
*/
108106
public String getTarget() {

‎src/main/java/org/kohsuke/github/GHDeployment.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeployment.java
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*/
1515
public class GHDeployment extends GHObject {
1616
private GHRepository owner;
17-
private GitHub root;
1817
protected String sha;
1918
protected String ref;
2019
protected String task;
@@ -85,7 +84,7 @@ public Map<String, Object> getPayloadMap() {
8584

8685
/**
8786
* Gets payload without assuming its type. It could be a String or a Map.
88-
*
87+
*
8988
* @return the payload
9089
*/
9190
public Object getPayloadObject() {

‎src/main/java/org/kohsuke/github/GHDeploymentStatus.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDeploymentStatus.java
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99
public class GHDeploymentStatus extends GHObject {
1010
private GHRepository owner;
11-
private GitHub root;
1211
protected GHUser creator;
1312
protected String state;
1413
protected String description;

‎src/main/java/org/kohsuke/github/GHDiscussion.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHDiscussion.java
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.kohsuke.github;
22

3-
import com.fasterxml.jackson.annotation.JacksonInject;
43
import com.fasterxml.jackson.annotation.JsonProperty;
54

65
import java.io.IOException;
@@ -18,8 +17,6 @@
1817
*/
1918
public class GHDiscussion extends GHObject {
2019

21-
@JacksonInject
22-
private GitHub root;
2320
private GHTeam team;
2421
private long number;
2522
private String body, title, htmlUrl;

‎src/main/java/org/kohsuke/github/GHEventInfo.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHEventInfo.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
* @author Kohsuke Kawaguchi
1313
*/
1414
@SuppressFBWarnings(value = "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", justification = "JSON API")
15-
public class GHEventInfo {
16-
private GitHub root;
17-
15+
public class GHEventInfo extends GitHubInteractiveObject {
1816
// we don't want to expose Jackson dependency to the user. This needs databinding
1917
private ObjectNode payload;
2018

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.