Labbs / github-actions-exporter

github-actions-exporter for prometheus
MIT License
224 stars 83 forks source link

Org level write permissions #55

Open jcook-uptycs opened 1 year ago

jcook-uptycs commented 1 year ago

I see this app needs write permissions at the org level.

repo
  - repo:status
  - repo_deployment
  - public_repo

admin:org
  - write:org
  - read:org

Can I get details as to why this is needed?

vsarunas commented 10 months ago

I believe this is due to the following:

ListOrganizationRunners error for org ORG: GET https://api.github.com/orgs/ORG/actions/runners?per_page=200: 403 Must have admin rights to Repository. []

Which is a Github requirement:

You must authenticate using an access token with the admin:org scope to use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations. Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.