aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/export.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-15 03:06:10 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-15 03:07:45 +0100
commit432a816dde18a12c1479ed8151a11c29929476e0 (patch)
tree89c965c63f07c1091ff34ec3d163171a73eba29f /bridge/github/export.go
parente9aff2a2a103b43852ecf7b57ae9ab297890eeed (diff)
parent362c0c7e2e1ce9a8e2918376a340c76f46569d64 (diff)
downloadgit-bug-432a816dde18a12c1479ed8151a11c29929476e0.tar.gz
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
Diffstat (limited to 'bridge/github/export.go')
-rw-r--r--bridge/github/export.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go
index c363e188..6cee4188 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -139,8 +139,8 @@ func (ge *githubExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
ge.repositoryID, err = getRepositoryNodeID(
ctx,
ge.defaultToken,
- ge.conf[keyOwner],
- ge.conf[keyProject],
+ ge.conf[confKeyOwner],
+ ge.conf[confKeyProject],
)
if err != nil {
return nil, err
@@ -187,7 +187,7 @@ func (ge *githubExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
if snapshot.HasAnyActor(allIdentitiesIds...) {
// try to export the bug and it associated events
- ge.exportBug(ctx, b, since, out)
+ ge.exportBug(ctx, b, out)
}
}
}
@@ -197,7 +197,7 @@ func (ge *githubExporter) ExportAll(ctx context.Context, repo *cache.RepoCache,
}
// exportBug publish bugs and related events
-func (ge *githubExporter) exportBug(ctx context.Context, b *cache.BugCache, since time.Time, out chan<- core.ExportResult) {
+func (ge *githubExporter) exportBug(ctx context.Context, b *cache.BugCache, out chan<- core.ExportResult) {
snapshot := b.Snapshot()
var bugUpdated bool
@@ -238,7 +238,7 @@ func (ge *githubExporter) exportBug(ctx context.Context, b *cache.BugCache, sinc
}
// ignore issue coming from other repositories
- if owner != ge.conf[keyOwner] && project != ge.conf[keyProject] {
+ if owner != ge.conf[confKeyOwner] && project != ge.conf[confKeyProject] {
out <- core.NewExportNothing(b.Id(), fmt.Sprintf("skipping issue from url:%s", githubURL))
return
}
@@ -481,8 +481,8 @@ func markOperationAsExported(b *cache.BugCache, target entity.Id, githubID, gith
func (ge *githubExporter) cacheGithubLabels(ctx context.Context, gc *githubv4.Client) error {
variables := map[string]interface{}{
- "owner": githubv4.String(ge.conf[keyOwner]),
- "name": githubv4.String(ge.conf[keyProject]),
+ "owner": githubv4.String(ge.conf[confKeyOwner]),
+ "name": githubv4.String(ge.conf[confKeyProject]),
"first": githubv4.Int(10),
"after": (*githubv4.String)(nil),
}
@@ -526,7 +526,7 @@ func (ge *githubExporter) getLabelID(gc *githubv4.Client, label string) (string,
// NOTE: since createLabel mutation is still in preview mode we use github api v3 to create labels
// see https://developer.github.com/v4/mutation/createlabel/ and https://developer.github.com/v4/previews/#labels-preview
func (ge *githubExporter) createGithubLabel(ctx context.Context, label, color string) (string, error) {
- url := fmt.Sprintf("%s/repos/%s/%s/labels", githubV3Url, ge.conf[keyOwner], ge.conf[keyProject])
+ url := fmt.Sprintf("%s/repos/%s/%s/labels", githubV3Url, ge.conf[confKeyOwner], ge.conf[confKeyProject])
client := &http.Client{}
params := struct {