@@ -131,7 +131,7 @@ def remove_branch(self, branch, *, new_current_branch='master'):
131
131
def checkout_branch (self , branch , start_point = '' ):
132
132
self .git ('checkout' , '-B' , branch , start_point , '--' )
133
133
134
- def push (self , branch , * , source_repo_url = None , force = False ):
134
+ def push (self , branch , * , source_repo_url = None , force = False , skip_ci = False ):
135
135
self .git ('checkout' , branch , '--' )
136
136
137
137
self .git ('diff-index' , '--quiet' , 'HEAD' ) # check it is not dirty
@@ -146,7 +146,8 @@ def push(self, branch, *, source_repo_url=None, force=False):
146
146
else :
147
147
source = 'origin'
148
148
force_flag = '--force' if force else ''
149
- self .git ('push' , force_flag , source , '%s:%s' % (branch , branch ))
149
+ skip_flag = ['-o' , 'ci.skip' ] if skip_ci else []
150
+ self .git ('push' , force_flag , * skip_flag , source , '%s:%s' % (branch , branch ))
150
151
151
152
def get_commit_hash (self , rev = 'HEAD' ):
152
153
"""Return commit hash for `rev` (default "HEAD")."""
0 commit comments