aboutsummaryrefslogtreecommitdiffstats
path: root/bug/bug_actions.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/bug_actions.go')
-rw-r--r--bug/bug_actions.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/bug/bug_actions.go b/bug/bug_actions.go
index e6fc12d5..cb0d0f7d 100644
--- a/bug/bug_actions.go
+++ b/bug/bug_actions.go
@@ -65,8 +65,13 @@ func MergeAll(repo repository.ClockedRepo, remote string) <-chan entity.MergeRes
}
for _, remoteRef := range remoteRefs {
- refSplitted := strings.Split(remoteRef, "/")
- id := refSplitted[len(refSplitted)-1]
+ refSplit := strings.Split(remoteRef, "/")
+ id := entity.Id(refSplit[len(refSplit)-1])
+
+ if err := id.Validate(); err != nil {
+ out <- entity.NewMergeInvalidStatus(id, errors.Wrap(err, "invalid ref").Error())
+ continue
+ }
remoteBug, err := readBug(repo, remoteRef)