Kind: Class
Source: atloria-monorepo/apps/api/src/docs-pr/git-write/github-write.adapter.ts
Opens (or updates) a docs-fix PR on GitHub via the existing GitHub App installation token. Hand-rolled REST over axios to match the house style (no octokit in the repo).
Strategy: the head branch always carries exactly ONE commit off the base tip, so the PR diff is clean and a follow-up push simply force-updates that single commit — GitHub then updates the same PR (dedupe by head branch). Nothing merges automatically.
Extends: GitWriteAdapter
Methods
| Method | Signature | Returns |
|---|---|---|
openOrUpdatePr | openOrUpdatePr(input: OpenOrUpdatePrInput) | Promise<OpenOrUpdatePrResult> |
Where it refuses work
GitHubWriteAdapterstops the work withErrorwhenbaseRef.status !== 200.GitHubWriteAdapterstops the work withWriteNotPermittedErrorwhen!creds?.password.GitHubWriteAdapterstops the work withWriteNotPermittedErrorwhenres.status === 403.GitHubWriteAdapterstops the work with an early return wheninput.token.
Was this page helpful?