Skip to content
Merged
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
4 changes: 2 additions & 2 deletions plugins/github/api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func DeleteConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, er
return nil, err
}
err = connectionHelper.Delete(connection)
return &core.ApiResourceOutput{Body: connection}, err
return &core.ApiResourceOutput{Body: connection}, nil
}

// @Summary get all github connections
Expand Down Expand Up @@ -206,5 +206,5 @@ func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error
if err != nil {
return nil, err
}
return &core.ApiResourceOutput{Body: connection}, err
return &core.ApiResourceOutput{Body: connection}, nil
}
3 changes: 3 additions & 0 deletions plugins/gitlab/api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, err
func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error) {
connection := &models.GitlabConnection{}
err := connectionHelper.First(connection, input.Params)
if err != nil {
return nil, err
}
return &core.ApiResourceOutput{Body: connection}, err
}

Expand Down
3 changes: 3 additions & 0 deletions plugins/jenkins/api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, err
func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error) {
connection := &models.JenkinsConnection{}
err := connectionHelper.First(connection, input.Params)
if err != nil {
return nil, err
}
return &core.ApiResourceOutput{Body: connection}, err
}

Expand Down
3 changes: 3 additions & 0 deletions plugins/jira/api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,8 @@ func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, err
func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error) {
connection := &models.JiraConnection{}
err := connectionHelper.First(connection, input.Params)
if err != nil {
return nil, err
}
return &core.ApiResourceOutput{Body: connection}, err
}
5 changes: 4 additions & 1 deletion plugins/tapd/api/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,8 @@ func ListConnections(input *core.ApiResourceInput) (*core.ApiResourceOutput, err
func GetConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, error) {
connection := &models.TapdConnection{}
err := connectionHelper.First(connection, input.Params)
return &core.ApiResourceOutput{Body: connection}, err
if err != nil {
return nil,err
}
return &core.ApiResourceOutput{Body: connection},nil
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep in line with other plugins, and missing space.

Copy link
Copy Markdown
Contributor Author

@Pranshu-Raj Pranshu-Raj Jul 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay that i did previously but why this lint commit-msg test is failing can u help me with that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both 165 and 167 need to add space, you added the space at 167 and missing 165, it maybe lint commit-msg test is failing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try running make fmt. the go formatter should take care of these kind of things

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this is the only issue left for this PR, do you plan to work on it? @Pranshu-Raj

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry @klesh I am unable to resolve this issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. I will try to fix the rest

}