Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70619

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

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • None

      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.

            lanwen Kirill Merkushev
            jamesx James Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: