Description
The current gh/pr-merge action has a hardcoded --merge flag. This limits the utility of the action for teams that enforce squash or rebase commit histories. We need to update the script to accept the merge method as a parameter.
Tasks
- Add the following input parameter:
- Implement logic to:
- Input validation to accept
squash and rebase as merge method, for any other input log the input and default to merge
- Map the input to the corresponding GitHub CLI flag.
- Default to
--merge for backward compatibility.
Expected Outcome
Description
The current
gh/pr-mergeaction has a hardcoded--mergeflag. This limits the utility of the action for teams that enforcesquashorrebasecommit histories. We need to update the script to accept the merge method as a parameter.Tasks
squashandrebaseas merge method, for any other input log the input and default to merge--mergefor backward compatibility.Expected Outcome
squashis provided, the command must use the--squashflag.rebaseis provided, the command must use the--rebaseflag.mergeis provided or anything else, the command must use the--mergeflag.--mergeto avoid breaking existing workflows.SQUASHorsquashshould both work).