request to squash commits if the PR has multiple
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
89566a883d
commit
d905aa7fa4
|
@ -104,6 +104,13 @@ check_is_pr_single_commit() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
request_to_squash() {
|
||||||
|
if [[ $(git rev-list $BRANCH..$PR_LOCAL_BRANCH | wc -l) -gt 1 ]] ;then
|
||||||
|
confirm "PR has multiple commits, do interactive rebase?"
|
||||||
|
git rebase -i $BRANCH
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
confirm_pr() {
|
confirm_pr() {
|
||||||
git log -p $BRANCH..$PR_LOCAL_BRANCH
|
git log -p $BRANCH..$PR_LOCAL_BRANCH
|
||||||
confirm "Do you like this PR?"
|
confirm "Do you like this PR?"
|
||||||
|
@ -156,6 +163,7 @@ EOF
|
||||||
fetch_pr
|
fetch_pr
|
||||||
refresh_base_branch
|
refresh_base_branch
|
||||||
rebase_pr
|
rebase_pr
|
||||||
|
request_to_squash
|
||||||
check_is_pr_single_commit
|
check_is_pr_single_commit
|
||||||
confirm_pr
|
confirm_pr
|
||||||
sign_pr
|
sign_pr
|
||||||
|
|
Loading…
Reference in New Issue