Skip to content

Commit

Permalink
atlasaction/lint: change icon position and title size in the lint com…
Browse files Browse the repository at this point in the history
…ment (#89)
  • Loading branch information
dorav authored Oct 5, 2023
1 parent 7982169 commit 3e93a6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions atlasaction/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ func publishResult(url string, err error, act *githubactions.Action) error {
}
icon := fmt.Sprintf(`<img src="https://release.ariga.io/images/assets/%v.svg"/>`, status)
dirName := act.GetInput("dir-name")
summary := fmt.Sprintf(`# Atlas Lint Report
<div>Analyzed <strong>%v</strong> %v </div><br>
<strong>Lint report <a href=%q>available here</a></strong>`, dirName, icon, url)
summary := fmt.Sprintf(`## Atlas Lint Report %v
<div>Analyzed <strong>%v</strong></div><br>
<strong>Lint report <a href=%q>available here</a></strong>`, icon, dirName, url)
act.AddStepSummary(summary)
g := githubAPI{
baseURL: ghContext.APIURL,
Expand All @@ -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
}
Expand Down
8 changes: 4 additions & 4 deletions atlasaction/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ func TestMigrateLint(t *testing.T) {
require.NoError(t, err)
lines := strings.Split(string(c), "\n")
expectedLines := []string{
`# Atlas Lint Report`,
`<div>Analyzed <strong>test-dir-slug</strong> <img src="https://release.ariga.io/images/assets/error.svg"/> </div><br>`,
`## Atlas Lint Report <img src="https://release.ariga.io/images/assets/error.svg"/>`,
`<div>Analyzed <strong>test-dir-slug</strong></div><br>`,
`<strong>Lint report <a href="https://migration-lint-report-url">available here</a></strong>`,
"",
}
Expand All @@ -371,8 +371,8 @@ func TestMigrateLint(t *testing.T) {
require.NoError(t, err)
lines := strings.Split(string(c), "\n")
expectedLines := []string{
`# Atlas Lint Report`,
`<div>Analyzed <strong>test-dir-slug</strong> <img src="https://release.ariga.io/images/assets/success.svg"/> </div><br>`,
`## Atlas Lint Report <img src="https://release.ariga.io/images/assets/success.svg"/>`,
`<div>Analyzed <strong>test-dir-slug</strong></div><br>`,
`<strong>Lint report <a href="https://migration-lint-report-url">available here</a></strong>`,
"",
}
Expand Down

0 comments on commit 3e93a6f

Please sign in to comment.