From d44af2e1cdea29381fe557ac7733fc5f93dd738f Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Thu, 8 Nov 2018 21:53:17 -0800 Subject: [PATCH] gitlab: search for the label name that issues have (#57) * gitlab: search for the label name that issues have comply creates tags with "comply-" prefix, so search for that * fix issue counters by using correct label name --- internal/gitlab/gitlab.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/gitlab/gitlab.go b/internal/gitlab/gitlab.go index f7dbbc6..049cc46 100644 --- a/internal/gitlab/gitlab.go +++ b/internal/gitlab/gitlab.go @@ -63,10 +63,10 @@ func (g *gitlabPlugin) Configured() bool { func (g *gitlabPlugin) Links() model.TicketLinks { links := model.TicketLinks{} - links.AuditAll = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=all&label_name[]=audit", g.domain, g.reponame) - links.AuditOpen = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=opened&label_name[]=audit", g.domain, g.reponame) - links.ProcedureAll = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=all&label_name[]=procedure", g.domain, g.reponame) - links.ProcedureOpen = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=opened&label_name[]=procedure", g.domain, g.reponame) + links.AuditAll = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=all&label_name[]=comply-audit", g.domain, g.reponame) + links.AuditOpen = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=opened&label_name[]=comply-audit", g.domain, g.reponame) + links.ProcedureAll = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=all&label_name[]=comply-procedure", g.domain, g.reponame) + links.ProcedureOpen = fmt.Sprintf("%s/%s/issues?scope=all&utf8=✓&state=opened&label_name[]=comply-procedure", g.domain, g.reponame) return links } @@ -164,10 +164,10 @@ func toTicket(i *gitlab.Issue) *model.Ticket { for _, l := range i.Labels { if l == "audit" { - t.SetBool("audit") + t.SetBool("comply-audit") } if l == "procedure" { - t.SetBool("procedure") + t.SetBool("comply-procedure") } } return t