Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,8 @@
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.23.0</version>
<configuration>
<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>2.0.0-alpha-1</version>
<type>jar</type>
</dependency>
</oldVersion>
<parameter>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> -->
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<!-- <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning> -->
<onlyModified>true</onlyModified>
<includeSynthetic>true</includeSynthetic>
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/kohsuke/github/GHAppInstallationToken.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.kohsuke.github;

import java.io.IOException;
import java.util.*;

// TODO: Auto-generated Javadoc
Expand Down Expand Up @@ -66,10 +65,8 @@ public GHRepositorySelection getRepositorySelection() {
* Gets expires at.
*
* @return date when this token expires
* @throws IOException
* on error
*/
public Date getExpiresAt() throws IOException {
public Date getExpiresAt() {
return GitHubClient.parseDate(expires_at);
}
}
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHBranch.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ public class GHBranch extends GitHubInteractiveObject {
*
* @param name
* the name
* @throws Exception
* the exception
*/
@JsonCreator
GHBranch(@JsonProperty(value = "name", required = true) String name) throws Exception {
GHBranch(@JsonProperty(value = "name", required = true) String name) {
Objects.requireNonNull(name);
this.name = name;
}
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHCommit.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,8 @@ public PagedIterable<GHPullRequest> listPullRequests() {
* Retrieves a list of branches where this commit is the head commit.
*
* @return {@link PagedIterable} with the branches where the commit is the head commit
* @throws IOException
* the io exception
*/
public PagedIterable<GHBranch> listBranchesWhereHead() throws IOException {
public PagedIterable<GHBranch> listBranchesWhereHead() {
return owner.root()
.createRequest()
.withUrlPath(String.format("/repos/%s/%s/commits/%s/branches-where-head",
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHCommitPointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ public GHCommitPointer() {
* This points to the user who owns the {@link #getRepository()}.
*
* @return the user
* @throws IOException
* the io exception
*/
@SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior")
public GHUser getUser() throws IOException {
public GHUser getUser() {
if (user != null)
return user.root().intern(user);
return user;
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/org/kohsuke/github/GHCommitStatus.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.kohsuke.github;

import java.io.IOException;

// TODO: Auto-generated Javadoc
/**
* Represents a status of a commit.
Expand Down Expand Up @@ -69,10 +67,8 @@ public String getDescription() {
* Gets creator.
*
* @return the creator
* @throws IOException
* the io exception
*/
public GHUser getCreator() throws IOException {
public GHUser getCreator() {
return root().intern(creator);
}

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,8 @@ protected synchronized void populate() throws IOException {
* List immediate children of this directory.
*
* @return the paged iterable
* @throws IOException
* the io exception
*/
public PagedIterable<GHContent> listDirectoryContent() throws IOException {
public PagedIterable<GHContent> listDirectoryContent() {
if (!isDirectory())
throw new IllegalStateException(path + " is not a directory");

Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/kohsuke/github/GHDeployment.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.kohsuke.github;

import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.Map;
Expand Down Expand Up @@ -169,10 +168,8 @@ public boolean isProductionEnvironment() {
* Gets creator.
*
* @return the creator
* @throws IOException
* the io exception
*/
public GHUser getCreator() throws IOException {
public GHUser getCreator() {
return root().intern(creator);
}

Expand Down
12 changes: 3 additions & 9 deletions src/main/java/org/kohsuke/github/GHDiscussion.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ public GHDiscussion() {
* Gets the html url.
*
* @return the html url
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public URL getHtmlUrl() throws IOException {
public URL getHtmlUrl() {
return GitHubClient.parseURL(htmlUrl);
}

Expand Down Expand Up @@ -122,10 +120,8 @@ public boolean isPrivate() {
* @param team
* the team in which the discussion will be created.
* @return a {@link GHLabel.Creator}
* @throws IOException
* the io exception
*/
static GHDiscussion.Creator create(GHTeam team) throws IOException {
static GHDiscussion.Creator create(GHTeam team) {
return new GHDiscussion.Creator(team);
}

Expand Down Expand Up @@ -154,10 +150,8 @@ static GHDiscussion read(GHTeam team, long discussionNumber) throws IOException
* @param team
* the team
* @return the paged iterable
* @throws IOException
* Signals that an I/O exception has occurred.
*/
static PagedIterable<GHDiscussion> readAll(GHTeam team) throws IOException {
static PagedIterable<GHDiscussion> readAll(GHTeam team) {
return team.root()
.createRequest()
.setRawUrlPath(getRawUrlPath(team, null))
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHEventInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ public GHUser getActor() throws IOException {
* Gets actor login.
*
* @return the login of the actor.
* @throws IOException
* on error
*/
public String getActorLogin() throws IOException {
public String getActorLogin() {
return actor.getLogin();
}

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/kohsuke/github/GHExternalGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,9 @@ void wrapUp(final GitHub root) { // auto-wrapUp when organization is known from
* Gets organization.
*
* @return the organization
* @throws IOException
* the io exception
*/
@SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior")
public GHOrganization getOrganization() throws IOException {
public GHOrganization getOrganization() {
return organization;
}

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/org/kohsuke/github/GHGist.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ public String getGistId() {
* Gets owner.
*
* @return User that owns this Gist.
* @throws IOException
* the io exception
*/
@SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected behavior")
public GHUser getOwner() throws IOException {
public GHUser getOwner() {
return owner;
}

Expand Down Expand Up @@ -265,10 +263,8 @@ public void delete() throws IOException {
* Updates this gist via a builder.
*
* @return the gh gist updater
* @throws IOException
* the io exception
*/
public GHGistUpdater update() throws IOException {
public GHGistUpdater update() {
return new GHGistUpdater(this);
}

Expand Down
21 changes: 5 additions & 16 deletions src/main/java/org/kohsuke/github/GHGistUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ public class GHGistUpdater {
* @param content
* the content
* @return the gh gist updater
* @throws IOException
* the io exception
*/
public GHGistUpdater addFile(@Nonnull String fileName, @Nonnull String content) throws IOException {
public GHGistUpdater addFile(@Nonnull String fileName, @Nonnull String content) {
updateFile(fileName, content);
return this;
}
Expand All @@ -55,10 +53,8 @@ public GHGistUpdater addFile(@Nonnull String fileName, @Nonnull String content)
* @param fileName
* the file name
* @return the GH gist updater
* @throws IOException
* Signals that an I/O exception has occurred.
*/
public GHGistUpdater deleteFile(@Nonnull String fileName) throws IOException {
public GHGistUpdater deleteFile(@Nonnull String fileName) {
files.put(fileName, null);
return this;
}
Expand All @@ -71,10 +67,8 @@ public GHGistUpdater deleteFile(@Nonnull String fileName) throws IOException {
* @param newFileName
* the new file name
* @return the gh gist updater
* @throws IOException
* the io exception
*/
public GHGistUpdater renameFile(@Nonnull String fileName, @Nonnull String newFileName) throws IOException {
public GHGistUpdater renameFile(@Nonnull String fileName, @Nonnull String newFileName) {
Map<String, String> file = files.computeIfAbsent(fileName, d -> new HashMap<>());
file.put("filename", newFileName);
return this;
Expand All @@ -88,10 +82,8 @@ public GHGistUpdater renameFile(@Nonnull String fileName, @Nonnull String newFil
* @param content
* the content
* @return the gh gist updater
* @throws IOException
* the io exception
*/
public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String content) throws IOException {
public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String content) {
Map<String, String> file = files.computeIfAbsent(fileName, d -> new HashMap<>());
file.put("content", content);
return this;
Expand All @@ -107,11 +99,8 @@ public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String conten
* @param content
* the content
* @return the gh gist updater
* @throws IOException
* the io exception
*/
public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String newFileName, @Nonnull String content)
throws IOException {
public GHGistUpdater updateFile(@Nonnull String fileName, @Nonnull String newFileName, @Nonnull String content) {
Map<String, String> file = files.computeIfAbsent(fileName, d -> new HashMap<>());
file.put("content", content);
file.put("filename", newFileName);
Expand Down
20 changes: 5 additions & 15 deletions src/main/java/org/kohsuke/github/GHIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,10 @@ public List<GHIssueComment> getComments() throws IOException {
* Obtains all the comments associated with this issue, without any filter.
*
* @return the paged iterable
* @throws IOException
* the io exception
* @see <a href="https://docs.github.com/en/rest/issues/comments#list-issue-comments">List issue comments</a>
* @see #queryComments() queryComments to apply filters.
*/
public PagedIterable<GHIssueComment> listComments() throws IOException {
public PagedIterable<GHIssueComment> listComments() {
return root().createRequest()
.withUrlPath(getIssuesApiRoute() + "/comments")
.toIterable(GHIssueComment[].class, item -> item.wrapUp(this));
Expand Down Expand Up @@ -717,10 +715,8 @@ protected String getIssuesApiRoute() {
* Gets assignee.
*
* @return the assignee
* @throws IOException
* the io exception
*/
public GHUser getAssignee() throws IOException {
public GHUser getAssignee() {
return root().intern(assignee);
}

Expand All @@ -737,10 +733,8 @@ public List<GHUser> getAssignees() {
* User who submitted the issue.
*
* @return the user
* @throws IOException
* the io exception
*/
public GHUser getUser() throws IOException {
public GHUser getUser() {
return root().intern(user);
}

Expand All @@ -752,10 +746,8 @@ public GHUser getUser() throws IOException {
* https://github.com/kohsuke/github-api/issues/60.
*
* @return the closed by
* @throws IOException
* the io exception
*/
public GHUser getClosedBy() throws IOException {
public GHUser getClosedBy() {
if (!"closed".equals(state))
return null;

Expand Down Expand Up @@ -864,10 +856,8 @@ protected static List<String> getLogins(Collection<GHUser> users) {
* Lists events for this issue. See https://developer.github.com/v3/issues/events/
*
* @return the paged iterable
* @throws IOException
* the io exception
*/
public PagedIterable<GHIssueEvent> listEvents() throws IOException {
public PagedIterable<GHIssueEvent> listEvents() {
return root().createRequest()
.withUrlPath(getRepository().getApiTailUrl(String.format("/issues/%s/events", number)))
.toIterable(GHIssueEvent[].class, item -> item.wrapUp(this));
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/org/kohsuke/github/GHLabel.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,9 @@ static Collection<String> toNames(Collection<GHLabel> labels) {
* @param repository
* the repository in which the label will be created.
* @return a {@link Creator}
* @throws IOException
* the io exception
*/
@BetaApi
static Creator create(GHRepository repository) throws IOException {
static Creator create(GHRepository repository) {
return new Creator(repository);
}

Expand Down Expand Up @@ -176,10 +174,8 @@ static GHLabel read(@Nonnull GHRepository repository, @Nonnull String name) thro
* @param repository
* the repository to read from
* @return iterable of all labels
* @throws IOException
* the io exception
*/
static PagedIterable<GHLabel> readAll(@Nonnull final GHRepository repository) throws IOException {
static PagedIterable<GHLabel> readAll(@Nonnull final GHRepository repository) {
return repository.root()
.createRequest()
.withUrlPath(repository.getApiTailUrl("labels"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.kohsuke.github;

import java.io.IOException;

// TODO: Auto-generated Javadoc
/**
* Returns any accounts associated with a plan, including free plans.
Expand Down Expand Up @@ -72,10 +70,8 @@ public enum Sort {
* OAuth Apps must use basic authentication with their client ID and client secret to access this endpoint.
*
* @return a paged iterable instance of GHMarketplaceAccountPlan
* @throws IOException
* on error
*/
public PagedIterable<GHMarketplaceAccountPlan> createRequest() throws IOException {
public PagedIterable<GHMarketplaceAccountPlan> createRequest() {
return builder.withUrlPath(String.format("/marketplace_listing/plans/%d/accounts", this.planId))
.toIterable(GHMarketplaceAccountPlan[].class, null);
}
Expand Down
Loading
Loading