From f3304bdc1c215e733b9a2ee6a228e64f663c2b09 Mon Sep 17 00:00:00 2001 From: Vincent Tiu <46623413+Invincibot@users.noreply.github.com> Date: Thu, 9 Jul 2020 20:40:44 +0800 Subject: Add functionality to remove bugs from a local repository. (#423) Add functionality to remove bugs from a local repository. This adds a function to remove git references in the repo and another one to remove bugs. --- bug/bug.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bug/bug.go') diff --git a/bug/bug.go b/bug/bug.go index 24f0dcd5..04bd5996 100644 --- a/bug/bug.go +++ b/bug/bug.go @@ -242,6 +242,11 @@ func readBug(repo repository.ClockedRepo, ref string) (*Bug, error) { return &bug, nil } +func RemoveLocalBug(repo repository.ClockedRepo, id entity.Id) error { + ref := bugsRefPattern + id.String() + return repo.RemoveRef(ref) +} + type StreamedBug struct { Bug *Bug Err error -- cgit