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

Allow `spr format` to be used without GitHub credentials #113

Closed sven-of-cord closed 1 year ago

sven-of-cord commented 1 year ago

The format command does not use the GitHub API, it only reformats the local commit message. This commit makes it so that spr format can be called without a GitHub PAT in the config. This is particularly useful to have a slightly more meaningful automated test of the spr build. For example homebrew allows to define tests of the binary as part of the packaging recipe. With this change, we can test using spr format, which at least tests that a Git repository is opened correctly.

Test Plan: use spr format and see that it correctly reformats a messy commit message

sven-of-cord commented 1 year ago

lgtm

Since spr format does not use the token spr format --github-auth-token none also worked as a workound

Oh wow, yes, true. Hadn't thought of that. Ah well, might as well land this now.