I'd like find out the following things from a multibranch pipeline script associated with a github scm provider
- Is this build happening for a branch or a pull request?
- If it is for a pull request, then I need to know these as well
- Commit-id of the tip of pull request
- Commit-id of the merge target
- Which branch is the destination for merging the pull request?
- Is the pull request originating from a forked repo or branch on the same repo?
Would it be possible to find all of these from the scm variable? If so how?
PS: complete documentation on what the scm variable contains would be useful