Skip to content

Commit

Permalink
feat(main): initializing labels
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>
  • Loading branch information
cubxxw committed Jun 3, 2023
1 parent 8581320 commit ebf16fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p align=center>
<a href="https://goreportcard.com/report/github.com/kubecub/github-label-syncer"><img src="https://goreportcard.com/badge/github.com/kubecub/github-label-syncer" alt="A+"></a>
<a href="https://github.com/issues?q=org%kubecub+is%3Aissue+label%3A%22good+first+issue%22+no%3Aassignee"><img src="https://img.shields.io/github/issues/kubecub/github-label-syncer/good%20first%20issue?logo=%22github%22" alt="good first"></a>
<a href="https://github.com/kubecub/github-label-syncer/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/kubecub/github-label-syncer/good%20first%20issue?logo=%22github%22" alt="good first"></a>
<a href="https://github.com/kubecub/github-label-syncer"><img src="https://img.shields.io/github/stars/kubecub/github-label-syncer.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
<a href="https://join.slack.com/t/kubecub/shared_invite/zt-1se0k2bae-lkYzz0_T~BYh3rjkvlcUqQ"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&amp;logoColor=white"></a>
<a href="https://github.com/kubecub/github-label-syncer/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p align=center>
<a href="https://goreportcard.com/report/github.com/kubecub/github-label-syncer"><img src="https://goreportcard.com/badge/github.com/kubecub/github-label-syncer" alt="A+"></a>
<a href="https://github.com/issues?q=org%kubecub+is%3Aissue+label%3A%22good+first+issue%22+no%3Aassignee"><img src="https://img.shields.io/github/issues/kubecub/github-label-syncer/good%20first%20issue?logo=%22github%22" alt="good first"></a>
<a href="https://github.com/kubecub/github-label-syncer/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22"><img src="https://img.shields.io/github/issues/kubecub/github-label-syncer/good%20first%20issue?logo=%22github%22" alt="good first"></a>
<a href="https://github.com/kubecub/github-label-syncer"><img src="https://img.shields.io/github/stars/kubecub/github-label-syncer.svg?style=flat&logo=github&colorB=deeppink&label=stars"></a>
<a href="https://join.slack.com/t/kubecub/shared_invite/zt-1se0k2bae-lkYzz0_T~BYh3rjkvlcUqQ"><img src="https://img.shields.io/badge/Slack-100%2B-blueviolet?logo=slack&amp;logoColor=white"></a>
<a href="https://github.com/kubecub/github-label-syncer/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green"></a>
Expand Down
5 changes: 5 additions & 0 deletions pkg/exporter/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ URL: https://api.github.com/repos/Kubernetes/Kubernetes/labels?page=1&sort=nam
"description": "Categorizes an issue or PR as actively needing an API review."
},
*/

type Label struct {
// The name of the label.
Name string `json:"name"`
Expand Down Expand Up @@ -61,6 +62,10 @@ func (c *githubClient) ListLabels(ctx context.Context, owner, repo string) ([]*L
Name: l.GetName(),
Description: l.GetDescription(),
Color: l.GetColor(),
Default: l.GetDefault(),
ID: l.GetID(),
NodeID: l.GetNodeID(),
URL: l.GetURL(),
})
}
if resp.NextPage == 0 {
Expand Down

0 comments on commit ebf16fa

Please sign in to comment.