technote-space / workflow-conclusion-action

GitHub action to get workflow conclusion.
MIT License
142 stars 39 forks source link

Private repositories not supported? #124

Open s0undt3ch opened 1 year ago

s0undt3ch commented 1 year ago

Describe the bug:

The exact same workflow, with the exception that one is on a public repo while the other is on a private repo, the private repo fails to get the job statuses...

Expected behavior:

To work on private repositories.

Screenshots:

RequestError [HttpError]: Resource not accessible by integration
    at /opt/actions-runner/_work/_actions/technote-space/workflow-conclusion-action/v3/lib/main.js:85431:27
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.next (/opt/actions-runner/_work/_actions/technote-space/workflow-conclusion-action/v3/lib/main.js:87610:38)
    at async execute (/opt/actions-runner/_work/_actions/technote-space/workflow-conclusion-action/v3/lib/main.js:88828:18)
    at async run (/opt/actions-runner/_work/_actions/technote-space/workflow-conclusion-action/v3/lib/main.js:88848:5) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/saltstack/<my-user>/<my-private-repo>/actions/runs/5557068364/jobs',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      connection: 'close',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Fri, 14 Jul 2023 18:21:45 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'GitHub.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': 'B0C5:48EF:7870F77:7BA691D:64B19239',
      'x-ratelimit-limit': '1000',
      'x-ratelimit-remaining': '970',
      'x-ratelimit-reset': '1689359299',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '30',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run'
    }
  },
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/<my-user>/<my-private-repo>/actions/runs/5557068364/jobs',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'octokit-core.js/3.6.0 Node.js/16.16.0 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { agent: [Agent], hook: [Function: bound bound register$1] }
  }
}
welcome[bot] commented 1 year ago

:raised_hands: Thanks for opening your first issue here! Be sure to follow the issue template!