diff --git a/.chronicle.yaml b/.chronicle.yaml index 010b184..dc96de8 100644 --- a/.chronicle.yaml +++ b/.chronicle.yaml @@ -1,2 +1,4 @@ log: level: trace + +title: '' \ No newline at end of file diff --git a/chronicle/release/format/markdown/__snapshots__/presenter_test.snap b/chronicle/release/format/markdown/__snapshots__/presenter_test.snap new file mode 100755 index 0000000..97b6129 --- /dev/null +++ b/chronicle/release/format/markdown/__snapshots__/presenter_test.snap @@ -0,0 +1,36 @@ + +[TestMarkdownPresenter_Present - 1] +# v0.19.1 + +### Bug Fixes + +- Redirect cursor hide/show to stderr [[#456](https://github.com/anchore/syft/pull/456)] + +### Added Features + +- added feature [[#457](https://github.com/anchore/syft/pull/457) @wagoodman] +- another added feature + +### Breaking Changes + +- breaking change [[#458](https://github.com/anchore/syft/pull/458) [#450](https://github.com/anchore/syft/issues/450) @wagoodman] + +**[(Full Changelog)](https://github.com/anchore/syft/compare/v0.19.0...v0.19.1)** + +--- + +[TestMarkdownPresenter_Present_NoTitle - 1] +### Bug Fixes + +- Redirect cursor hide/show to stderr [[#456](https://github.com/anchore/syft/pull/456)] + +**[(Full Changelog)](https://github.com/anchore/syft/compare/v0.19.0...v0.19.1)** + +--- + +[TestMarkdownPresenter_Present_NoChanges - 1] +# Changelog + +**[(Full Changelog)](https://github.com/anchore/syft/compare/v0.19.0...v0.19.1)** + +--- diff --git a/chronicle/release/format/markdown/presenter.go b/chronicle/release/format/markdown/presenter.go index 7981d88..447f291 100644 --- a/chronicle/release/format/markdown/presenter.go +++ b/chronicle/release/format/markdown/presenter.go @@ -1,10 +1,14 @@ package markdown import ( + "bytes" "fmt" "io" + "strings" "text/template" + "github.com/leodido/go-conventionalcommits" + cc "github.com/leodido/go-conventionalcommits/parser" "github.com/wagoodman/go-presenter" "github.com/anchore/chronicle/chronicle/release" @@ -12,13 +16,11 @@ import ( ) const ( - markdownHeaderTemplate = `# {{.Title}} + markdownHeaderTemplate = `{{if .Title }}# {{.Title}} -## [{{.Version}}]({{.VCSReferenceURL}}) ({{ .Date.Format "2006-01-02" }}) +{{ end }}{{if .Changes }}{{ formatChangeSections .Changes }} -[Full Changelog]({{.VCSChangesURL}}) - -{{ formatChangeSections .Changes }} +{{ end }}**[(Full Changelog)]({{.VCSChangesURL}})** ` ) @@ -54,6 +56,17 @@ func NewMarkdownPresenter(config Config) (*Presenter, error) { return nil, fmt.Errorf("unable to parse markdown presenter template: %w", err) } + titleTemplater, err := template.New("title").Funcs(funcMap).Parse(config.Title) + if err != nil { + return nil, fmt.Errorf("unable to parse markdown presenter title template: %w", err) + } + + buf := bytes.Buffer{} + if err := titleTemplater.Execute(&buf, config); err != nil { + return nil, fmt.Errorf("unable to template title: %w", err) + } + p.config.Title = buf.String() + p.templater = templater return &p, nil @@ -71,7 +84,7 @@ func (m Presenter) formatChangeSections(changes change.Changes) string { result += formatChangeSection(section.Title, summaries) + "\n" } } - return result + return strings.TrimRight(result, "\n") } func formatChangeSection(title string, summaries []change.Change) string { @@ -83,14 +96,53 @@ func formatChangeSection(title string, summaries []change.Change) string { } func formatSummary(summary change.Change) string { - result := fmt.Sprintf("- %s", summary.Text) + result := removeConventionalCommitPrefix(strings.TrimSpace(summary.Text)) + result = fmt.Sprintf("- %s", result) + if endsWithPunctuation(result) { + result = result[:len(result)-1] + } + + var refs string for _, ref := range summary.References { - if ref.URL == "" { - result += fmt.Sprintf(" [%s]", ref.Text) - } else { - result += fmt.Sprintf(" [[%s](%s)]", ref.Text, ref.URL) + switch { + case ref.URL == "": + refs += fmt.Sprintf(" %s", ref.Text) + case strings.HasPrefix(ref.Text, "@") && strings.HasPrefix(ref.URL, "https://github.com/"): + // the github release page will automatically show all contributors as a footer. However, if you + // embed the contributor's github handle in a link, then this feature will not work. + refs += fmt.Sprintf(" %s", ref.Text) + default: + refs += fmt.Sprintf(" [%s](%s)", ref.Text, ref.URL) } } + refs = strings.TrimSpace(refs) + if refs != "" { + result += fmt.Sprintf(" [%s]", refs) + } + return result + "\n" } + +func endsWithPunctuation(s string) bool { + if len(s) == 0 { + return false + } + return strings.Contains("!.?", s[len(s)-1:]) //nolint:gocritic +} + +func removeConventionalCommitPrefix(s string) string { + res, err := cc.NewMachine(cc.WithTypes(conventionalcommits.TypesConventional)).Parse([]byte(s)) + if err != nil || res == nil || (res != nil && !res.Ok()) { + // probably not a conventional commit + return s + } + + // conventional commits always have a prefix and the message starts after the first ":" + fields := strings.SplitN(s, ":", 2) + if len(fields) == 2 { + return strings.TrimSpace(fields[1]) + } + + return s +} diff --git a/chronicle/release/format/markdown/presenter_test.go b/chronicle/release/format/markdown/presenter_test.go index d4c5ad6..69e0fc3 100644 --- a/chronicle/release/format/markdown/presenter_test.go +++ b/chronicle/release/format/markdown/presenter_test.go @@ -2,33 +2,29 @@ package markdown import ( "bytes" - "flag" "testing" "time" - "github.com/sergi/go-diff/diffmatchpatch" + "github.com/gkampitakis/go-snaps/snaps" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/wagoodman/go-presenter" "github.com/anchore/chronicle/chronicle/release" "github.com/anchore/chronicle/chronicle/release/change" - "github.com/anchore/go-testutils" ) -var updateMarkdownPresenterGoldenFiles = flag.Bool("update-markdown", false, "update the *.golden files for markdown presenters") - func TestMarkdownPresenter_Present(t *testing.T) { must := func(m *Presenter, err error) *Presenter { - if err != nil { - t.Fatalf(err.Error()) - } + require.NoError(t, err) return m } assertPresenterAgainstGoldenSnapshot( t, must( NewMarkdownPresenter(Config{ - Title: "Changelog", + // this is the default configuration from the CLI + Title: `{{ .Version }}`, Description: release.Description{ SupportedChanges: []change.TypeTitle{ { @@ -57,38 +53,129 @@ func TestMarkdownPresenter_Present(t *testing.T) { Changes: []change.Change{ { ChangeTypes: []change.Type{change.NewType("bug", change.SemVerPatch)}, - Text: "Redirect cursor hide/show to stderr", + Text: "fix: Redirect cursor hide/show to stderr.", References: []change.Reference{ { - Text: "456", + Text: "#456", URL: "https://github.com/anchore/syft/pull/456", }, }, }, { ChangeTypes: []change.Type{change.NewType("added", change.SemVerMinor)}, - Text: "added feature", + Text: "added feature!", + References: []change.Reference{ + { + Text: "#457", + URL: "https://github.com/anchore/syft/pull/457", + }, + { + Text: "@wagoodman", + URL: "https://github.com/wagoodman", + }, + }, }, { ChangeTypes: []change.Type{change.NewType("added", change.SemVerMinor)}, - Text: "another added feature", + Text: "feat(api)!: another added feature", }, { ChangeTypes: []change.Type{change.NewType("breaking", change.SemVerMajor)}, - Text: "breaking change", + Text: "breaking change?", + References: []change.Reference{ + { + Text: "#458", + URL: "https://github.com/anchore/syft/pull/458", + }, + { + Text: "#450", + URL: "https://github.com/anchore/syft/issues/450", + }, + { + Text: "@wagoodman", + URL: "https://github.com/wagoodman", + }, + }, }, }, Notice: "notice!", }, }), ), - *updateMarkdownPresenterGoldenFiles, + ) +} + +func TestMarkdownPresenter_Present_NoTitle(t *testing.T) { + must := func(m *Presenter, err error) *Presenter { + require.NoError(t, err) + return m + } + assertPresenterAgainstGoldenSnapshot( + t, + must( + NewMarkdownPresenter(Config{ + Title: "", + Description: release.Description{ + SupportedChanges: []change.TypeTitle{ + { + ChangeType: change.NewType("bug", change.SemVerPatch), + Title: "Bug Fixes", + }, + }, + Release: release.Release{ + Version: "v0.19.1", + Date: time.Date(2021, time.September, 16, 19, 34, 0, 0, time.UTC), + }, + VCSReferenceURL: "https://github.com/anchore/syft/tree/v0.19.1", + VCSChangesURL: "https://github.com/anchore/syft/compare/v0.19.0...v0.19.1", + Changes: []change.Change{ + { + ChangeTypes: []change.Type{change.NewType("bug", change.SemVerPatch)}, + Text: "Redirect cursor hide/show to stderr", + References: []change.Reference{ + { + Text: "#456", + URL: "https://github.com/anchore/syft/pull/456", + }, + }, + }, + }, + Notice: "notice!", + }, + }), + ), + ) +} + +func TestMarkdownPresenter_Present_NoChanges(t *testing.T) { + must := func(m *Presenter, err error) *Presenter { + require.NoError(t, err) + return m + } + assertPresenterAgainstGoldenSnapshot( + t, + must( + NewMarkdownPresenter(Config{ + Title: "Changelog", + Description: release.Description{ + SupportedChanges: []change.TypeTitle{}, + Release: release.Release{ + Version: "v0.19.1", + Date: time.Date(2021, time.September, 16, 19, 34, 0, 0, time.UTC), + }, + VCSReferenceURL: "https://github.com/anchore/syft/tree/v0.19.1", + VCSChangesURL: "https://github.com/anchore/syft/compare/v0.19.0...v0.19.1", + Changes: []change.Change{}, + Notice: "notice!", + }, + }), + ), ) } type redactor func(s []byte) []byte -func assertPresenterAgainstGoldenSnapshot(t *testing.T, pres presenter.Presenter, updateSnapshot bool, redactors ...redactor) { +func assertPresenterAgainstGoldenSnapshot(t *testing.T, pres presenter.Presenter, redactors ...redactor) { t.Helper() var buffer bytes.Buffer @@ -96,22 +183,110 @@ func assertPresenterAgainstGoldenSnapshot(t *testing.T, pres presenter.Presenter assert.NoError(t, err) actual := buffer.Bytes() - // replace the expected snapshot contents with the current presenter contents - if updateSnapshot { - testutils.UpdateGoldenFileContents(t, actual) - } - - var expected = testutils.GetGoldenFileContents(t) - // remove dynamic values, which should be tested independently for _, r := range redactors { actual = r(actual) - expected = r(expected) } - if !bytes.Equal(expected, actual) { - dmp := diffmatchpatch.New() - diffs := dmp.DiffMain(string(expected), string(actual), true) - t.Errorf("mismatched output:\n%s", dmp.DiffPrettyText(diffs)) + snaps.MatchSnapshot(t, string(actual)) +} + +func Test_removeConventionalCommitPrefix(t *testing.T) { + + tests := []struct { + name string + want string + }{ + // positive cases + { + name: "feat: add user authentication", + want: "add user authentication", + }, + { + name: "fix: resolve null pointer exception", + want: "resolve null pointer exception", + }, + { + name: "docs: update README", + want: "update README", + }, + { + name: "style: format code according to style guide", + want: "format code according to style guide", + }, + { + name: "refactor: extract reusable function", + want: "extract reusable function", + }, + { + name: "perf: optimize database queries", + want: "optimize database queries", + }, + { + name: "test: add unit tests", + want: "add unit tests", + }, + { + name: "build: update build process", + want: "update build process", + }, + { + name: "ci: configure Travis CI", + want: "configure Travis CI", + }, + { + name: "chore: perform maintenance tasks", + want: "perform maintenance tasks", + }, + // positive case odd balls + { + name: "chore: can end with punctuation.", + want: "can end with punctuation.", + }, + { + name: "revert!: revert: previous: commit", + want: "revert: previous: commit", + }, + { + name: "feat(api)!: implement new: API endpoints", + want: "implement new: API endpoints", + }, + { + name: "feat!: add awesome new feature (closes #123)", + want: "add awesome new feature (closes #123)", + }, + { + name: "fix(ui): fix layout issue (fixes #456)", + want: "fix layout issue (fixes #456)", + }, + // negative cases + { + name: "reallycoolthing: is done!", + want: "reallycoolthing: is done!", + }, + { + name: "feature: is done!", + want: "feature: is done!", + }, + { + // missing description... just leave it alone + name: "feat(scope): ", + want: "feat(scope): ", + }, + { + // missing whitespace in description (yes, that's a cc requirement) + name: "feat(scope):something", + want: "feat(scope):something", + }, + { + // has a newline + name: "feat: something\n wicked this way comes", + want: "feat: something\n wicked this way comes", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, removeConventionalCommitPrefix(tt.name), "removeConventionalCommitPrefix(%v)", tt.name) + }) } } diff --git a/chronicle/release/format/markdown/test-fixtures/snapshot/TestMarkdownPresenter_Present.golden b/chronicle/release/format/markdown/test-fixtures/snapshot/TestMarkdownPresenter_Present.golden deleted file mode 100644 index 57af4d1..0000000 --- a/chronicle/release/format/markdown/test-fixtures/snapshot/TestMarkdownPresenter_Present.golden +++ /dev/null @@ -1,20 +0,0 @@ -# Changelog - -## [v0.19.1](https://github.com/anchore/syft/tree/v0.19.1) (2021-09-16) - -[Full Changelog](https://github.com/anchore/syft/compare/v0.19.0...v0.19.1) - -### Bug Fixes - -- Redirect cursor hide/show to stderr [[456](https://github.com/anchore/syft/pull/456)] - -### Added Features - -- added feature -- another added feature - -### Breaking Changes - -- breaking change - - diff --git a/chronicle/release/releasers/github/summarizer.go b/chronicle/release/releasers/github/summarizer.go index c3f2406..663c6cc 100644 --- a/chronicle/release/releasers/github/summarizer.go +++ b/chronicle/release/releasers/github/summarizer.go @@ -282,11 +282,11 @@ func createChangesFromPRs(config Config, prs []ghPullRequest) []change.Change { Timestamp: pr.MergedAt, References: []change.Reference{ { - Text: fmt.Sprintf("PR #%d", pr.Number), + Text: fmt.Sprintf("#%d", pr.Number), URL: pr.URL, }, { - Text: pr.Author, + Text: fmt.Sprintf("@%s", pr.Author), URL: fmt.Sprintf("https://%s/%s", config.Host, pr.Author), }, }, @@ -380,7 +380,7 @@ func createChangesFromIssues(config Config, allMergedPRs []ghPullRequest, issues references := []change.Reference{ { - Text: fmt.Sprintf("Issue #%d", issue.Number), + Text: fmt.Sprintf("#%d", issue.Number), URL: issue.URL, }, } @@ -389,13 +389,13 @@ func createChangesFromIssues(config Config, allMergedPRs []ghPullRequest, issues for _, pr := range getLinkedPRs(allMergedPRs, issue) { if config.IncludeIssuePRs { references = append(references, change.Reference{ - Text: fmt.Sprintf("PR #%d", pr.Number), + Text: fmt.Sprintf("#%d", pr.Number), URL: pr.URL, }) } if config.IncludeIssuePRAuthors && pr.Author != "" { references = append(references, change.Reference{ - Text: pr.Author, + Text: fmt.Sprintf("@%s", pr.Author), URL: fmt.Sprintf("https://%s/%s", config.Host, pr.Author), }) } diff --git a/chronicle/release/releasers/github/summarizer_test.go b/chronicle/release/releasers/github/summarizer_test.go index c13292d..340b458 100644 --- a/chronicle/release/releasers/github/summarizer_test.go +++ b/chronicle/release/releasers/github/summarizer_test.go @@ -870,23 +870,23 @@ func Test_createChangesFromIssues(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "Issue #1", + Text: "#1", URL: "issue-1-url", }, { - Text: "PR #1", + Text: "#1", URL: "pr-1-url", }, { - Text: "some-author-1", + Text: "@some-author-1", URL: "https://some-host/some-author-1", }, { - Text: "PR #2", + Text: "#2", URL: "pr-2-url", }, { - Text: "some-author-2", + Text: "@some-author-2", URL: "https://some-host/some-author-2", }, }, @@ -899,15 +899,15 @@ func Test_createChangesFromIssues(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "Issue #2", + Text: "#2", URL: "issue-2-url", }, { - Text: "PR #2", + Text: "#2", URL: "pr-2-url", }, { - Text: "some-author-2", + Text: "@some-author-2", URL: "https://some-host/some-author-2", }, }, @@ -920,7 +920,7 @@ func Test_createChangesFromIssues(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "Issue #3", + Text: "#3", URL: "issue-3-url", }, }, @@ -1010,11 +1010,11 @@ func Test_changesFromUnlabeledPRs(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "PR #6", + Text: "#6", URL: "some-url", }, { - Text: "some-author", + Text: "@some-author", URL: "https://some-host/some-author", }, }, @@ -1027,11 +1027,11 @@ func Test_changesFromUnlabeledPRs(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "PR #7", + Text: "#7", URL: "some-url-2", }, { - Text: "some-author-2", + Text: "@some-author-2", URL: "https://some-host/some-author-2", }, }, @@ -1140,15 +1140,15 @@ func Test_changesFromUnlabeledIssues(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "Issue #6", + Text: "#6", URL: "some-url", }, { - Text: "PR #1", + Text: "#1", URL: "pr-1-url", }, { - Text: "pr-1-author", + Text: "@pr-1-author", URL: "https://some-host/pr-1-author", }, }, @@ -1161,7 +1161,7 @@ func Test_changesFromUnlabeledIssues(t *testing.T) { Timestamp: timeStart, References: []change.Reference{ { - Text: "Issue #7", + Text: "#7", URL: "some-url-2", }, }, diff --git a/cmd/chronicle/cli/commands/create_config.go b/cmd/chronicle/cli/commands/create_config.go index 4e9957a..a67310d 100644 --- a/cmd/chronicle/cli/commands/create_config.go +++ b/cmd/chronicle/cli/commands/create_config.go @@ -66,7 +66,7 @@ func defaultCreateConfig() *createConfig { VersionFile: "", SinceTag: "", UntilTag: "", - Title: "", + Title: `{{ .Version }}`, RepoPath: "", SpeculateNextVersion: false, EnforceV0: false, diff --git a/go.mod b/go.mod index 971932c..d7adee0 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,11 @@ require ( github.com/anchore/clio v0.0.0-20230802135737-4778c80552e5 github.com/anchore/fangs v0.0.0-20230725134830-329a9a4d20e7 github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a - github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04 github.com/coreos/go-semver v0.3.1 + github.com/gkampitakis/go-snaps v0.4.10 github.com/go-git/go-git/v5 v5.9.0 + github.com/leodido/go-conventionalcommits v0.11.0 github.com/scylladb/go-set v1.0.2 - github.com/sergi/go-diff v1.3.1 github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -31,6 +31,8 @@ require ( github.com/emirpasic/gods v1.18.1 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/gkampitakis/ciinfo v0.2.5 // indirect + github.com/gkampitakis/go-diff v1.3.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -44,7 +46,8 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect @@ -56,6 +59,8 @@ require ( github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.0 // indirect @@ -65,6 +70,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect + github.com/tidwall/gjson v1.16.0 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.1 // indirect + github.com/tidwall/sjson v1.2.5 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect golang.org/x/crypto v0.13.0 // indirect diff --git a/go.sum b/go.sum index e5f5d92..000707d 100644 --- a/go.sum +++ b/go.sum @@ -55,8 +55,6 @@ github.com/anchore/fangs v0.0.0-20230725134830-329a9a4d20e7 h1:DiG9qj+JNfjodKQN5 github.com/anchore/fangs v0.0.0-20230725134830-329a9a4d20e7/go.mod h1:82EGoxZTfBXSW0/zollEP+Qs3wkiKmip5yBT5j+eZpY= github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a h1:nJ2G8zWKASyVClGVgG7sfM5mwoZlZ2zYpIzN2OhjWkw= github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a/go.mod h1:ubLFmlsv8/DFUQrZwY5syT5/8Er3ugSr4rDFwHsE3hg= -github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04 h1:VzprUTpc0vW0nnNKJfJieyH/TZ9UYAnTZs5/gHTdAe8= -github.com/anchore/go-testutils v0.0.0-20200925183923-d5f45b0d3c04/go.mod h1:6dK64g27Qi1qGQZ67gFmBFvEHScy0/C8qhQhNe5B5pQ= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -75,6 +73,7 @@ github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -98,6 +97,12 @@ github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0X github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gkampitakis/ciinfo v0.2.5 h1:K0mac90lGguc1conc46l0YEsB7/nioWCqSnJp/6z8Eo= +github.com/gkampitakis/ciinfo v0.2.5/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo= +github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M= +github.com/gkampitakis/go-diff v1.3.2/go.mod h1:LLgOrpqleQe26cte8s36HTWcTmMEur6OPYerdAAS9tk= +github.com/gkampitakis/go-snaps v0.4.10 h1:rUcTH4k6+rzw6ylDALMifzw2c/f9cG3NZe/n+7Ygdr4= +github.com/gkampitakis/go-snaps v0.4.10/go.mod h1:N4TpqxI4CqKUfHzDFqrqZ5UP0I0ESz2g2NMslh7MiJw= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -201,14 +206,16 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 h1:bqDmpDG49ZRnB5PcgP0RXtQvnMSgIF14M7CBd2shtXs= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/leodido/go-conventionalcommits v0.11.0 h1:b7KW1ZzGqouzP7Yi4uobLx/rDFnOD0fewX3t7XqYTCE= +github.com/leodido/go-conventionalcommits v0.11.0/go.mod h1:wVZdFNRHTN3Spla4r7GZkUDyQMDQtA/A+Vp2kRUMVJs= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= @@ -231,6 +238,7 @@ github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= @@ -240,9 +248,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwtodd/Go.Sed v0.0.0-20210816025313-55464686f9ef/go.mod h1:8AEUvGVi2uQ5b24BIhcr0GCcpd/RNAFWaN2CJFrWIIQ= github.com/scylladb/go-set v1.0.2 h1:SkvlMCKhP0wyyct6j+0IHJkBkSZL+TDzZ4E7f7BCcRE= github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= @@ -252,6 +263,7 @@ github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa/go.mod h1:hAF0iL github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a h1:KikTa6HtAK8cS1qjvUvvq4QO21QnwC+EfvB+OAuZ/ZU= github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= @@ -283,6 +295,16 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= +github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651 h1:jIVmlAFIqV3d+DOxazTR9v+zgj8+VYuQBzPgBZvWBHA= github.com/wagoodman/go-partybus v0.0.0-20230516145632-8ccac152c651/go.mod h1:b26F2tHLqaoRQf8DywqzVaV1MQ9yvjb0OMcNl7Nxu20= github.com/wagoodman/go-presenter v0.0.0-20211015174752-f9c01afc824b h1:uWNQ0khA6RdFzODOMwKo9XXu7fuewnnkHykUtuKru8s= @@ -457,6 +479,7 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220708085239-5a0f0661e09d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=