spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
377 stars 33 forks source link

spr diff vs spr diff --draft #148

Closed Coobaha closed 1 year ago

Coobaha commented 1 year ago

Hi, I've noticed one edge case (or at least behavior that I think should be different):

  1. spr diff
  2. convert PR to draft from GitHub UI
  3. git amend
  4. spr diff

In this case, I've got a new PR created. Should the already existing draft PR be re-used?

Coobaha commented 1 year ago

Not sure if my repro here is correct. Doing these steps works fine for me. Something else probably resulted in a new PR, closing for now.

Coobaha commented 1 year ago

Ok found the way where flow fails. if PR was manually converted to Draft from UI, next call to spr diff will create a duplicate

sven-of-cord commented 1 year ago

That still shouldn't happen though. The sole criterion whether spr creates a new PR or updates an existing one, is whether the commit message has a Pull Request: section in it with a link to the PR (within the given GitHub repository).

Coobaha commented 1 year ago

I think you are correct, @sven-of-cord. I think it was due to me doing a silly amends that had no link to existing PR.