This is a tiny fix. If a commit message contains a Pull Request field, but it's empty or otherwise unparseable, then it's interpreted as if it wasn't present. This diff makes it so, that we remove that field if and when we write the commit message back.
Test Plan:
edit a commit message to have an empty (but present) Pull Request field, then run spr format and see it was removed. Also try with content in the Pull Request field that doesn't reference a Pull Request in a valid way.
This is a tiny fix. If a commit message contains a Pull Request field, but it's empty or otherwise unparseable, then it's interpreted as if it wasn't present. This diff makes it so, that we remove that field if and when we write the commit message back.
Test Plan: edit a commit message to have an empty (but present) Pull Request field, then run
spr format
and see it was removed. Also try with content in the Pull Request field that doesn't reference a Pull Request in a valid way.