Skip to content
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
LOCAL_GITHUB_ACCESS_TOKEN=XXXX
# INPUT_FETCH-DEPTH=0
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
type: boolean
description: 'If true, the action will not validate the user or the commit verification status'
default: false
fetch-depth:
description: The number of vulnerability alerts to fetch, <= 0 for all
required: false
default: '0'
outputs:
dependency-names:
description: 'A comma-separated list of all package names updated.'
Expand Down
117 changes: 88 additions & 29 deletions dist/index.js

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

11 changes: 11 additions & 0 deletions src/dependabot/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Context } from '@actions/github/lib/context'
import { getInput } from '@actions/core'

export function parseNwo (nwo: string): {owner: string; repo: string} {
const [owner, name] = nwo.split('/')
Expand All @@ -24,3 +25,13 @@ export function getBody (context: Context): string {
const { pull_request: pr } = context.payload
return pr?.body || ''
}

export function getNumberInput (inputName: string, defaultVal: number): number;
export function getNumberInput (inputName: string, defaultVal?: number): number | undefined {
const inputStr = getInput(inputName);
let num = Number.parseInt(inputStr);
if (Number.isNaN(num)) {
return defaultVal;
}
return num;
}
Loading
Loading