terraform-provider-github
terraform-provider-github copied to clipboard
Send a `User-Agent` in GitHub API requests with `terraform-provider-github` and the version
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!
@kfcampbell 👋🏻 Hope you're doing well! Would you be able to give this a quick review?
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!
👋 @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 I love the idea; we've unfortunately been rather resource-constrained recently and this hasn't been picked back up yet. PRs are appreciated!
👋 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!