Add Issue Subscribtion (#203)

rename Context

move things to IssueActions

rm unused API func

get Context only one time

add repoWatch into tinyDB

add maginal Issue Un-/Subscription support

add Issue Subscribtion

 * api
 * layout

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/203
Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
6543
2020-04-05 09:54:34 +00:00
committed by M M Arif
parent d2490bf6f9
commit 1dc61af683
10 changed files with 473 additions and 41 deletions

View File

@@ -252,6 +252,12 @@ public interface ApiInterface {
@DELETE("repos/{owner}/{repo}/subscription") // un watch a repository
Call<JsonElement> unWatchRepository(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName);
@PUT("repos/{owner}/{repo}/issues/{index}/subscriptions/{user}") // subscribe user to issue
Call<Void> addIssueSubscriber(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int issueIndex, @Path("user") String issueSubscriber);
@DELETE("repos/{owner}/{repo}/issues/{index}/subscriptions/{user}") // unsubscribe user to issue
Call<Void> delIssueSubscriber(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int issueIndex, @Path("user") String issueSubscriber);
@GET("repos/{owner}/{repo}/pulls") // get repository pull requests
Call<List<PullRequests>> getPullRequests(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("state") String state, @Query("limit") int limit);