committed by
GitHub
parent
2028be2154
commit
8724847d5a
@@ -4,7 +4,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/xanzy/go-gitlab"
|
"github.com/xanzy/go-gitlab"
|
||||||
@@ -42,12 +41,7 @@ func UpdateHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
git, err := gitlab.NewClient(c.authToken)
|
mr, res, err := c.git.MergeRequests.UpdateMergeRequest(c.projectId, c.mergeId, &gitlab.UpdateMergeRequestOptions{Description: &updateRequest.Description})
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Failed to create client: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
mr, res, err := git.MergeRequests.UpdateMergeRequest(c.projectId, c.mergeId, &gitlab.UpdateMergeRequestOptions{Description: &updateRequest.Description})
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.handleError(w, err, "Could not edit merge request", http.StatusBadRequest)
|
c.handleError(w, err, "Could not edit merge request", http.StatusBadRequest)
|
||||||
|
|||||||
Reference in New Issue
Block a user