-
Improvement
-
Resolution: Won't Do
-
Minor
The GitHub organisation plugin automatically passes in an "scm" variable to Pipeline scripts, which allows you to use it like so:
```
checkout scm: scm
```
I want to be able to modify the `scm` variable, because there's no other way of checking out the merged result for PRs. In particular, I want to be able to do:
```
scm.getExtensions().add([$class: 'RelativeTargetDirectory', relativeTargetDir: name])
scm.getExtensions().add([$class: 'CleanCheckout'])
```
However, by default calling getExtensions is not allowed in Pipeline scripts (in the Groovy sandbox), which means I can't put this in my Pipeline shared library without getting everyone that uses it to whitelist those methods.