fix: remove inert project-level GitHub identity override endpoints/UI (keep DB store) - #936
Closed
sabbour wants to merge 2 commits into
Closed
fix: remove inert project-level GitHub identity override endpoints/UI (keep DB store)#936sabbour wants to merge 2 commits into
sabbour wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7762866f-fa88-4087-b5df-17f482d36ec0
…endpoints/UI
Design decision: GitHub App installation tokens have no Copilot entitlements, so
automation runs (scheduled/webhook) still need a human user's Copilot-entitled
token. The project_github_identity_overrides table, ProjectGitHubIdentityOverrideRecord
entity, and ProjectGitHubIdentityOverrideStore are kept intact for a future
repurposing as a 'workflow Copilot owner' store, instead of being deleted.
Still removed: the inert ProjectGitHubIdentityService, the GET/PUT
/api/projects/{id}/github-identity endpoints and their DI/mapping, and the dead
frontend getProjectGitHubIdentity/setProjectGitHubIdentityOverride API calls and
types. GitHubSignIn's switch-account UI is unchanged and already used the
per-user default identity API unconditionally.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7762866f-fa88-4087-b5df-17f482d36ec0
sabbour
marked this pull request as draft
August 27, 2026 18:19
Owner
Author
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.
Summary
PR 2 from Link's investigation of PR #934: removes the now-inert project-level GitHub identity
override endpoints, service, and frontend calls left behind after #934 removed the runtime
override behavior from
CallerTokenScopeProvider/ProjectAuthorization.Scope update (2026-08-25): a design decision is in progress to repurpose the
project_github_identity_overridestable as a "workflow Copilot owner" store — GitHub Appinstallation tokens have no Copilot entitlements, so automation runs (scheduled/webhook) still
need a human user's Copilot-entitled token for inference. Per that decision, this PR no longer
deletes the DB table, the
ProjectGitHubIdentityOverrideRecordentity, theProjectGitHubIdentityOverrideStore, or its DI registration — those are kept intact for futurereuse. Only the inert HTTP endpoints/service and the dead frontend API calls/types are removed.
Backend
Auth/ProjectGitHubIdentityService.csandEndpoints/ProjectGitHubIdentityEndpoints.cs.ProjectGitHubIdentityServiceDI registration and theMapProjectGitHubIdentityEndpoints()call fromProgram.cs.ProjectGitHubIdentityOverrideStore's DI registration is kept.overrideStore.RemoveOverridesForLinkedLoginAsync(...)call and DI injection fromLinkedGitHubAccountService.cs(that cleanup was tied to the removed per-request override path).UpdateProjectGitHubIdentityRequest/ProjectGitHubIdentityResponseDTOs(they only existed to serve the deleted endpoints).
docs/reference/api.mdto drop the removed endpoint rows.Auth/ProjectGitHubIdentityOverrideStore.cs,apps/Agentweaver.Api.Data/Memory/ProjectGitHubIdentityOverrideRecord.cs, theDbSet/modelconfig in
MemoryDbContext.cs, and theproject_github_identity_overridestable (no migrationto drop it in this PR).
Frontend
GitHubSignIn.tsx: the "switch account" UI is unchanged.handleSwitchnow unconditionallycalls
setDefaultLinkedGitHubAccount(login)instead of branching on a project-level override;removed
projectIdentitystate and thegetProjectGitHubIdentityfetch;currentAccountnowderives only from
linkedAccounts.find(a => a.is_default).ProjectSettingsPage.tsx: removed the "GitHub identity for this project" section,handleSaveGitHubIdentityOverride, and related state/effects. General access/role UI isunchanged.
api/client.ts/api/types.ts: removedgetProjectGitHubIdentity,setProjectGitHubIdentityOverride, and theProjectGitHubIdentitytype (unused after the above).Tests
LinkedGitHubAccountsApiTests.cs: removed tests exercising the deleted/api/projects/{id}/github-identityendpoints (5 tests). Endpoint-independent tests(
LinkCallback_...,AccessibleRepos_...,UnlinkDefaultAccount_...) are untouched.client.test.ts,GitHubSignIn.test.tsx,ProjectSettingsPage.test.tsx: updated to match thefrontend changes above;
GitHubSignIn.test.tsxnow assertssetDefaultLinkedGitHubAccountiscalled when switching accounts.
Verification
dotnet buildonAgentweaver.Api,Agentweaver.Tests,Agentweaver.Api.Migrations.Postgres— 0 errors.dotnet test --filter "FullyQualifiedName~LinkedGitHubAccountsApiTests|FullyQualifiedName~CallerTokenScopeProviderTests"— 6/6 passed.npm --prefix apps/web run lint— clean.npx vitest runon the 3 affected frontend test files — 27/27 passed.Changeset
.changeset/remove-project-github-identity-override.md(patch), updated to reflect the reduced scope.Not merged — awaiting review, per instructions.