Skip to content

BUG: Getting a score -1 due to Branch-Protection check #895

@miguelnietoa

Description

@miguelnietoa

Describe the bug
The score is not shown in the badge due to an internal error. Notice the JSON below with the "reason": "internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration".

API Response:

{
  "date":"2022-09-07",
  "repo":{
    "name":"github.com/kommitters/editorjs-toggle-block",
    "commit":"58c327968b01569437633c3b1958cd858e63ea38"
  },
  "scorecard":{
    "version":"v4.3.1",
    "commit":"70d045b9ef00e7171ce3950aca38eef6ea4d7308"
  },
  "score":-1,
  "checks":[
    {
      "name":"Branch-Protection",
      "score":-1,
      "reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration",
      "details":null,
      "documentation":{
        "short":"Determines if the default and release branches are protected with GitHub's branch protection settings.",
        "url":"https://github.com/ossf/scorecard/blob/70d045b9ef00e7171ce3950aca38eef6ea4d7308/docs/checks.md#branch-protection"
      }
    }
  ]
}

Expected behavior
API Response should include the score different from -1.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions