Skip to content

Commit

Permalink
🐛 fix url error in printcompact (#765)
Browse files Browse the repository at this point in the history
* 🐛 fix url error in printcompact
  • Loading branch information
vjeffrey authored Sep 27, 2023
1 parent 30d6311 commit d9fab82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ jobs:

- name: Setup Copywrite
uses: hashicorp/setup-copywrite@v1.1.2
with:
version: v0.16.4

- name: Check Header Compliance
run: copywrite headers --plan
10 changes: 6 additions & 4 deletions cli/reporter/print_compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,12 @@ func (r *defaultReporter) printSummary(orderedAssets []assetMrnName) {
// when runnin inside cicd, we create an url for the cicd project
spaceUrlRegexp := regexp.MustCompile(`^(http.*)/inventory/[a-zA-Z0-9-]+(\?.+)$`)
m := spaceUrlRegexp.FindStringSubmatch(assetUrl)
if projectId != "" {
url = m[1] + "/cicd/jobs" + m[2] + "&projectId=" + projectId
} else {
url = m[1] + "/inventory" + m[2]
if len(m) > 0 {
if projectId != "" {
url = m[1] + "/cicd/jobs" + m[2] + "&projectId=" + projectId
} else {
url = m[1] + "/inventory" + m[2]
}
}

} else {
Expand Down

0 comments on commit d9fab82

Please sign in to comment.