-
Notifications
You must be signed in to change notification settings - Fork 52
feat: support manual github credential setup #662
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
Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
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
Adds the ability to set up GitHub credentials manually by pasting a token, in addition to the existing OAuth flow. This enables users of GitHub Enterprise Server to configure their credentials for syncing secrets from Phase Cloud.
- Added support for both OAuth and token-based authentication methods for GitHub
- Enhanced credential validation to include URL fields in addition to host/addr fields
- Improved code formatting and string handling in GitHub API interactions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/utils/syncing/general.ts | Updated credential validation to include URL fields |
| frontend/components/syncing/CreateProviderCredentials.tsx | Added tab interface for OAuth vs manual token setup |
| backend/api/utils/syncing/github/actions.py | Enhanced API host normalization and improved code formatting |
| backend/api/services.py | Updated GitHub provider to support both OAuth and token authentication |
Comments suppressed due to low confidence (1)
backend/api/utils/syncing/github/actions.py:280
- Inconsistent string formatting - this multi-line f-string formatting differs from the single-line format used elsewhere in the same function (lines 262, 264, 276). Consider using consistent single-line formatting for similar URL constructions.
delete_url = (
f"{api_host}/repos/{owner}/{repo}/actions/secrets/{secret_name}"
)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@cursor review |
…rCredentials component
…redentials component
…derCredentials component
…_secrets function
…GhActionsSync component
🔍 Overview
Adds the ability to set up GitHub credentials manually by pasting a token, instead of using the OAuth flow. This allows users of GitHub Enterprise Server to set up their credentials to sync secrets from Phase Cloud.
Fixes #659
🖼️ Screenshots or Demo
🎯 Reviewer Focus
Verify that credentials can be set up correctly using:
Verify that syncs work for repos, environments
💚 Did You...
- [ ] Update dependencies and lockfiles (if required)- [ ] Update migrations (if required)- [ ] Regenerate graphql schema and types (if required)Note
Adds manual GitHub token setup alongside OAuth with UI toggle, updates provider schema, and normalizes GitHub API host handling.
Providers.GITHUB.auth_schemeto"oauth,token"inbackend/api/services.py.normalize_api_hostnow defaults empty/missing host tohttps://api.github.comand appends/v3for GHES inbackend/api/utils/syncing/github/actions.py.actions.py.frontend/components/syncing/CreateProviderCredentials.tsxadd OAuth/token tabs (Headless UI) andauthMethodstate; show token fields and Save only for token, andSetupGhAuthonly for OAuth.*urlfields as non-secret viaisCredentialSecretupdate infrontend/utils/syncing/general.ts.Written by Cursor Bugbot for commit 6feadba. This will update automatically on new commits. Configure here.