Skip to content

Commit

Permalink
added graceful degradation on param errors (#22)
Browse files Browse the repository at this point in the history
* added graceful degradation on param errors

* bumped version

* version bump v1.3.0

* input fix

* fixed getter functions

* error message changes

* updated error/warning messages

* request method in untrusted github acct summary

* fixed summary check
  • Loading branch information
raianand authored Apr 3, 2024
1 parent 34ff158 commit 94e2eb5
Show file tree
Hide file tree
Showing 9 changed files with 502 additions and 81 deletions.
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

0 comments on commit 94e2eb5

Please sign in to comment.