Skip to content

Commit 87c989e

Browse files
afrittolitekton-robot
authored andcommitted
Set the user-agent in the release name tool
Wikimedia requires an user-agent being set, so adding one to the tool that fetches the robot page for release names. Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
1 parent 22c30c2 commit 87c989e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tekton/release_names.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func httpGet(url string) (*http.Response, error) {
7272
if err != nil {
7373
return nil, err
7474
}
75+
76+
req.Header.Set("User-Agent", "golang-tekton-bot/0.1")
77+
7578
return http.DefaultClient.Do(req)
7679
}
7780

0 commit comments

Comments
 (0)