Using the multibranch source plugin with github and pipelines, I notice
that the commit from the github PR will sometimes be merged with
remotes/origin/master and that merge commit is what GIT_COMMIT is set
to which is what built and tested. I.e.:
> git fetch --no-tags --progress
https://github.com/foo/bar.git +refs/pull/123/head:refs/remotes/origin/PR-123 +refs/heads/master:refs/remotes/origin/master # timeout=10
Merging remotes/origin/master commit 33a67667a8944137ab8fb36e82cf56c98f84a40a into PR head commit 770d0ad5a3f34254702d34ef880f1502617e5888
Merge succeeded, producing efcd704e69f7ff30388067d2a99eeee9ea49d644
Checking out Revision efcd704e69f7ff30388067d2a99eeee9ea49d644 (PR-123)
GIT_COMMIT is then set to efcd704e69f7ff30388067d2a99eeee9ea49d644.
But in one of my pipeline steps I need to know the original PR commit
sha, which is 770d0ad5a3f34254702d34ef880f1502617e5888 in this case.
Is that exposed in any way during a pipeline step?
Cheers,
b.