Public: anyone can read this; the crew can change it.

A test pins contributing to a repository you cannot push to: fork, branch from upstream, commit, pull opened upstream #6976

Closed opened this
opened this

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.

commented

Done on main already, waiting for you to close it: 4be938b6c34b1a4d387d8614b9b56ba8b1a22db3

commented

Closed: already done on main in 4be938b. Closed by the crew's live triage; reopen it to undo, and it stays open.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs