Set Issue assignees by inputs (#10)

* Set Issue assignees by inputs

* remove unused file

* Revert "remove unused file"

This reverts commit f308fad240706376cf21c6df7490b84c66ef1905.

* npm run all

* add heading to README

* create issue templates
This commit is contained in:
Naoki Oketani
2019-12-09 09:41:29 +09:00
committed by GitHub
parent 02e2cee4ed
commit 9931b4d0d0
6 changed files with 14308 additions and 204 deletions

18
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,18 @@
---
name: Bug Report
about: Report a bug encountered while using npm-audit-action
labels: bug
---
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!
-->
**What happened**:
**What you expected to happen**:
**How you configured .github/workflows/**:
**Anything else we need to know?**:

11
.github/ISSUE_TEMPLATE/enhancement.md vendored Normal file
View File

@@ -0,0 +1,11 @@
---
name: Enhancement Request
about: Suggest an enhancement to npm-audit-action
labels: enhancement
---
<!-- Please only use this template for submitting enhancement requests -->
**What would you like to be added**:
**Why is this needed**:

View File

@@ -8,5 +8,14 @@ GitHub Action to run `npm audit`
|Parameter|Required|Default Value|Description|
|:--:|:--:|:--:|:--|
|issue_assignees|false|N/A|Issue assignees (separeted by commma)|
|issue_title|false|npm audit found vulnerabilities|Issue title|
|token|true|N/A|GitHub Access Token.<br>${{ secrets.GITHUB_TOKEN }} is recommended.|
### Outputs
N/A
## Example Workflow
TBD

View File

@@ -5,6 +5,9 @@ inputs:
token:
description: 'GitHub access token used to create an issue'
required: true
issue_assignees:
description: 'Issue assignees (separeted by commma)'
required: false
issue_title:
description: 'Issue title'
default: 'npm audit found vulnerabilities'

14465
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -29,7 +29,11 @@ async function run(): Promise<void> {
const issueBody = `\`\`\`\n${stripAnsi(result.stdout)}\n\`\`\``
const issueOptions = {
title: core.getInput('issue_title'),
body: issueBody
body: issueBody,
assignees: core
.getInput('issue_assignees')
.replace(/\s+/g, '')
.split(',')
}
const {
data: issue