Skip to content

Commit

Permalink
Updating the logging message for clear understanding
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohit Sharma committed Nov 27, 2023
1 parent 1b75206 commit df5190e
Show file tree
Hide file tree
Showing 4 changed files with 2,862 additions and 3 deletions.
54 changes: 54 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added bin/golangci-lint
Binary file not shown.
5 changes: 2 additions & 3 deletions cmd/update-rules/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ func UpdateRules(rules *config.RepositoryRules, branch, goVer string, deleteRule
if deleteRule {
for i, br := range r.Branches {
if br.Name == branch {
glog.Infof("Remove rule %s for %s", branch, r.DestinationRepository)
glog.Infof("remove rule %s for %s", branch, r.DestinationRepository)
r.Branches = append(r.Branches[:i], r.Branches[i+1:]...)
deletedBranch = true
break
}
}
if !deletedBranch {
glog.Infof("Trying to delete branch %s that doesn't exists for %s", branch, r.DestinationRepository)
glog.Infof("skipping delete of branch rule %s that doesn't exists for %s", branch, r.DestinationRepository)
}
continue
}
Expand Down Expand Up @@ -175,7 +175,6 @@ func UpdateRules(rules *config.RepositoryRules, branch, goVer string, deleteRule
break
}
}

// new rules, append to destination's branches
if !branchRuleExists {
r.Branches = append(r.Branches, newBranchRule)
Expand Down
Loading

0 comments on commit df5190e

Please sign in to comment.