Skip to content

Support organization owner in Github api url #23

Closed
@PandaXass

Description

@PandaXass

When creating a registration token for self-hosted runner through Github API, the {owner} can be an organization or simply another Github account instead of the Github account which owns the access token.
https://docs.github.com/en/rest/reference/actions#create-a-registration-token-for-a-repository

For example:

curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \
  -u bob:access_token
  https://api.github.com/repos/myorg/hello-world/actions/runners/registration-token

Or

curl \
  -X POST \
  -H "Accept: application/vnd.github.v3+json" \
  -u bob:access_token
  https://api.github.com/repos/alice/hello-world/actions/runners/registration-token

And it is the same for "List self-hosted runners for a repository" endpoint.
https://docs.github.com/en/rest/reference/actions#list-self-hosted-runners-for-a-repository

Is it okay to introduce another variable to support above usecase? Thanks a lot in advance!
And I have created a PR for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions