Skip to content

Adding support for creating Codespaces and getting available machine types#2929

Merged
kfcampbell merged 5 commits intooctokit:mainfrom
noraa-junker:add-more-codespace-commands
Jul 29, 2024
Merged

Adding support for creating Codespaces and getting available machine types#2929
kfcampbell merged 5 commits intooctokit:mainfrom
noraa-junker:add-more-codespace-commands

Conversation

@noraa-junker
Copy link
Contributor

Resolves #2915


Before the change?

  • Adding two new functions to the Codespaces API:
MachinesCollection GetAvailableMachinesForRepo(string repoOwner, string repoName, string reference = null);
Codespace Create(string owner, string repo, NewCodespace newCodespace);
  • Plus two new types: MachinesCollection and NewCodespace

  • Plus one new StringEnum:

    public enum CodespaceLocation
    {
        [Parameter(Value = "EuropeWest")]
        EuropeWest,
        [Parameter(Value = "SoutheastAsia")]
        SoutheastAsia,
        [Parameter(Value = "UsEast")]
        UsEast,
        [Parameter(Value = "UsWest")]
        UsWest
    }
  • When retrieving a codespace the location is now also included.

After the change?

  • This new API additions allow the creation of new codespacesm
  • retrieving the location of a Codespace,
  • aswell as getting available machine types for a repository

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Contributor

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[FEAT]: Codespaces: Add support for creating codespaces and get machine types

2 participants