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

added graceful degradation on param errors #22

Merged
merged 9 commits into from
Apr 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
16 changes: 16 additions & 0 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,20 @@ describe('index', () => {

expect(run).not.toHaveBeenCalled()
})

it('should return an array', async () => {
const { getTrustedGithubAccounts } = require('../src/input')

const accounts = getTrustedGithubAccounts()

expect(accounts).toBeInstanceOf(Array)
})

it('should return a boolean', async () => {
const { getAllowHTTP } = require('../src/input')

const flag = getAllowHTTP()

expect(typeof flag).toBe('boolean')
})
})
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ branding:
icon: 'zap'
# Define your inputs here.
inputs:
graceful:
description: 'Failure behaviour on unsupported platforms - true or false'
required: false
default: true
mode:
description: 'Mode of operation - audit or block'
description: 'Mode of operation - audit or active'
required: false
default: 'audit'
allow_http:
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.
Loading
Loading