mirror of https://codeberg.org/gitnex/GitNex.git
Added interface and model
This commit is contained in:
parent
0daf0d1110
commit
5b4cb3ff8e
|
@ -5,6 +5,7 @@ import org.mian.gitnex.models.AddEmail;
|
|||
import org.mian.gitnex.models.Branches;
|
||||
import org.mian.gitnex.models.ExploreRepositories;
|
||||
import org.mian.gitnex.models.Files;
|
||||
import org.mian.gitnex.models.MergePullRequest;
|
||||
import org.mian.gitnex.models.NewFile;
|
||||
import org.mian.gitnex.models.PullRequests;
|
||||
import org.mian.gitnex.models.UpdateIssueAssignee;
|
||||
|
@ -31,7 +32,6 @@ import org.mian.gitnex.models.UserSearch;
|
|||
import org.mian.gitnex.models.UserTokens;
|
||||
import org.mian.gitnex.models.WatchRepository;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
|
@ -257,4 +257,6 @@ public interface ApiInterface {
|
|||
@GET("{owner}/{repo}/pulls/{filename}") // get pull diff file contents
|
||||
Call<ResponseBody> getFileDiffContents(@Path("owner") String owner, @Path("repo") String repo, @Path("filename") String fileName);
|
||||
|
||||
@POST("repos/{owner}/{repo}/pulls/{index}/merge") // merge a pull request
|
||||
Call<MergePullRequest> mergePullRequest(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") String index, @Body MergePullRequest jsonStr);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package org.mian.gitnex.models;
|
||||
|
||||
/**
|
||||
* Author M M Arif
|
||||
*/
|
||||
|
||||
public class MergePullRequest {
|
||||
|
||||
private String Do;
|
||||
private String MergeMessageField;
|
||||
private String MergeTitleField;
|
||||
|
||||
public MergePullRequest(String Do, String MergeMessageField, String MergeTitleField) {
|
||||
this.Do = Do;
|
||||
this.MergeMessageField = MergeMessageField;
|
||||
this.MergeTitleField = MergeTitleField;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue