From df063f00d729f3d6caee9562f97b7fe0f657e5a5 Mon Sep 17 00:00:00 2001 From: Ronen Lubin <63970571+ronenlu@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:24:58 +0200 Subject: [PATCH] atlasaction: add dir path to the summary of migrate lint action (#120) * atlasaction: add dir path to the summart of migrate lint * code review --- atlasaction/action_test.go | 3 +++ atlasaction/comment.tmpl | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/atlasaction/action_test.go b/atlasaction/action_test.go index 661ce5c7..34612e75 100644 --- a/atlasaction/action_test.go +++ b/atlasaction/action_test.go @@ -378,6 +378,7 @@ func TestMigrateLint(t *testing.T) { c, err := os.ReadFile(tt.env["GITHUB_STEP_SUMMARY"]) require.NoError(t, err) sum := string(c) + require.Contains(t, sum, "`atlas migrate lint` on testdata/migrations_destructive\n") require.Contains(t, sum, "2 new migration files detected") require.Contains(t, sum, "1 error found") require.Contains(t, sum, ``) @@ -397,6 +398,7 @@ func TestMigrateLint(t *testing.T) { c, err := os.ReadFile(tt.env["GITHUB_STEP_SUMMARY"]) require.NoError(t, err) sum := string(c) + require.Contains(t, sum, "`atlas migrate lint` on testdata/diagnostics\n") require.Contains(t, sum, "2 new migration files detected") require.Contains(t, sum, "1 issue found") require.Contains(t, sum, ``) @@ -416,6 +418,7 @@ func TestMigrateLint(t *testing.T) { c, err := os.ReadFile(tt.env["GITHUB_STEP_SUMMARY"]) require.NoError(t, err) sum := string(c) + require.Contains(t, sum, "`atlas migrate lint` on testdata/migrations\n") require.Contains(t, sum, "1 new migration file detected") require.Contains(t, sum, "No issues found") require.Contains(t, sum, ``) diff --git a/atlasaction/comment.tmpl b/atlasaction/comment.tmpl index 6ce8107b..784a710d 100644 --- a/atlasaction/comment.tmpl +++ b/atlasaction/comment.tmpl @@ -1,4 +1,4 @@ -`atlas migrate lint` results: +`atlas migrate lint` on {{- .Env.Dir }}