Add/Remove Reviewers and Assignees (#38)

Adds APIs for the ability to add or remove reviewers and assignees to a merge request. The eligible reviewers and assignees are pulled from the current members of a project.
This commit is contained in:
Harrison (Harry) Cramer
2023-08-16 21:42:53 -04:00
committed by GitHub
parent 6274746d4b
commit 844e093294
10 changed files with 368 additions and 44 deletions

View File

@@ -29,13 +29,16 @@ func main() {
}
m := http.NewServeMux()
m.Handle("/mr", withGitlabContext(http.HandlerFunc(UpdateHandler), c))
m.Handle("/mr/description", withGitlabContext(http.HandlerFunc(DescriptionHandler), c))
m.Handle("/mr/reviewer", withGitlabContext(http.HandlerFunc(ReviewersHandler), c))
m.Handle("/mr/assignee", withGitlabContext(http.HandlerFunc(AssigneesHandler), c))
m.Handle("/approve", withGitlabContext(http.HandlerFunc(ApproveHandler), c))
m.Handle("/revoke", withGitlabContext(http.HandlerFunc(RevokeHandler), c))
m.Handle("/info", withGitlabContext(http.HandlerFunc(InfoHandler), c))
m.Handle("/discussions", withGitlabContext(http.HandlerFunc(ListDiscussionsHandler), c))
m.Handle("/comment", withGitlabContext(http.HandlerFunc(CommentHandler), c))
m.Handle("/reply", withGitlabContext(http.HandlerFunc(ReplyHandler), c))
m.Handle("/members", withGitlabContext(http.HandlerFunc(ProjectMembersHandler), c))
port := fmt.Sprintf(":%s", os.Args[3])
server := &http.Server{