Skip to content

Commit

Permalink
Fixing typo - create the connector if there is NO error with URL parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kolomied committed Aug 9, 2022
1 parent cf94b67 commit 63bd3c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/commenter/commenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func createCommenter(token, owner, repo string, prNo int) (*commenter.Commenter,
c, err = commenter.NewCommenter(token, owner, repo, prNo)
} else {
url, err := url.Parse(githubApiUrl)
if err != nil {
if err == nil {
enterpriseUrl := fmt.Sprintf("%s://%s", url.Scheme, url.Hostname())
c, err = commenter.NewEnterpriseCommenter(token, enterpriseUrl, enterpriseUrl, owner, repo, prNo)
}
Expand Down

0 comments on commit 63bd3c4

Please sign in to comment.