terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

Send a `User-Agent` in GitHub API requests with `terraform-provider-github` and the version

Open timrogers opened this issue 3 years ago • 2 comments
trafficstars

This updates the transport used to make requests to the GitHub API to set a User-Agent request header with terraform-provider- github and the current version (e.g. terraform-provider-github/4.26.1).

Because this hooks in with the RoundTrip function, it can be expected to overwrite User-Agent values set elsewhere (e.g. as defaults or on a per-request basis by go-github or shurcooL/githubv4).

This change does mean that someone will have to update the Version constant with the new version when it is incremented. I have documented that in RELEASE.md.

This is only the second Go I've ever written, so I definitely won't be at all sensitive to feedback!

timrogers avatar Jul 03 '22 16:07 timrogers

@kfcampbell 👋🏻 Hope you're doing well! Would you be able to give this a quick review?

timrogers avatar Aug 09 '22 12:08 timrogers

I've run the PR checks and gave a couple of ideas on how to change the PR. Please let me know if you'd like to pair on updating this!

kfcampbell avatar Aug 09 '22 23:08 kfcampbell

👋 @timrogers @kfcampbell Any chance of reviving this? Seems super valuable to be able to segment API callers using this provider vs hand-rolled uses of go-github.

jeremyhayes avatar Feb 06 '23 15:02 jeremyhayes

@jeremyhayes I love the idea; we've unfortunately been rather resource-constrained recently and this hasn't been picked back up yet. PRs are appreciated!

kfcampbell avatar Feb 18 '23 00:02 kfcampbell

👋 Hey Friends, this pull request has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Nov 15 '23 01:11 github-actions[bot]