From 18595b81c1129e8589b2c7bfeba454fae79ccbef Mon Sep 17 00:00:00 2001 From: Pulkit Kathuria Date: Mon, 22 Jan 2024 12:55:14 +0900 Subject: [PATCH] decorate --- action.yml | 8 -------- app/pkg/pr.go | 5 +++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index 7924df3..232e232 100644 --- a/action.yml +++ b/action.yml @@ -25,7 +25,6 @@ runs: ### Start ### ### PREPARE ENVIRONMENT and VARIABLES ### - - uses: credfeto/action-repo-visibility@v1.2.0 id: visibility @@ -63,7 +62,6 @@ runs: run: | git config remote.origin.prune true && git fetch echo CIU_ACTIVE_BRANCHES=`git branch -r | grep -v HEAD | sed 's/origin\///' | tr '\n' ' '` >> "$GITHUB_ENV" - ### End ### ### PREPARE ENVIRONMENT and VARIABLES ### @@ -71,9 +69,6 @@ runs: ### Start ### ### PUBLISHING ### - - - # Publish the score # Will create a new type if not exists for metric. # If type exists, then it will use the existing metric and ignore the metric passed - name: Publish this output and update branches @@ -118,14 +113,12 @@ runs: with: issue-number: ${{ steps.find-pull-request.outputs.number }} body-path: comment_body.txt - ### END ### ### PUBLISHING ### ### Start ### ### Compliance ### - # Destroy everything or just by the type # if type is empty then it will destroy everything - name: Destroy everything that was ever published @@ -143,6 +136,5 @@ runs: "commit": "${{ github.sha }}" }' \ "${{inputs.host}}/destroy" - ### End ### ### Compliance ### diff --git a/app/pkg/pr.go b/app/pkg/pr.go index 122f494..a4e591d 100644 --- a/app/pkg/pr.go +++ b/app/pkg/pr.go @@ -37,7 +37,7 @@ func (p *PR) Get(req *PRRequest, types []models.Type) (string, error) { for _, t := range types { y := make([]float64, 2) row := make([]string, 3) - row[0] = t.Name + row[0] = "*" + t.Name + "*" sb, err := p.coverageModel.GetLatestBranchScore(req.Org, req.Repo, req.BaseBranch, t.Name) if err != nil { @@ -55,6 +55,7 @@ func (p *PR) Get(req *PRRequest, types []models.Type) (string, error) { } else { y[1] = s.Score row[2] = F64NumberToK(&s.Score) + " " + t.Metric + p.UpOrDown(&sb.Score, &s.Score) + row[2] = "**" + row[2] + "**" } mdTable.Rows = append(mdTable.Rows, row) @@ -90,7 +91,7 @@ func (p *PR) Get(req *PRRequest, types []models.Type) (string, error) { mdText.PlainText("") readmeLink := fmt.Sprintf("%s://%s/readme?org=%s&repo=%s&branch=%s", req.scheme, req.host, req.Org, req.Repo, req.Branch) - mdText.PlainTextf(md.Link("Add to Readme", readmeLink)) + mdText.PlainTextf(md.Link("Add Badges and Charts to Readme", readmeLink)) return mdText.String(), nil }