-
Notifications
You must be signed in to change notification settings - Fork 138
Autosquash #24
base: master
Are you sure you want to change the base?
Autosquash #24
Conversation
@fkorotkov was this closed on purpose? Didn't you mean to merge it instead? |
It didn't work for me actually. You can try to use this branch via |
rebase |
Looks like the issue with this attempt was that it was missing the
I'll work on a PR for this, borrowing from this PR's branch. |
Co-Authored-By: John R Barker <john@johnrbarker.com>
@samholmes thank you for the finding! I've rebased the branch. PTAL. |
@fkorotkov Why not review my PRs changes? I'd appreciate the contributor recognition 😉 Looking at this PR some of my grips are with the fixup commits. There's no need to make a mistake, then fix the mistake in a separate commit unless the commit has already been merged to the base branch. The commits to this PR could use some rebasing to make a clean commit history. Secondly, if you look closely at how I've implemented the feature, I intentionally chose to use action inputs to enable or disable autosquash; this allows for the user of this action to decide on what event will trigger the action with the autosquash input (paramater). For example, one could choose to trigger this action on the |
|
||
# Do an exact check instead of `rebase *` so it's not possible to inject malicious commands | ||
if [[ $(jq -r ".comment.body" "$GITHUB_EVENT_PATH" | grep -Fq "/rebase --autosquash") -eq 0 ]]; then | ||
git rebase --interactive --autosquash origin/$BASE_BRANCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to use the interactive flag here, that will pop open an editor and expect "user input"
Edit: nevermind re-read
Fixes #20