Skip to content

Commit

Permalink
debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jazanne committed Feb 2, 2024
1 parent a81186c commit c546c5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/ldclient/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func GetAllFlags(config *lcr.Config) ([]ldapi.FeatureFlag, error) {
flags = append(flags, archivedFlags...)
}

gha.Debug("Fetched %d flags", len(flags))
return flags, nil
}

Expand Down
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,14 @@ func getDiffs(ctx context.Context, config *lcr.Config, prNumber int) ([]*diff.Fi

return nil, err
}
return diff.ParseMultiFileDiff([]byte(raw))

multi, err := diff.ParseMultiFileDiff([]byte(raw))
if err != nil {
return nil, err
}
gha.Debug("Got %d diff files", len(multi))

return multi, nil
}

// Get options from config. Note: dir will be set to workspace
Expand Down
5 changes: 5 additions & 0 deletions search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package search
import (
"strings"

gha "github.com/launchdarkly/find-code-references-in-pull-request/internal/github_actions"
laliases "github.com/launchdarkly/ld-find-code-refs/v2/aliases"
"github.com/launchdarkly/ld-find-code-refs/v2/options"
lsearch "github.com/launchdarkly/ld-find-code-refs/v2/search"
Expand All @@ -16,6 +17,10 @@ func GetMatcher(opts options.Options, flagKeys []string, diffContents laliases.F
return lsearch.Matcher{}, err
}

for key, alias := range aliasesByFlagKey {
gha.Debug("Generated aliases for '%s': %v", key, alias)
}

delimiters := strings.Join(lsearch.GetDelimiters(opts), "")
elements := make([]lsearch.ElementMatcher, 0, 1)
elements = append(elements, lsearch.NewElementMatcher(opts.ProjKey, opts.Dir, delimiters, flagKeys, aliasesByFlagKey))
Expand Down

0 comments on commit c546c5d

Please sign in to comment.