Skip to content

Commit

Permalink
Add ability to persist a score artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
lerebear committed Mar 3, 2024
1 parent eeb5acf commit 2ddba72
Show file tree
Hide file tree
Showing 11 changed files with 105,201 additions and 12,451 deletions.
1 change: 1 addition & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extends:
rules:
{
'camelcase': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
Expand Down
13 changes: 13 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,19 @@ describe('action', () => {
)
})

it('skips creating a score artifact by default', async () => {
// Mock the @actions/github context.
Object.defineProperty(github, 'context', {
value: pullRequestEventContext()
})

await main.run()

expect(runMock).toHaveReturned()
expect(setFailedMock).not.toHaveBeenCalled()
expect(infoMock).toHaveBeenCalledWith('Skipping score artifact creation')
})

it('runs the workflow sucessfully when optIns configuration is present and the pull request author is in it', async () => {
// Mock the @actions/github context.
Object.defineProperty(github, 'context', {
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions dist/config/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113,631 changes: 101,369 additions & 12,262 deletions dist/index.js

Large diffs are not rendered by default.

2,924 changes: 2,757 additions & 167 deletions dist/licenses.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 2ddba72

Please sign in to comment.