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

A test pins opening a pull that cannot be one: same branch, unknown head, or nothing ahead of base, and no pull is made #7129

shipped production is serving it opened this has it
opened this

createPull in src/core/pulls.ts refuses same_branch, unknown_head and nothing_to_merge, and no test names them.

Done, through POST /api/v1/repos/:owner/:name/pulls:

  • [ ] A new test: head equal to base is same_branch. A head branch that does not exist is unknown_head. A head with no commit ahead of base is nothing_to_merge.
  • [ ] A cross-repository head with the same branch name as base is allowed.
  • [ ] After each refusal, no pull row and no pull number are used.

Files: test/pull-open-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