jenkinsci / pipeline-github-plugin

Pipeline: GitHub
https://plugins.jenkins.io/pipeline-github/
MIT License
159 stars 73 forks source link

Get the SHA of target master used #99

Closed ebadilla10 closed 3 years ago

ebadilla10 commented 3 years ago

Feature Request

I'd like to get the SHA of the target branch on a variable. Why? Because some checkers will run over the branch created + target branch (pr-merge) against target branch, so if any commit is added between the analysis on them, we would have checking different SHAs (SHA1 when the checker started against SHA2 which is a commit merged when the checker was running)

If you give me some details about what I can use for implement it, I can do it and send the PR.

aaronwalker commented 3 years ago

@ebadilla10 I think this feature belongs in another plugin it would make more sense for this to be part of the https://github.com/jenkinsci/branch-api-plugin since it responsible for injecting the CHANGE_* environment variables