Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version = 1

[[analyzers]]
name = "go"
enabled = true

[analyzers.meta]
import_path = "github.com/netlify/git-gateway"
4 changes: 4 additions & 0 deletions api/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ func rewriteLinksInBitBucketResponse(resp *http.Response, endpointAPIURL, proxyA

newBodyBytes, err := json.Marshal(b)

if err != nil {
return err
}

switch resp.Header.Get("Content-Encoding") {
case "gzip":
var compressedBody bytes.Buffer
Expand Down
2 changes: 1 addition & 1 deletion api/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func rewriteGitlabLinkEntry(linkEntry, endpointAPIURL, proxyAPIURL string) strin

func rewriteGitlabLinks(linkHeader, endpointAPIURL, proxyAPIURL string) string {
linkEntries := strings.Split(linkHeader, ",")
finalLinkEntries := make([]string, len(linkEntries), len(linkEntries))
finalLinkEntries := make([]string, len(linkEntries))
for i, linkEntry := range linkEntries {
finalLinkEntries[i] = rewriteGitlabLinkEntry(linkEntry, endpointAPIURL, proxyAPIURL)
}
Expand Down
2 changes: 0 additions & 2 deletions models/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"github.com/netlify/git-gateway/conf"
)

const baseConfigKey = ""

type Instance struct {
ID string `json:"id" bson:"_id,omitempty"`
// Netlify UUID
Expand Down