Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Runner Register GitHub API URL to Support Org-level Runner #339

Merged
merged 3 commits into from
Feb 24, 2020

Conversation

lokesh755
Copy link
Contributor

@lokesh755 lokesh755 commented Feb 19, 2020

Draft PR

Updated GitHub API request as per this -> https://github.com/github/c2c-actions-runtime/issues/373#issuecomment-588394924

Sample request

POST https://api.github.com/actions/runner-registration HTTP/1.1
Host: api.github.com
Authorization: RemoteAuth AAO2GDSAMPLEIQLJBOI2BZ26JXCTA
User-Agent: GitHubActionsRunner-win-x64/2.165.0
Content-Type: application/json; charset=utf-8
Content-Length: 50

{"url":"https://github.com/bbq-beets/logopu-test"}

var gitHubUrl = new UriBuilder(githubUrl);
var githubApiUrl = $"https://api.{gitHubUrl.Host}/repos/{gitHubUrl.Path.Trim('/')}/actions-runners/registration";
var gitHubUrlBuilder = new UriBuilder(githubUrl);
var githubApiUrl = $"https://api.{gitHubUrlBuilder.Host}/actions/register-runner";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this new api ready for production usage?
if not, then you probably want to keep the GetTenantCredential() as it is and add a new method, like: GetTenantCredentialPreview(), and flip between these 2 bases on some env variable (GITHUB_NEW_REGISTERENDPOINT=true) to test the new endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be in production tomorrow. I just created this little early, so that you can have a look. Will merge it once the api is in production.

@TingluoHuang TingluoHuang changed the title Update GitHub API URL Update Runner Register GitHub API URL to Support Org-level Runner Feb 20, 2020
@lokesh755 lokesh755 merged commit a6f144b into master Feb 24, 2020
@lokesh755 lokesh755 deleted the users/logopu/update_github_api_url branch February 24, 2020 14:15
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
…tions#339)

* Update GitHub API URL

* pr comments

* Updated GitHub API URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants