When building PRs from origin (not forks), their Jenkinsfile is not treated as trusted and loaded from the base branch instead:

      Loading trusted files from base branch develop at 3ad383ee0eeffc92c9712dc8e3022c4b43a75c94 rather than 3e2b6e35cbf0fd2d4c029fcd23560f04b1976618

       

      The problem was fixed in JENKINS-40652 but after several "refactorings" the problem seems to have reoccurred.

          [JENKINS-50290] origin pr builds not treated as trusted

          René Kießig added a comment -

          Any updates on this issue?

          René Kießig added a comment - Any updates on this issue?

          Falko Modler added a comment - - edited

          This is pretty much a blocker for us.

          If someone (stephenconnolly ?) could point me in the right direction I'd take a stab at this. I am lost somewhere between BitbucketSCMSource.getTrustedRevision(SCMRevision, TaskListener) and OriginChangeRequestSCMHeadAuthority.checkTrusted(SCMSourceRequest, ChangeRequestSCMHead2)...

          Falko Modler added a comment - - edited This is pretty much a blocker for us. If someone ( stephenconnolly ?) could point me in the right direction I'd take a stab at this. I am lost somewhere between BitbucketSCMSource.getTrustedRevision(SCMRevision, TaskListener) and OriginChangeRequestSCMHeadAuthority.checkTrusted(SCMSourceRequest, ChangeRequestSCMHead2) ...

          Guys, any news on this?

          Alberto Massidda added a comment - Guys, any news on this?

          Victor Ruiz added a comment -

          Hi,

          after several minutes fighting against the same "issue" I found in my project configuration that I had enabled the "Forks in the same account" as trust policy to discover pull requests from forks.

          Please, could you explore to change to "Everyone" in case that your repository is private? If this is public, consider to stick to the guidelines in "Forks in the same account".

          I'm sorry if this is a real bug, but I had the same effects that you were mentioning, and at the end it was just a matter of configuration. 

           

          Victor Ruiz added a comment - Hi, after several minutes fighting against the same "issue" I found in my project configuration that I had enabled the "Forks in the same account" as trust policy to discover pull requests from forks. Please, could you explore to change to "Everyone" in case that your repository is private? If this is public, consider to stick to the guidelines in "Forks in the same account". I'm sorry if this is a real bug, but I had the same effects that you were mentioning, and at the end it was just a matter of configuration.   

          Nikolas Falco added a comment -

          Is this bug still present in latest plugin version?

          Nikolas Falco added a comment - Is this bug still present in latest plugin version?

            nfalco Nikolas Falco
            szevez John Szivós
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: