-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add promise-based methods for GitHub client service #618
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,9 +70,21 @@ public interface GitHubClientService { | |
* the repository name. | ||
* @param callback | ||
* callback called when operation is done. | ||
* @deprecated use {@link #getForks(String user, String repository)} | ||
*/ | ||
@Deprecated | ||
void getForks(@NotNull String user, @NotNull String repository, @NotNull AsyncRequestCallback<GitHubRepositoryList> callback); | ||
|
||
/** | ||
* Get list of forks for given repository | ||
* | ||
* @param user | ||
* the owner of the repository. | ||
* @param repository | ||
* the repository name. | ||
*/ | ||
Promise<GitHubRepositoryList> getForks(String user, String repository); | ||
|
||
/** | ||
* Fork the given repository for the authorized user. | ||
* | ||
|
@@ -82,9 +94,21 @@ public interface GitHubClientService { | |
* the repository name. | ||
* @param callback | ||
* callback called when operation is done. | ||
* @deprecated use {@link #fork(String, String)} | ||
*/ | ||
@Deprecated | ||
void fork(@NotNull String user, @NotNull String repository, @NotNull AsyncRequestCallback<GitHubRepository> callback); | ||
|
||
/** | ||
* Fork the given repository for the authorized user. | ||
* | ||
* @param user | ||
* the owner of the repository to fork. | ||
* @param repository | ||
* the repository name. | ||
*/ | ||
Promise<GitHubRepository> fork(String user, String repository); | ||
|
||
/** | ||
* Add a comment to the issue on the given repository. | ||
* | ||
|
@@ -111,9 +135,21 @@ void commentIssue(@NotNull String user, @NotNull String repository, @NotNull Str | |
* the repository name. | ||
* @param callback | ||
* callback called when operation is done. | ||
* @deprecated use {@link #getPullRequests(String, String)} | ||
*/ | ||
@Deprecated | ||
void getPullRequests(@NotNull String owner, @NotNull String repository, @NotNull AsyncRequestCallback<GitHubPullRequestList> callback); | ||
|
||
/** | ||
* Get pull requests for given repository. | ||
* | ||
* @param owner | ||
* the repository owner. | ||
* @param repository | ||
* the repository name. | ||
*/ | ||
Promise<GitHubPullRequestList> getPullRequests(@NotNull String owner, @NotNull String repository); | ||
|
||
/** | ||
* Get a pull request by id for a given repository. | ||
* | ||
|
@@ -142,10 +178,28 @@ void getPullRequest(@NotNull String owner, | |
* the pull request information. | ||
* @param callback | ||
* callback called when operation is done. | ||
* @deprecated use {@link #createPullRequest(String, String, GitHubPullRequestCreationInput)} | ||
*/ | ||
void createPullRequest(@NotNull String user, @NotNull String repository, @NotNull GitHubPullRequestCreationInput input, | ||
@Deprecated | ||
void createPullRequest(@NotNull String user, | ||
@NotNull String repository, | ||
@NotNull GitHubPullRequestCreationInput input, | ||
@NotNull AsyncRequestCallback<GitHubPullRequest> callback); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this method changed directly instead of deprecation old method and new method addition just like for other methods you did? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we just fixed the formatting, and do the same things as with other methods (writing new one) |
||
|
||
/** | ||
* Create a pull request on origin repository | ||
* | ||
* @param user | ||
* the owner of the repository. | ||
* @param repository | ||
* the repository name. | ||
* @param input | ||
* the pull request information. | ||
*/ | ||
Promise<GitHubPullRequest> createPullRequest(@NotNull String user, | ||
@NotNull String repository, | ||
@NotNull GitHubPullRequestCreationInput input); | ||
|
||
/** | ||
* Get the list of available public repositories for a GitHub user. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
@Deprecated
annotation.