Skip to content

Commit a93be40

Browse files
committed
Send a user-agent
Make it easier to identify git-buildkite API usage.
1 parent d105b16 commit a93be40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-buildkite

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
VERSION="v0.6.0"
4+
35
BUILDKITE_ORGANIZATION="${BUILDKITE_ORGANIZATION:-$(git config buildkite.organization)}"
46

57
if [[ -z "$BUILDKITE_ORGANIZATION" && -n "$BUILDKITE_ACCOUNT" ]]; then
@@ -139,7 +141,8 @@ function build() {
139141
# status code and the response body on error, so we have to check
140142
# the content for errors later.
141143
curl -# "https://api.buildkite.com/v2/organizations/${BUILDKITE_ORGANIZATION}/pipelines/${BUILDKITE_PIPELINE}/builds" \
142-
-H "Authorization: Bearer $BUILDKITE_API_KEY" \
144+
-A "git-buildkite/${VERSION}" \
145+
-H "Authorization: Bearer ${BUILDKITE_API_KEY}" \
143146
-X POST \
144147
-F "branch=$1" \
145148
-F "commit=$2" \

0 commit comments

Comments
 (0)