diff --git a/api/routes_rest_api.go b/api/routes_rest_api.go index f48996f..f832c0a 100644 --- a/api/routes_rest_api.go +++ b/api/routes_rest_api.go @@ -238,7 +238,9 @@ func (r restApi) handlerCreateIssueComment(w http.ResponseWriter, request *http. return } - r.respond(w, http.StatusCreated, commentResponse) + newGhComment := convertIssueComment(commentResponse, nil) + + r.respond(w, http.StatusCreated, newGhComment) } func (r restApi) handlerUpdateIssueComment(w http.ResponseWriter, request *http.Request) { @@ -278,7 +280,9 @@ func (r restApi) handlerUpdateIssueComment(w http.ResponseWriter, request *http. return } - r.respond(w, http.StatusOK, commentResponse) + newGhComment := convertIssueComment(commentResponse, nil) + + r.respond(w, http.StatusOK, newGhComment) } func (r restApi) handlerCreateRelease(w http.ResponseWriter, request *http.Request) { @@ -315,8 +319,10 @@ func (r restApi) handlerCreateRelease(w http.ResponseWriter, request *http.Reque return } + newGhRelease := convertRelease(releaseResponse) + r.sendPagingHeaders(w, r2) - r.respond(w, http.StatusCreated, releaseResponse) + r.respond(w, http.StatusCreated, newGhRelease) } func (r restApi) handlerCreatePullRequest(w http.ResponseWriter, request *http.Request) { @@ -351,8 +357,10 @@ func (r restApi) handlerCreatePullRequest(w http.ResponseWriter, request *http.R return } + newGhPullRequest := convertPullRequest(pullRequestResponse) + r.sendPagingHeaders(w, r2) - r.respond(w, http.StatusCreated, pullRequestResponse) + r.respond(w, http.StatusCreated, newGhPullRequest) } func (r restApi) parseJsonBody(request *http.Request, obj interface{}) error {