github-pr-coverage-status-plugin icon indicating copy to clipboard operation
github-pr-coverage-status-plugin copied to clipboard

Fix how URL is detected for a PR

Open oz123 opened this issue 7 years ago • 0 comments

This mostly boils down to removing PULL/ID from USER/REPO/PULL/ID.

All the other changes are debugging messages so it's easier to follow the logic.

This a possible fix for #39 and #42

My pipeline now contains the following statements:



...
currentBuild.result = 'SUCCESS'
                  try {
                      echo "In PR"
                      step([$class: 'CompareCoverageAction', scmVars: [GIT_URL: "https://github.com/mobilityhouse/testci",])
                  } catch (error) {
                    echo "Not in PR"
                    echo error.getMessage()
                  }



 post {
        success {
           script {
              if (env.BRANCH_NAME == 'master') {
              step([$class: 'MasterCoverageAction',
                  scmVars:
                    [GIT_URL: "https://github.com/mobilityhouse/testci",]
                   ])
              echo 'hura!'
              }
           }
        }


oz123 avatar Sep 29 '17 17:09 oz123