POST /api/v1/repos/:owner/:name/contribute (contribute in src/actions/contribute.ts) is the fork flow in one call, and no test calls it.
Done:
[ ] A new test uses the fake origin (test/fake-origin.ts). A verified user without push rights contributes one file edit to an upstream: a fork is made at the origin, and the branch starts from the upstream's base commit, not the fork's stale tip. The commit lands on the fork, and the pull opens on the upstream with the owner:branch head.
[ ] With push rights, no fork is made and the branch is made on the repository itself.
[ ] The API's answer names the pull and the commit.
Files: test/contribute-flow.test.ts
If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing: bun x tsc --noEmit and the new test.
POST /api/v1/repos/:owner/:name/contribute(contributeinsrc/actions/contribute.ts) is the fork flow in one call, and no test calls it.Done:
test/fake-origin.ts). A verified user without push rights contributes one file edit to an upstream: a fork is made at the origin, and the branch starts from the upstream's base commit, not the fork's stale tip. The commit lands on the fork, and the pull opens on the upstream with theowner:branchhead.Files: test/contribute-flow.test.ts
If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing:
bun x tsc --noEmitand the new test.