##// END OF EJS Templates
feat(delete-branch-after-merge-git): added ability to delete a branch automatically after merging PR (if it was configured). Fixes: RCCE-76
ilin.s -
r5449:df00ef8a default
parent child Browse files
Show More
@@ -1040,6 +1040,8 b' class GitRepository(BaseRepository):'
1040 1040 pr_branch, self.path, target_ref.name, enable_hooks=True,
1041 1041 rc_scm_data=self.config.get('rhodecode', 'RC_SCM_DATA'))
1042 1042 merge_succeeded = True
1043 if close_branch and source_ref.name != target_ref.name and not dry_run and source_ref.type == 'branch':
1044 self.delete_branch(source_ref.name)
1043 1045 except RepositoryError:
1044 1046 log.exception(
1045 1047 'Failure when doing local push from the shadow '
@@ -300,31 +300,30 b''
300 300 </div>
301 301 % endif
302 302
303 ## DISABLED FOR GIT FOR NOW as the rebase/close is not supported yet
304 ## % if display_globals or repo_type in ['git']:
305 ## <div class="panel panel-default">
306 ## <div class="panel-heading" id="vcs-pull-requests-options">
307 ## <h3 class="panel-title">${_('Git Pull Request Settings')}<a class="permalink" href="#vcs-git-pull-requests-options"> ¶</a></h3>
308 ## </div>
309 ## <div class="panel-body">
310 ## <div class="checkbox">
311 ## ${h.checkbox('rhodecode_git_use_rebase_for_merging' + suffix, 'True', **kwargs)}
312 ## <label for="rhodecode_git_use_rebase_for_merging${suffix}">${_('Use rebase as merge strategy')}</label>
313 ## </div>
314 ## <div class="label">
315 ## <span class="help-block">${_('Use rebase instead of creating a merge commit when merging via web interface.')}</span>
316 ## </div>
317 ##
318 ## <div class="checkbox">
319 ## ${h.checkbox('rhodecode_git_close_branch_before_merging' + suffix, 'True', **kwargs)}
320 ## <label for="rhodecode_git_close_branch_before_merging{suffix}">${_('Delete branch after merging it')}</label>
321 ## </div>
322 ## <div class="label">
323 ## <span class="help-block">${_('Delete branch after merging it into destination branch. No effect when rebase strategy is use.')}</span>
324 ## </div>
325 ## </div>
326 ## </div>
327 ## % endif
303 % if display_globals or repo_type in ['git']:
304 <div class="panel panel-default">
305 <div class="panel-heading" id="vcs-pull-requests-options">
306 <h3 class="panel-title">${_('Git Pull Request Settings')}<a class="permalink" href="#vcs-git-pull-requests-options"></a></h3>
307 </div>
308 <div class="panel-body">
309 ## <div class="checkbox">
310 ## ${h.checkbox('rhodecode_git_use_rebase_for_merging' + suffix, 'True', **kwargs)}
311 ## <label for="rhodecode_git_use_rebase_for_merging${suffix}">${_('Use rebase as merge strategy')}</label>
312 ## </div>
313 ## <div class="label">
314 ## <span class="help-block">${_('Use rebase instead of creating a merge commit when merging via web interface.')}</span>
315 ## </div>
316
317 <div class="checkbox">
318 ${h.checkbox('rhodecode_git_close_branch_before_merging' + suffix, 'True', **kwargs)}
319 <label for="rhodecode_git_close_branch_before_merging{suffix}">${_('Delete branch after merging it')}</label>
320 </div>
321 <div class="label">
322 <span class="help-block">${_('Delete branch after merging it into destination branch.')}</span>
323 </div>
324 </div>
325 </div>
326 % endif
328 327
329 328 <script type="text/javascript">
330 329
General Comments 0
You need to be logged in to leave comments. Login now