Hacker News new | ask | show | jobs
by dnsmichi 979 days ago
Thanks for sharing. GitLab team member here.

More GitLab push options are documented in https://docs.gitlab.com/ee/user/project/push_options.html

You can also add a parameter to merge the merge request when the pipeline succeeds. This can be handy for quick fixes that do not require reviews, and avoids unnecessary context switches.

# mwps BRANCHNAME

alias mwps='git push -u origin -o merge_request.create -o merge_request.target=main -o merge_request.merge_when_pipeline_succeeds'

Example from https://gitlab.com/sytses/dotfiles/-/blob/master/git/aliases... and https://about.gitlab.com/blog/2021/10/19/top-10-gitlab-hacks...

If you prefer deeper CLI integration, suggest installing the GitLab CLI: https://docs.gitlab.com/ee/editor_extensions/gitlab_cli/