fix: need to convert responses to github format

This commit is contained in:
Derrick Hammer 2024-02-12 16:42:28 -05:00
parent c345f1c72a
commit 946f57fe4e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 12 additions and 4 deletions

View File

@ -238,7 +238,9 @@ func (r restApi) handlerCreateIssueComment(w http.ResponseWriter, request *http.
return 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) { func (r restApi) handlerUpdateIssueComment(w http.ResponseWriter, request *http.Request) {
@ -278,7 +280,9 @@ func (r restApi) handlerUpdateIssueComment(w http.ResponseWriter, request *http.
return 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) { 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 return
} }
newGhRelease := convertRelease(releaseResponse)
r.sendPagingHeaders(w, r2) 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) { 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 return
} }
newGhPullRequest := convertPullRequest(pullRequestResponse)
r.sendPagingHeaders(w, r2) 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 { func (r restApi) parseJsonBody(request *http.Request, obj interface{}) error {