Skip to content

Commit

Permalink
Merge master into prod, release: v1.1.37
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorbenei committed Nov 22, 2017
2 parents d03255a + 96af00c commit 369e472
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion service/hook/bitbucketv2/bitbucketv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func detectContentTypeAttemptNumberAndEventKey(header http.Header) (string, stri

attemptNum := header.Get("X-Attempt-Number")
if attemptNum == "" {
return "", "", "", errors.New("No X-Attempt-Number Header found")
attemptNum = "1"
}

return contentType, attemptNum, eventKey, nil
Expand Down
8 changes: 4 additions & 4 deletions service/hook/bitbucketv2/bitbucketv2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ func Test_detectContentTypeAttemptNumberAndEventKey(t *testing.T) {
"Content-Type": {"application/json"},
}
contentType, attemptNum, eventKey, err := detectContentTypeAttemptNumberAndEventKey(header)
require.EqualError(t, err, "No X-Attempt-Number Header found")
require.Equal(t, "", contentType)
require.Equal(t, "", eventKey)
require.Equal(t, "", attemptNum)
require.NoError(t, err)
require.Equal(t, "application/json", contentType)
require.Equal(t, "repo:push", eventKey)
require.Equal(t, "1", attemptNum)
}
}

Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version

// VERSION ...
const VERSION = "1.1.36"
const VERSION = "1.1.37"

0 comments on commit 369e472

Please sign in to comment.