template-oss
                                
                                
                                
                                    template-oss copied to clipboard
                            
                            
                            
                        pull request action should surface appropriate merge strategy
Problem:
We want to allow only squash OR rebase as valid PR merge strategies (ref: #98). Which one is appropriate depends on context, but can't be enforced automatically.
Solution:
workflows/pull-request.yml should leave a bot comment on the PR saying something like This PR should be merged via <MERGE_STRATEGY> based on the following logic:
if (commits.length > 1 && all are conventional && none are fixups)
  rebase
else if (commits.length > 1 && (some are fixups || some are not conventional))
  squash
else
 do nothing
                                    
                                    
                                    
                                
it'd be swell if we could change the state of the button directly.. i wonder if the github api lets us do that
from what i could find, the answer is no. or at least not yet (https://github.community/t/squash-and-merge-as-default-pull-request-merge-option/1031/38)
Just a side comment... should we be using --fixup, --amend, or refactor: for feedback commits? I'm thinking usually an amend/fixup, but a refactor if it is significant.
Fixup only works if you're going to be squashing the PR, unfortunately. Github PR squash-merge doesn't account for them.