Skip to content

Better support of GitHub Enterprise installations - #468

Open
mpolakov wants to merge 3 commits into
github-copilot-resources:mainfrom
mpolakov:fix/enterprise
Open

mpolakov wants to merge 3 commits into
github-copilot-resources:mainfrom
mpolakov:fix/enterprise

Conversation

@mpolakov

Copy link
Copy Markdown

This pull request introduces several improvements and fixes to better support GitHub Enterprise installations, enhance configuration flexibility, and increase test coverage for edge cases. The changes ensure the application can correctly handle both organization and enterprise scopes, especially in environments where both configuration values might be present. Additionally, the handling of GitHub App installations is made more robust, and related tests are expanded.

Enterprise and Organization Scope Handling:

  • Updated logic in server/sync-entry.ts to prioritize the enterprise identifier (NUXT_PUBLIC_GITHUB_ENT) when the scope is set to 'enterprise', even if an organization variable is also set, and improved error messages for missing required variables.
  • Improved resolveDisplayName in shared/utils/resolveDisplayName.ts to derive the effective scope and display name based on the actual configuration, preventing mismatches between displayed scope and identifiers.
  • Added and updated tests in tests/sync-entry.spec.ts to cover cases where both org and enterprise variables are set, and to ensure proper error handling when required variables are missing. [1] [2]
  • Added a test in tests/MainComponent.displayName.spec.ts to verify display name logic when both scope and identifiers are set.

GitHub App Installation Handling:

  • Modified server/modules/github-app-auth.ts to support installations with enterprise accounts that use slug instead of login, and to ignore installations lacking a valid identifier. [1] [2] [3] [4]
  • Updated related logic in server/utils/sync-auth.ts to safely handle installations without a login field.
  • Added and improved tests in tests/github-app-auth.spec.ts and tests/sync-auth.spec.ts to cover installations with only a slug and to ensure installations without an account login are ignored. [1] [2]

Configuration and Environment Variables:

  • Enhanced docker-compose.yml to provide more flexible and consistent environment variable defaults for organization/enterprise scope, GitHub App credentials, and billing variables. [1] [2]

Dependency Management:

  • Removed the unnecessary brace-expansion override from package.json.

@mpolakov mpolakov changed the title Fix/enterprise Better support of GitHub Enterprise installations Sep 22, 2026
@nuggie

nuggie commented Oct 1, 2026

Copy link
Copy Markdown

see also #469

This branch has not been deployed

No deployments
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.

2 participants