jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-59318] fill in user-agent with something specific to github-branch-source-plugin
- Dominant language
- Java
- Stars
- 217
- Forks
- 398
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
There are lots of things that use OkHttp.
OkHttp okhttp#1063 provides a default user-agent, but that does make it easy to figure out what is (ab)using quotas.
It's traditional for clients of libraries to fill in their own useragent (typically embedding their underlying agent w/in the field).
For a general sense of how user-agents are written, please see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
In general, basically the syntax is:
TokenA/1.1 (platform; information; ...) TokenB/2.3 ...
The GitHub.com folks reported that the majority of my quota was spent by:
okhttp/2.7.5
But I can't easily tell if that's:
- Some Scala code
- Sbt
- This jenkins plugin
- Some other jenkins plugin
Ideally, the user-agent would be something like:
github-branch-source-plugin/2.5.7 okhttp/2.7.5
If you expect to have issues involving the java version, then including the java version in the UA could be useful...
To get the okhttp version one can do something like:
import com.squareup.okhttp.internal.Version;
Version.userAgent();
---
Originally reported by jsoref, imported from: fill in user-agent with something specific to github-branch-source-plugin
Raw content of original issue
There are lots of things that use OkHttp.
OkHttp okhttp#1063 provides a default user-agent, but that does make it easy to figure out what is (ab)using quotas.
It's traditional for clients of libraries to fill in their own useragent (typically embedding their underlying agent w/in the field).
For a general sense of how user-agents are written, please see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
In general, basically the syntax is:
TokenA/1.1 (platform; information; ...) TokenB/2.3 ...The GitHub.com folks reported that the majority of my quota was spent by:
okhttp/2.7.5But I can't easily tell if that's:
- Some Scala code
- Sbt
- This jenkins plugin
- Some other jenkins plugin
Ideally, the user-agent would be something like:
github-branch-source-plugin/2.5.7 okhttp/2.7.5If you expect to have issues involving the java version, then including the java version in the UA could be useful...
To get the okhttp version one can do something like:
import com.squareup.okhttp.internal.Version;
Version.userAgent();
Contributor guide
Assessment
This issue has not been assessed yet.