Details

    • Similar Issues:

      Description

      On building a head revision of a GitHub PR, I am getting the following NPE.
      It does not seem to fail on every PR. Due to the code, this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

      Build log:

      Started by user XXXX
      10:34:23 Connecting to https://api.github.com using xxxxx/****** (GitHub Account)
      
      GitHub has been notified of this commit’s build result
      
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
      	at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFileSystem.java
            http://jenkins-ci.org/commit/github-branch-source-plugin/d3391ba0edc70b40cedb8730f3ffff2accb41fa5
            Log:
            [FIXED JENKINS-46449] Better null safety

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFileSystem.java http://jenkins-ci.org/commit/github-branch-source-plugin/d3391ba0edc70b40cedb8730f3ffff2accb41fa5 Log: [FIXED JENKINS-46449] Better null safety

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                maybee Malte Brunnlieb
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: