Skip to content

Commit

Permalink
Applied code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsimzicov committed Apr 30, 2023
1 parent 4e52a1c commit 1e93d37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (

func extractInfoFromConversationVariables(message dto.BaseChatMessage) (pullRequests []PullRequest, pipeline string, repositories []string, err error) {
pipeline = getFromVariable(message, stepWhatPipeline)
if "" == pipeline {
if pipeline == "" {
return pullRequests, pipeline, repositories, errors.New("Invalid pipeline value received.")
}

target := getFromVariable(message, stepWhatDestination)
if "" == target {
if target == "" {
return pullRequests, pipeline, repositories, errors.New("Invalid target value received.")
}

Expand All @@ -38,6 +38,9 @@ func extractInfoFromString(text string) (receivedPullRequests []PullRequest, pip
}

pipeline, err = extractPipeline(text)
if err != nil {
return nil, "", nil, errors.Wrap(err, "Failed to extract pipeline from the string")
}
repositories, err = extractRepositoriesFromString(text)
if err != nil {
return nil, "", nil, errors.Wrap(err, "Failed to parse repositories from the string")
Expand Down

0 comments on commit 1e93d37

Please sign in to comment.