Open enummela opened 4 years ago
same with the signature (Coment, body)
and if you give permissions for unsafe script (in scriptApproval) you get this new error:
groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.pipeline.github.PullRequestGroovyObject.review() is applicable for argument types: (java.lang.String, java.lang.String)
related? https://github.com/jenkinsci/pipeline-github-plugin/issues/82
If you look at the tags for various release versions of this plugin (e.g. https://github.com/jenkinsci/pipeline-github-plugin/tree/pipeline-github-2.6 ), you can see that the PullRequestGroovyObject.review
method did not make it into a release until release version 2.7.
Therefore, the MissingMethodException
error makes perfect sense: if you try to call a method that isn't in the version you have, it won't work.
Note that the RejectedAccessException
that was initially reported is a Jenkins sandbox-security bug: https://issues.jenkins.io/browse/JENKINS-72620 (basically, the sandbox security checker interacts with groovy method resolution to give a meaningless error if you try to call a method that isn't there)
We are using version
2.5
of this plugin. It looks like thereview
method has been available (and whitelisted) since 2018. Any help with this would be much appreciated!Here is the relevant part of the pipeline:
This is from the pipeline log: