-
Notifications
You must be signed in to change notification settings - Fork 71
feat: github app can be created on organization and can be made public #677
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
base: main
Are you sure you want to change the base?
Conversation
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 creating GitHub Apps on organizations (instead of just personal accounts) and makes them public if desired. Users are now presented with a setup form to configure these options before being redirected to GitHub's app creation flow.
- Introduces a new setup page (
GithubAppSetup) where users can choose between personal/organization accounts and set app visibility - Updates backend API to accept
is_publicandorganizationquery parameters and construct the appropriate GitHub URL - Refactors configuration to use a base URL instead of a hardcoded install URL
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| guard/lib/guard/instance_config/github_app.ex | Adds is_public parameter to manifest generation |
| guard/lib/guard/instance_config/api.ex | Extracts query parameters and dynamically constructs GitHub URL based on organization |
| guard/config/prod.exs | Changes config from full install URL to base URL |
| front/test/support/stubs/feature.ex | Adds rbac__groups feature stub for tests |
| front/assets/js/git_integration/pages/index.ts | Exports new GithubAppSetup component |
| front/assets/js/git_integration/pages/github_app_setup.tsx | New setup page with form for configuring GitHub App creation |
| front/assets/js/git_integration/components/integration_starter.tsx | Changes from form submission to navigation link |
| front/assets/js/git_integration/app.tsx | Adds route for GitHub App setup page |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (accountType === "organization" && organizationName.trim()) { | ||
| urlWithToken.searchParams.append(`organization`, organizationName.trim()); | ||
| } |
Copilot
AI
Oct 27, 2025
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.
The organization name is only whitespace-trimmed before being sent to the backend. Consider validating the organization name format (e.g., GitHub organization names can only contain alphanumeric characters and hyphens) to prevent potential issues with invalid characters being passed through.
| window.location.href = urlWithToken.toString(); | ||
| }; | ||
|
|
||
| export const IntegrationStarter = (_props: IntegrationStarterProps) => { |
Copilot
AI
Oct 27, 2025
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.
The connectButtonUrl prop is no longer used but remains in the interface. Consider removing it from IntegrationStarterProps since the component now navigates to a hardcoded route instead of using the provided URL.
Co-authored-by: Copilot <[email protected]>
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
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| required | ||
| /> | ||
| <p className="f6 gray mt2 mb0"> | ||
| The exact name of your GitHub organization |
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.
Please extend this line with info that you need to be an admin on this organization.
📝 Description
Connect button for github app instead of going straight to github with our github app manifest will prompt for a few possible modifications of manifest. This enables users using CE/EE installations to easily create github app on their organization instead of (previously hardcoded) personal account. Also allows making the github app public.
✅ Checklist