feat!: MAJOR release. Update go to 1.25, and add migration path (#520)

BREAKING CHANGE: This bumps Go and external packages to later versions.
This commit is contained in:
Harrison Cramer
2026-01-30 21:54:00 -05:00
parent 7dba805f6a
commit 3d2828a950
61 changed files with 358 additions and 266 deletions

View File

@@ -8,7 +8,7 @@ import (
"net/http"
"os"
"github.com/xanzy/go-gitlab"
gitlab "gitlab.com/gitlab-org/api/client-go"
)
type FileReader interface {
@@ -48,7 +48,7 @@ func (ar attachmentReader) ReadFile(path string) (io.Reader, error) {
}
type FileUploader interface {
UploadFile(pid interface{}, content io.Reader, filename string, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectFile, *gitlab.Response, error)
UploadProjectMarkdown(pid any, content io.Reader, filename string, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMarkdownUploadedFile, *gitlab.Response, error)
}
type attachmentService struct {
@@ -67,7 +67,7 @@ func (a attachmentService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
projectFile, res, err := a.client.UploadFile(a.projectInfo.ProjectId, file, payload.FileName)
projectFile, res, err := a.client.UploadProjectMarkdown(a.projectInfo.ProjectId, file, payload.FileName)
if err != nil {
handleError(w, err, fmt.Sprintf("Could not upload %s to Gitlab", payload.FileName), http.StatusInternalServerError)
return