From f0fd4fa9610fbd2afa2117c158cc2c33082da4a1 Mon Sep 17 00:00:00 2001 From: Gahan Rakholia Date: Mon, 23 Oct 2023 22:48:19 +0530 Subject: [PATCH] refactor: move gitoutput pattern to gitoutput --- pkg/jira_changelog/git/commit_populator.go | 3 --- pkg/jira_changelog/git/git_output.go | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/jira_changelog/git/commit_populator.go b/pkg/jira_changelog/git/commit_populator.go index 565208d..c0cda4f 100644 --- a/pkg/jira_changelog/git/commit_populator.go +++ b/pkg/jira_changelog/git/commit_populator.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "os/exec" - "regexp" "time" ) @@ -14,8 +13,6 @@ type Commit struct { Sha string } -var gitoutputPattern = regexp.MustCompile(`^\((\d+)\)\s+\{(\w+)\}\s*(.*)`) - type commitPopulator struct { fromRef string toRef string diff --git a/pkg/jira_changelog/git/git_output.go b/pkg/jira_changelog/git/git_output.go index 4d5106c..c33b8bc 100644 --- a/pkg/jira_changelog/git/git_output.go +++ b/pkg/jira_changelog/git/git_output.go @@ -2,6 +2,7 @@ package git import ( "fmt" + "regexp" "strconv" "strings" "time" @@ -9,6 +10,8 @@ import ( "golang.org/x/exp/slog" ) +var gitoutputPattern = regexp.MustCompile(`^\((\d+)\)\s+\{(\w+)\}\s*(.*)`) + type GitOutput string func (gt GitOutput) Commits() ([]Commit, error) {