add test for issue option (#20)

This commit is contained in:
Naoki Oketani
2019-12-09 21:31:55 +09:00
committed by GitHub
parent 4b8e261c55
commit be0cdcbe10
5 changed files with 171 additions and 3137 deletions

17
src/issue.ts Normal file
View File

@@ -0,0 +1,17 @@
import * as core from '@actions/core'
import {IssueOption} from './interface'
export function getIssueOption(body: string): IssueOption {
return {
title: core.getInput('issue_title'),
body,
assignees: core
.getInput('issue_assignees')
.replace(/\s+/g, '')
.split(','),
labels: core
.getInput('issue_labels')
.replace(/\s+/g, '')
.split(',')
}
}