mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 18:35:35 +00:00
Adding support for creating Codespaces and getting available machine types (#2929)
Adding support for creating Codespaces
This commit is contained in:
committed by
GitHub
parent
148162a34b
commit
35f1784781
@@ -5604,6 +5604,22 @@ namespace Octokit
|
||||
return "orgs/{0}/actions/runner-groups/{1}/repositories".FormatUri(org, runnerGroupId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <see cref="Uri"/> that handles the machine availability for a repository.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository.</param>
|
||||
/// <param name="repo">The name of the repository.</param>
|
||||
/// <param name="reference">The reference to check the machine availability for.</param>
|
||||
public static Uri GetAvailableMachinesForRepo(string owner, string repo, string reference)
|
||||
{
|
||||
if (reference is null)
|
||||
{
|
||||
return "repos/{0}/{1}/codespaces/machines".FormatUri(owner, repo);
|
||||
}
|
||||
|
||||
return "repos/{0}/{1}/actions/runners/availability?ref={3}".FormatUri(owner, repo, reference);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <see cref="Uri"/> that handles adding or removing of copilot licenses for an organisation
|
||||
/// </summary>
|
||||
@@ -5659,6 +5675,11 @@ namespace Octokit
|
||||
return "user/codespaces/{0}/stop".FormatUri(codespaceName);
|
||||
}
|
||||
|
||||
public static Uri CreateCodespace(string owner, string repo)
|
||||
{
|
||||
return "repos/{0}/{1}/codespaces".FormatUri(owner, repo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the <see cref="Uri"/> that lists the artifacts for a repository.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user