Skip to content

Commit

Permalink
atlasaction: add dir path to the summary of migrate lint action (#120)
Browse files Browse the repository at this point in the history
* atlasaction: add dir path to the summart of migrate lint

* code review
  • Loading branch information
ronenlu authored Feb 18, 2024
1 parent 35678a7 commit df063f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions atlasaction/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <strong>testdata/migrations_destructive</strong>\n")
require.Contains(t, sum, "2 new migration files detected")
require.Contains(t, sum, "1 error found")
require.Contains(t, sum, `<a href="https://migration-lint-report-url" target="_blank">`)
Expand All @@ -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 <strong>testdata/diagnostics</strong>\n")
require.Contains(t, sum, "2 new migration files detected")
require.Contains(t, sum, "1 issue found")
require.Contains(t, sum, `<a href="https://migration-lint-report-url" target="_blank">`)
Expand All @@ -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 <strong>testdata/migrations</strong>\n")
require.Contains(t, sum, "1 new migration file detected")
require.Contains(t, sum, "No issues found")
require.Contains(t, sum, `<a href="https://migration-lint-report-url" target="_blank">`)
Expand Down
2 changes: 1 addition & 1 deletion atlasaction/comment.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`atlas migrate lint` results:
`atlas migrate lint` on <strong>{{- .Env.Dir }}</strong>

<table>
<thead>
Expand Down

0 comments on commit df063f0

Please sign in to comment.