refactor(shell): refactor ggpushmr git alias

ggpushmr has now been renamed to ggpushpr. The only place it is called a "Merge
Request" is in Gitlab. All the community has now decided to go with Github's
"Pull Request".

This also makes the branch param optional. If you don't pass a branch name it
will make the pull request against the repositories default branch.
This commit is contained in:
Ade Attwood 2021-07-10 21:12:13 +01:00
parent 208b1e542d
commit e5655ed216

View file

@ -13,11 +13,10 @@ function gi() {
curl -sL https://www.gitignore.io/api/$@;
}
function ggpushmr() {
function ggpushpr() {
if [[ -z "$1" ]]; then
echo "Error: Target branch to create your merge request against is missing"
exit 1
ggpush -o merge_request.merge_when_pipeline_succeeds -o merge_request.create -o merge_request.remove_source_branch
else
ggpush -o merge_request.merge_when_pipeline_succeeds -o merge_request.create -o merge_request.remove_source_branch -o merge_request.target="$1"
fi
ggpush -o merge_request.create -o merge_request.target="$1" -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch
}