Add git merge merge request on sucess alias

Works for gitlab.com, will merge a MR when the pipeline has finished
running sucessfully.
This commit is contained in:
Marty Oehme 2020-02-02 16:13:51 +01:00
parent 752f170caf
commit 87308cbce9
3 changed files with 77 additions and 1 deletions

View File

@ -8,4 +8,4 @@
required = true
[alias]
ignore = "!gitignore -f"
ign = "ignore"
pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html#merge-when-pipeline-succeeds-alias

74
git/.config/git/ignore Normal file
View File

@ -0,0 +1,74 @@
# Created by https://www.gitignore.io/api/vim,linux,zsh
# Edit at https://www.gitignore.io/?templates=vim,linux,zsh
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# Coc configuration directory
.vim
### Zsh ###
# Zsh compiled script + zrecompile backup
*.zwc
*.zwc.old
# Zsh completion-optimization dumpfile
*zcompdump*
# Zsh zcalc history
.zcalc_history
# A popular plugin manager's files
._zplugin
.zplugin_lstupd
# zdharma/zshelldoc tool's files
zsdoc/data
# robbyrussell/oh-my-zsh/plugins/per-directory-history plugin's files
# (when set-up to store the history in the local directory)
.directory_history
# MichaelAquilina/zsh-autoswitch-virtualenv plugin's files
# (for Zsh plugins using Python)
.venv
# Zunit tests' output
/tests/_output/*
!/tests/_output/.gitkeep
# End of https://www.gitignore.io/api/vim,linux,zsh

View File

@ -61,9 +61,11 @@ if exist git; then
alias gf='git fetch'
alias gl='git pull'
alias gpn='git push --dry-run'
alias gp='git push'
alias gpf!='git push --force'
alias gpm='git pushmerge'
alias grv='git remote -v'