This commit is contained in:
parent
14581dbe83
commit
7fa3553da6
@ -16,6 +16,8 @@ linters:
|
|||||||
- testpackage
|
- testpackage
|
||||||
# Crashes a lot.
|
# Crashes a lot.
|
||||||
- gci
|
- gci
|
||||||
|
# Deprecated.
|
||||||
|
- exhaustivestruct
|
||||||
linters-settings:
|
linters-settings:
|
||||||
lll:
|
lll:
|
||||||
line-length: 128
|
line-length: 128
|
||||||
|
@ -45,7 +45,7 @@ func Parse() *Config {
|
|||||||
panic("Failed to read configuration file data: " + readErr.Error())
|
panic("Failed to read configuration file data: " + readErr.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
// nolint:exhaustivestruct
|
// nolint:exhaustruct
|
||||||
cfg := &Config{}
|
cfg := &Config{}
|
||||||
|
|
||||||
if err := yaml.Unmarshal(data, cfg); err != nil {
|
if err := yaml.Unmarshal(data, cfg); err != nil {
|
||||||
|
@ -16,7 +16,7 @@ type Client struct {
|
|||||||
|
|
||||||
// NewGitlabClient creates new Gitlab's client controlling structure.
|
// NewGitlabClient creates new Gitlab's client controlling structure.
|
||||||
func NewGitlabClient(cfg *Config) *Client {
|
func NewGitlabClient(cfg *Config) *Client {
|
||||||
// nolint:exhaustivestruct
|
// nolint:exhaustruct
|
||||||
c := &Client{
|
c := &Client{
|
||||||
config: cfg,
|
config: cfg,
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ func (c *Client) GetClient() *gitlab.Client {
|
|||||||
// GetIssuesByTitle returns list of issues that matches passed title in specific
|
// GetIssuesByTitle returns list of issues that matches passed title in specific
|
||||||
// project.
|
// project.
|
||||||
func (c *Client) GetIssuesByTitle(projectID int, title string) ([]*gitlab.Issue, error) {
|
func (c *Client) GetIssuesByTitle(projectID int, title string) ([]*gitlab.Issue, error) {
|
||||||
// nolint:exhaustivestruct
|
// nolint:exhaustruct
|
||||||
issues, resp, err := c.client.Issues.ListProjectIssues(projectID, &gitlab.ListProjectIssuesOptions{
|
issues, resp, err := c.client.Issues.ListProjectIssues(projectID, &gitlab.ListProjectIssuesOptions{
|
||||||
ListOptions: gitlab.ListOptions{
|
ListOptions: gitlab.ListOptions{
|
||||||
PerPage: 1000,
|
PerPage: 1000,
|
||||||
|
@ -123,7 +123,7 @@ func (b *BaseTask) Run() {
|
|||||||
|
|
||||||
b.log("Found no opened tasks and task should be created, doing so. Task deadline: " + nextDeadlineTS.String())
|
b.log("Found no opened tasks and task should be created, doing so. Task deadline: " + nextDeadlineTS.String())
|
||||||
|
|
||||||
// nolint:exhaustivestruct
|
// nolint:exhaustruct
|
||||||
err := b.client.CreateIssue(b.projectID, &g.CreateIssueOptions{
|
err := b.client.CreateIssue(b.projectID, &g.CreateIssueOptions{
|
||||||
Title: &b.title,
|
Title: &b.title,
|
||||||
Description: &b.body,
|
Description: &b.body,
|
||||||
|
Loading…
Reference in New Issue
Block a user