diff options
author | vince <vincetiu8@gmail.com> | 2020-07-20 09:55:14 +0800 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-07-28 14:30:05 +0200 |
commit | 4e4ca106aea25da74f1df49d33f4eaa272a6e8f0 (patch) | |
tree | a019a325fbafe1fe4ae5a834302eb6cd2e8a3f62 /bug/bug.go | |
parent | 36f300cb35b203310e923cf956310c7f20ed7406 (diff) | |
download | git-bug-4e4ca106aea25da74f1df49d33f4eaa272a6e8f0.tar.gz |
Allow user to delete remote bugs
Diffstat (limited to 'bug/bug.go')
-rw-r--r-- | bug/bug.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -242,11 +242,18 @@ func readBug(repo repository.ClockedRepo, ref string) (*Bug, error) { return &bug, nil } +// RemoveLocalBug will remove a local bug from its hash func RemoveLocalBug(repo repository.ClockedRepo, id entity.Id) error { ref := bugsRefPattern + id.String() return repo.RemoveRef(ref) } +// RemoveRemoteBug will remove a remote bug locally from its hash +func RemoveRemoteBug(repo repository.ClockedRepo, remote string, id entity.Id) error { + ref := fmt.Sprintf(bugsRemoteRefPattern, remote) + id.String() + return repo.RemoveRef(ref) +} + type StreamedBug struct { Bug *Bug Err error |