seachicken / gh-poi

✨ Safely clean up your local branches
https://dev.to/seachicken/safely-clean-up-your-local-branches-9i3
MIT License
674 stars 19 forks source link

Show results `gh poi protect` command #102

Open seachicken opened 1 year ago

seachicken commented 1 year ago

Description Since the result is not displayed even if the gh poi protect <branchname>... command succeeds, the user feels anxiety about whether the command succeeded or not, so the result of success or failure should be displayed.

Additional context

spenserblack commented 1 year ago

Personally, knowing that gh poi protect uses the git config to save protected branches, I would open .git/config to ensure that the branch is protected. So a generic message like "Updated git config" might be good enough.

However, I see you use the setting branch.<branch-name>.gh-poi-protected. If, instead of using an individual setting for each protected branch, you used a list setting, it would be easier for the user to view all protected branches. For example:

$ git config --add gh-poi.protected main
$ git config --add gh-poi.protected dev
$ git config --add gh-poi.protected my-personal-branch
$ git config --get-all gh-poi.protected
main
dev
my-personal-branch