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

Feature/GitHub codespaces organization #416

Open
wants to merge 97 commits into
base: master
Choose a base branch
from

Conversation

vercellone
Copy link
Contributor

@vercellone vercellone commented Sep 15, 2023

Description

Add outstanding support for Codespaces organizations and Codespaces machines.

Issues Fixed

References

Codespaces/organizations

Codespaces/machines

Checklist

  • You actually ran the code that you just wrote, especially if you did just "one last quick change".
  • Comment-based help added/updated, including examples.
  • Static analysis is reporting back clean.
  • New/changed code adheres to our coding guidelines.
  • Formatters were created for any new types being added.
  • New/changed code continues to support the pipeline.
  • Changes to the manifest file follow the manifest guidance.
  • Unit tests were added/updated and are all passing. See testing guidelines. This includes making sure that all pipeline input variations have been covered.
  • Relevant usage examples have been added/updated in USAGE.md.
  • If desired, ensure your name is added to our Contributors list

@vercellone
Copy link
Contributor Author

Please review, @HowardWolosky.

@vercellone
Copy link
Contributor Author

TypeName assertions resolved. Any other feedback, @HowardWolosky?

Copy link
Member

@HowardWolosky HowardWolosky left a comment

Choose a reason for hiding this comment

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

Thanks for those updates. Looks just about there. I'll kick off a validation run to see if I missed anything else.

GitHubCodespaces.ps1 Show resolved Hide resolved
@@ -769,11 +920,22 @@ filter Stop-GitHubCodespace
GitHub Apps must have write access to the codespaces_lifecycle_admin repository permission to use this endpoint.
#>
[CmdletBinding(
DefaultParameterSetName = 'AuthenticatedUser',
Copy link
Member

Choose a reason for hiding this comment

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

My preference here would be to avoid ambiguous code. As a code reader, it took too much time for me to look at what's here and parse out what might be happening. A comment could probably address that, but even better would simply be having the code be declarative on intention. In this specific scenario, this could be resolved by augmenting the $CodespaceName declaration to be part of two different parametersets, and then having the default one be one that's actually defined.

        [Parameter(
            Mandatory,
            ValueFromPipeline,
            ValueFromPipelineByPropertyName,
            ParameterSetName = 'Organization')]
        [Parameter(
            Mandatory,
            ValueFromPipeline,
            ValueFromPipelineByPropertyName,
            ParameterSetName = 'AuthenticatedUser')]
        [string] $CodespaceName,

GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
GitHubCodespaces.ps1 Outdated Show resolved Hide resolved
@HowardWolosky
Copy link
Member

/azp run PowerShellForGitHub-CI

Co-authored-by: Howard Wolosky <[email protected]>
vercellone and others added 2 commits April 12, 2024 21:13
$null = Invoke-GHRestMethod @params

Co-authored-by: Howard Wolosky <[email protected]>
@vercellone
Copy link
Contributor Author

Please review again, @HowardWolosky.

@vercellone
Copy link
Contributor Author

@HowardWolosky 8 months!? Your resource management policy seems a bit biased.

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.

None yet

2 participants