aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/export.go
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-07-10 00:41:43 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-07-23 17:18:04 +0200
commit35a033c0f1f17fadc4525927aace4f4043038c7e (patch)
tree2a14f056747d133896fd1b0589df146bafdb93f4 /bridge/gitlab/export.go
parenta1a1d4868b7a32e90343b3c3b085fb523b20b8e2 (diff)
downloadgit-bug-35a033c0f1f17fadc4525927aace4f4043038c7e.tar.gz
bridge/gitlab: bridge project validation
bridge/gitlab: token generation
Diffstat (limited to 'bridge/gitlab/export.go')
-rw-r--r--bridge/gitlab/export.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go
index 6f234940..4e3b6040 100644
--- a/bridge/gitlab/export.go
+++ b/bridge/gitlab/export.go
@@ -403,10 +403,21 @@ func markOperationAsExported(b *cache.BugCache, target git.Hash, gitlabID, gitla
// get label from gitlab
func (ge *gitlabExporter) getGitlabLabelID(gc *gitlab.Client, label string) (string, error) {
+
return "", nil
}
func (ge *gitlabExporter) createGitlabLabel(label, color string) (string, error) {
+ client := buildClient(ge.conf[keyToken])
+ _, _, err := client.Labels.CreateLabel(ge.repositoryID, &gitlab.CreateLabelOptions{
+ Name: &label,
+ Color: &color,
+ })
+
+ if err != nil {
+ return "", err
+ }
+
return "", nil
}