Skip to content

Issue #2033: made code clearer on using number in some methods #2034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025
Merged
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
19 changes: 11 additions & 8 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ public GHUser getOwner() throws IOException {
/**
* Gets issue.
*
* @param id
* the id
* @param number
* the number of the issue
* @return the issue
* @throws IOException
* the io exception
*/
public GHIssue getIssue(int id) throws IOException {
return root().createRequest().withUrlPath(getApiTailUrl("issues/" + id)).fetch(GHIssue.class).wrap(this);
public GHIssue getIssue(int number) throws IOException {
return root().createRequest().withUrlPath(getApiTailUrl("issues/" + number)).fetch(GHIssue.class).wrap(this);
}

/**
Expand Down Expand Up @@ -1500,14 +1500,17 @@ public GHRepository forkTo(GHOrganization org) throws IOException {
/**
* Retrieves a specified pull request.
*
* @param i
* the
* @param number
* the number of the pull request
* @return the pull request
* @throws IOException
* the io exception
*/
public GHPullRequest getPullRequest(int i) throws IOException {
return root().createRequest().withUrlPath(getApiTailUrl("pulls/" + i)).fetch(GHPullRequest.class).wrapUp(this);
public GHPullRequest getPullRequest(int number) throws IOException {
return root().createRequest()
.withUrlPath(getApiTailUrl("pulls/" + number))
.fetch(GHPullRequest.class)
.wrapUp(this);
}

/**
Expand Down