Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59318

fill in user-agent with something specific to github-branch-source-plugin

      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:

      1. Some Scala code
      2. Sbt
      3. This jenkins plugin
      4. 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(); 

          [JENKINS-59318] fill in user-agent with something specific to github-branch-source-plugin

          Liam Newman added a comment -

          jsoref Totally support this being done. It might require some update to github-api library which you're already familiar with.

          Liam Newman added a comment - jsoref Totally support this being done. It might require some update to github-api library which you're already familiar with.

            Unassigned Unassigned
            jsoref Josh Soref
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: