Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package: github.com/tonglil/labeler
import:
- package: github.com/golang/glog
- package: github.com/google/go-github
subpackages:
- github
- package: golang.org/x/oauth2
- package: gopkg.in/yaml.v2
- package: github.com/google/go-querystring
Expand All @@ -14,3 +11,5 @@ import:
subpackages:
- context
- package: github.com/tonglil/versioning
- package: github.com/google/go-github
version: ~18.2.0
6 changes: 4 additions & 2 deletions remote/remote.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package remote

import (
"context"

"github.com/google/go-github/github"
"github.com/tonglil/labeler/logs"
"github.com/tonglil/labeler/types"
Expand All @@ -18,12 +20,12 @@ func GetLabels(client *github.Client, opt *types.Options) ([]*github.Label, erro
for {
logs.V(4).Infof("Fetching labels from Github, page %d", pagination.Page)

labels, resp, err := client.Issues.ListLabels(opt.RepoOwner(), opt.RepoName(), pagination)
labels, resp, err := client.Issues.ListLabels(context.Background(), opt.RepoOwner(), opt.RepoName(), pagination)
if err != nil {
logs.V(0).Infof("Failed to fetch labels from Github")
return nil, err
}
logs.V(6).Infof("Response: %s", resp)
logs.V(6).Infof("Response: %#v", resp)

labelsRemote = append(labelsRemote, labels...)

Expand Down
7 changes: 4 additions & 3 deletions types/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ type LabelFile struct {

// Label represents a label in the labels.yaml file.
type Label struct {
Name string `yaml:"name"`
Color string `yaml:"color"`
From string `yaml:"from,omitempty"`
Name string `yaml:"name"`
Color string `yaml:"color"`
From string `yaml:"from,omitempty"`
Description string `yaml:"description,omitempty"`
}
1 change: 1 addition & 0 deletions vendor/github.com/google/go-github/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 20 additions & 11 deletions vendor/github.com/google/go-github/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions vendor/github.com/google/go-github/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading