From 3e93a6fd4f92e68e8a49572ea11f7e43c0e733fb Mon Sep 17 00:00:00 2001 From: dorav Date: Thu, 5 Oct 2023 13:13:08 +0300 Subject: [PATCH] atlasaction/lint: change icon position and title size in the lint comment (#89) --- atlasaction/action.go | 8 ++++---- atlasaction/action_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atlasaction/action.go b/atlasaction/action.go index bbe878c8..9de0cab8 100644 --- a/atlasaction/action.go +++ b/atlasaction/action.go @@ -145,9 +145,9 @@ func publishResult(url string, err error, act *githubactions.Action) error { } icon := fmt.Sprintf(``, status) dirName := act.GetInput("dir-name") - summary := fmt.Sprintf(`# Atlas Lint Report -
Analyzed %v %v

-Lint report available here`, dirName, icon, url) + summary := fmt.Sprintf(`## Atlas Lint Report %v +
Analyzed %v

+Lint report available here`, icon, dirName, url) act.AddStepSummary(summary) g := githubAPI{ baseURL: ghContext.APIURL, @@ -157,7 +157,7 @@ func publishResult(url string, err error, act *githubactions.Action) error { return nil } ghToken := act.Getenv("GITHUB_TOKEN") - comments, err := g.getIssueComments(prNumber, ghContext.Repository, ghToken) + comments, err := g.getIssueComments(prNumber, ghContext.Repository, ghToken) if err != nil { return err } diff --git a/atlasaction/action_test.go b/atlasaction/action_test.go index 399a5b55..56dd0e43 100644 --- a/atlasaction/action_test.go +++ b/atlasaction/action_test.go @@ -352,8 +352,8 @@ func TestMigrateLint(t *testing.T) { require.NoError(t, err) lines := strings.Split(string(c), "\n") expectedLines := []string{ - `# Atlas Lint Report`, - `
Analyzed test-dir-slug

`, + `## Atlas Lint Report `, + `
Analyzed test-dir-slug

`, `Lint report available here`, "", } @@ -371,8 +371,8 @@ func TestMigrateLint(t *testing.T) { require.NoError(t, err) lines := strings.Split(string(c), "\n") expectedLines := []string{ - `# Atlas Lint Report`, - `
Analyzed test-dir-slug

`, + `## Atlas Lint Report `, + `
Analyzed test-dir-slug

`, `Lint report available here`, "", }