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

Could most of the commands have a `--dry-run` option? #111

Open joneshf opened 1 year ago

joneshf commented 1 year ago

I think it would be pretty useful to have a --dry-run option for most of the commands. I dunno that init or list need one, since they don't affect GitHub. There's two reasons why I think this option would be useful:

  1. As a person using spr, it's not always clear what it's going to do before it does it. It'd be nice to know what the game plan is before it executes it.
  2. As a person developing spr, it's not easy to test the behavior of commands. Most everything sends off actual requests to GitHub or updates the local repo, so writing a test for some changes is next to impossible. If each command wasn't always going to affect the real world, it would be easier to get some amount of confidence (not complete confidence) that the behavior of a command is what is expected.

The first reason is probably more easily understandable than the second. But, I think being able to have a suite of tests that validate a game plan could be really beneficial. Any thoughts on the idea?