ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
717 stars 65 forks source link

`.spr.yml` canonicalized after running `spr` #336

Closed ggoretkin-bdai closed 11 months ago

ggoretkin-bdai commented 1 year ago

I did not notice this in a previous release, but in v0.13.0, when I run git spr update, the .spr.yml file gets modified. Some fields get re-ordered and removed.

Before:

githubRepoOwner: fooorg
githubRepoName: foorepo
githubHost: github.com
requireChecks: true
requireApproval: true
mergeMethod: squash
mergeQueue: false
forceFetchTags: false
stargazer: true
prTemplatePath: pull_request_template.md
prTemplateInsertStart: "## TEMPLATE_ANCHOR_1"
prTemplateInsertEnd: "## TEMPLATE_ANCHOR_2"

After:

githubRepoOwner: fooorg
githubRepoName: foorepo
githubHost: github.com
requireChecks: true
requireApproval: true
mergeMethod: squash
mergeQueue: false
prTemplatePath: pull_request_template.md
prTemplateInsertStart: '## TEMPLATE_ANCHOR_1'
prTemplateInsertEnd: '## TEMPLATE_ANCHOR_2'
forceFetchTags: false

Could this be documented? And is there a preferred way to ensure that users do not get interrupted with https://github.com/ejoffe/spr/blob/202945cb55f119a81e9b73bcb1ce04fda6b90b2b/github/githubclient/star.go#L32 ? (Thank you so much for making this tool. You certainly have my star!)

ejoffe commented 11 months ago

fixed in v0.14.1 - config files no longer get overwritten. you shouldn't get the message after you star, there might be a separate bug there if you keep getting the message