On Wed, Jun 5, 2019 at 6:37 AM Joseph P <joseph...@gmail.com> wrote: > branch source plugin uses branch API plugin which contributes the environment > variables. > There is also a way for plugins to retrieve this see > https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/BranchNameContributor.java
Yes `BranchNameContributor` adds certain environment variables, but none which would indicate a PR head commit hash. That is a concept which is specific to GitHub (or analogous systems), so it cannot be in `branch-api`. For example, `github-branch-source` _could_ be enhanced to define an `EnvironmentContributor` for `PullRequestSCMRevision.pullHash`. Alternately, `ChangeRequestSCMRevision` could be enhanced to allow subtypes to define an opaque “commit ID” token, in which case `BranchNameContributor` could bind it when set and `PullRequestSCMRevision` and its analogues could implement the API. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3d96GM4n%2Bz3SWCtN7rGKLsL%3D_qXp4cooMPjognnto9nA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.