Skip to content

Commit 5611fc4

Browse files
authored
Include a header indicating if running from CI (#373)
1 parent afe462b commit 5611fc4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/platformclient/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ func (c *HTTPClient) DoJSON(method string, path string, successStatus int, reqBo
118118
req.Header.Set("Accept", "application/json")
119119
req.Header.Set("User-Agent", fmt.Sprintf("Replicated/%s", version.Version()))
120120

121+
if _, ok := os.LookupEnv("CI"); ok {
122+
req.Header.Set("X-Replicated-CI", os.Getenv("CI"))
123+
}
124+
121125
if err := addGitHubActionsHeaders(req); err != nil {
122126
return errors.Wrap(err, "add github actions headers")
123127
}

0 commit comments

Comments
 (0)