Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to persist a score artifact #45

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading