-
Notifications
You must be signed in to change notification settings - Fork 51
feat: sync secrets GitHub environments #650
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
Conversation
…on parameters for improved readability
…ment name parameter and implement query for fetching GitHub environments
…ent name to the component
…sitory and enhance UI for environment selection
…ment name and add query for fetching GitHub environments
Awesome, this looks great! For the open questions:
|
I've built this locally and done a short test run, so far I haven't managed to break anything (apart from parts of the build process, I'll put that in a separate issue) Regarding the open questions:
Thanks for your work on this, much appreciated! |
Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for syncing secrets to GitHub repository environments, expanding the existing GitHub Actions integration to target specific environments rather than just repository-level secrets.
- Added optional environment selection in the GitHub sync configuration UI
- Extended the GraphQL schema and mutations to support environment-specific syncing
- Updated backend logic to handle both repository-level and environment-level secret synchronization
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
frontend/graphql/queries/syncing/github/getEnvironments.gql | New GraphQL query to fetch GitHub environments for a repository |
frontend/graphql/mutations/syncing/github/CreateGhActionsSync.gql | Updated mutation to include optional environmentName parameter |
frontend/components/syncing/ServiceInfo.tsx | Enhanced display to show target environment in sync status |
frontend/components/syncing/GitHub/CreateGhActionsSync.tsx | Added environment selection UI with repository dependency |
frontend/components/syncing/CreateSyncDialog.tsx | Minor styling adjustment for padding |
frontend/apollo/schema.graphql | Updated GraphQL schema with new environment-related fields |
frontend/apollo/graphql.ts | Generated TypeScript types for new GraphQL operations |
frontend/apollo/gql.ts | Updated GraphQL document mappings |
backend/backend/schema.py | Added GitHub environments query resolver |
backend/backend/graphene/queries/syncing.py | Added resolver function for fetching GitHub environments |
backend/backend/graphene/mutations/syncing.py | Updated mutation to handle optional environment parameter |
backend/api/utils/syncing/github/actions.py | Enhanced with environment-specific API calls and secret management |
backend/api/tasks/syncing.py | Updated sync task to pass environment parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
The most common approach would be to keep secrets and configurations in Phase. Secrets and configuration should be thought of in two dimensions - Keys and Environments. An engineer should quickly able to answer - for a given environment x does key y exist? If yes, what's the value? Tracking everything in one place would have some up-front cost but long term benefits. Think of it has getting folks to start using version control early in their career haha |
🔍 Overview
Added support for syncing secrets to GitHub repository environments.
Addresses - #647
Docs - phasehq/docs#189
💡 Proposed Changes
Added the ability to select a GitHub environment for a given repository and sync secrets to it.
🖼️ Screenshots or Demo
Select an destination Environment on GitHub
Sync status now indicates the destination environment on GitHub
Manage sync popover now indicates the destination environment on GitHub
Secrets synced to GitHub Environments
❓ Open Questions
🧪 Testing
🎯 Reviewer Focus
actions.py
💚 Did You...