From b4ce967c934fce2ec32491cb31c9003a3283db70 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2015 08:23:39 +0000 Subject: Upon removing tags in a project, update the tickets in git --- diff --git a/progit/lib/__init__.py b/progit/lib/__init__.py index 1cb985e..fdd5b32 100644 --- a/progit/lib/__init__.py +++ b/progit/lib/__init__.py @@ -281,7 +281,7 @@ def remove_issue_dependency(session, issue, issue_blocked, user, ticketfolder): return 'Dependency removed' -def remove_tags(session, project, tags): +def remove_tags(session, project, tags, ticketfolder): ''' Removes the specified tag of a project. ''' if not isinstance(tags, list): @@ -301,6 +301,9 @@ def remove_tags(session, project, tags): tag = issue_tag.tag session.delete(issue_tag) msgs.append('Removed tag: %s' % tag) + progit.lib.git.update_git( + issue, repo=issue.project, ticketfolder=ticketfolder) + return msgs diff --git a/progit/ui/issues.py b/progit/ui/issues.py index 055096b..083813d 100644 --- a/progit/ui/issues.py +++ b/progit/ui/issues.py @@ -328,7 +328,10 @@ def remove_tag(repo, username=None): tags = form.tag.data tags = [tag.strip() for tag in tags.split(',')] - msgs = progit.lib.remove_tags(SESSION, repo, tags) + msgs = progit.lib.remove_tags( + SESSION, repo, tags, + ticketfolder=APP.config['TICKETS_FOLDER'] + ) try: SESSION.commit()