Improve the docs on https://plugins.jenkins.io/github/ page

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      On the main github plugin page, https://plugins.jenkins.io/github/ we see this:

      def getCommitSha() {
        sh "git rev-parse HEAD > .git/current-commit"
        return readFile(".git/current-commit").trim()
      }
      
      def updateGithubCommitStatus(build) {
        // workaround https://issues.jenkins-ci.org/browse/JENKINS-38674
        commitSha = getCommitSha() 
        // ...

       

      but when looking at the actual ticket, the last-reported comment which seems to solve an important issue for github-prs is to instead do:

      def getCommitSha() {
        sh "git show-ref -s $GIT_BRANCH > .git/current-commit"
        return readFile(".git/current-commit").trim()
      } 

      which... if the original ticket isn't getting fixed, appears to be the better workaround to put into your public-facing documentation.

            Assignee:
            Kirill Merkushev
            Reporter:
            James Nelson
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: