feat(bootstrap-gcp): Add public keys of specified github team#230
Open
feat(bootstrap-gcp): Add public keys of specified github team#230
Conversation
f42e784 to
918d64a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support to bootstrap-gcp for fetching SSH public keys from members of a specified GitHub org/team and injecting those keys into the created GCE VMs’ ssh-keys instance metadata.
Changes:
- Introduces a small GitHub client abstraction (real + mock) for listing team members and their SSH keys.
- Extends GCP bootstrap environment/config/CLI flags to accept
github-team-org+github-team-slugand wires the GitHub client into the bootstrapper. - Updates
EnsureComputeInstancesand tests to include team keys and avoid repeated SSH key file reads.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
internal/bootstrap/gcp/mocks.go |
Adds a mock GitHub client used by bootstrapper tests. |
internal/bootstrap/gcp/github_client.go |
Adds real GitHub client wrapper + interface used by the bootstrapper. |
internal/bootstrap/gcp/gcp_test.go |
Updates bootstrapper construction and adds/adjusts tests for GitHub team validation and SSH metadata behavior. |
internal/bootstrap/gcp/gcp.go |
Adds env fields + validation, injects GitHub client, fetches team keys, and updates SSH metadata generation. |
cli/cmd/bootstrap_gcp.go |
Adds CLI flags for GitHub team org/slug and wires up the real GitHub client. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: NautiluX <2600004+NautiluX@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
5eac28f to
f7a8170
Compare
a3902e4 to
1934d79
Compare
6b2bf5b to
ed3179f
Compare
Signed-off-by: NautiluX <2600004+NautiluX@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the ability to specify a GitHub team and org. All team member's public keys will be added to created VMs.
Also, updated some variable names for consistent naming (Github vs GitHub)
ClickUp: https://app.clickup.com/t/869cfj7ku