Skip to content

Commit

Permalink
Styling title to custom headings (#57)
Browse files Browse the repository at this point in the history
* Updating all dependencies

* Custom styles for Title

* Reverting back to 4.0.0

* Reverting back to 5.1.1

* Updated the tests

* Update README.md
  • Loading branch information
thsaravana authored Jul 30, 2023
1 parent 963d839 commit 7a90ece
Show file tree
Hide file tree
Showing 11 changed files with 4,923 additions and 9,879 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
min-coverage-changed-files: 60
```

4. When you need to customize the pass/fail emojis in the comment
4. When you need to customize the pass/fail emojis or the style of title in the comment

> Set the `pass-emoji` and `fail-emoji` to a valid emoji supported in Github.
> Set the `pass-emoji` and `fail-emoji` to a valid emoji supported in Github. You can add `#` to choose the style of
> title from H1 to H6. If you don't choose, the default is H3.
> Refer [sample pull request](https://github.com/thsaravana/jacoco-android-playground/pull/10) and
> its [workflow](https://github.com/thsaravana/jacoco-android-playground/blob/testing-custom-emoji-support/.github/workflows/coverage.yml)

Expand All @@ -156,7 +157,7 @@ refer [jacoco-android-playground](https://github.com/thsaravana/jacoco-android-p
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: ':lobster: Coverage Report'
title: '# :lobster: Coverage Report'
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'
```
Expand Down
20 changes: 11 additions & 9 deletions __tests__/action_aggregate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ describe('Aggregate report', function () {
core.getInput = jest.fn(getInput)
github.getOctokit = jest.fn(() => {
return {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
rest: {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
},
},
}
})
Expand Down
16 changes: 9 additions & 7 deletions __tests__/action_multiple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ describe('Multiple reports', function () {
})
github.getOctokit = jest.fn(() => {
return {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment: comment,
rest: {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment: comment,
},
},
}
})
Expand Down
40 changes: 22 additions & 18 deletions __tests__/action_single.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ describe('Single report', function () {
core.getInput = jest.fn(getInput)
github.getOctokit = jest.fn(() => {
return {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
rest: {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
},
},
}
})
Expand Down Expand Up @@ -244,15 +246,17 @@ describe('Single report', function () {
}
github.getOctokit = jest.fn(() => {
return {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
rest: {
repos: {
compareCommits: jest.fn(() => {
return compareCommitsResponse
}),
},
issues: {
createComment,
listComments,
updateComment,
},
},
}
})
Expand Down
Loading

0 comments on commit 7a90ece

Please sign in to comment.