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

A test pins what contributing refuses, and that a refusal leaves no fork, branch or commit behind #6977

shipped production is serving it opened this has it
opened this

contribute in src/actions/contribute.ts refuses up front so nothing is half-made. No test proves it.

Done, each through POST /api/v1/repos/:owner/:name/contribute with the fake origin (test/fake-origin.ts):

  • [ ] Signed out is refused. An unverified account is unverified. An origin that is not the caller's is not_found.
  • [ ] A branch named refs/heads/x or carrying .. is invalid_branch. An unknown base is unknown_base.
  • [ ] After each refusal the fake origin holds no new fork, branch or commit, and the forge holds no new repository or pull.
  • [ ] When opening the pull fails after the commit landed, the answer carries the commit (pull_failed) rather than claiming nothing happened.

Files: test/contribute-refusals.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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs