CopilotKit / CopilotKit/outpost
Extract shared buildAppOctokit() helper (dedupe 3 copies of App-auth Octokit construction)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 3
- Avg merge
- 7d 16h
- Merged PRs (30d)
- 15
Description
Follow-up from PR #113 review (nit #2).
The App-authenticated Octokit construction now exists in three places:
packages/outpost/shared/src/platforms/github.ts(GitHubAdapter.getOctokit, added in #113)packages/outpost/shared/src/integrations/github-client.tsapps/github-app/src/lib/github-client.ts
All three do essentially:
new Octokit({ authStrategy: createAppAuth, auth: { appId, privateKey, installationId } })
Proposed
Extract a shared buildAppOctokit(creds) helper (e.g. in packages/outpost/shared) and have all three call sites use it. Normalize the installationId type while doing so — it's number in the platform adapter vs string in the other two builders (nit #3; createAppAuth tolerates both, but a single helper should pick one).
Not urgent
Each copy uses a slightly different minimal Octokit interface, so this is a cleanup/DRY task, not a bug. Defer-friendly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the three construction sites in packages/outpost/shared/src/platforms/github.ts, packages/outpost/shared/src/integrations/github-client.ts, and apps/github-app/src/lib/github-client.ts, then inspect how shared code is organized. Done means the three sites use one shared buildAppOctokit helper and the installationId type is consistent across them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100