Skip to content

Commit

Permalink
Merge pull request #47 from lee-dohm/coerce-number
Browse files Browse the repository at this point in the history
Coerce the number value into a string
  • Loading branch information
JasonEtco committed Mar 5, 2020
2 parents 3a07eca + 0d6d7ab commit 7a1eb67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -46,7 +46,7 @@ Toolkit.run(async tools => {
milestone: tools.inputs.milestone || attributes.milestone
})

core.setOutput('number', issue.data.number)
core.setOutput('number', String(issue.data.number))
core.setOutput('url', issue.data.html_url)
tools.log.success(`Created issue ${issue.data.title}#${issue.data.number}: ${issue.data.html_url}`)
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.js
Expand Up @@ -54,7 +54,7 @@ describe('create-an-issue', () => {
// Verify that the outputs were set
expect(core.setOutput).toHaveBeenCalledTimes(2)
expect(core.setOutput).toHaveBeenCalledWith('url', 'www')
expect(core.setOutput).toHaveBeenCalledWith('number', 1)
expect(core.setOutput).toHaveBeenCalledWith('number', '1')
})

it('creates a new issue from a different template', async () => {
Expand Down

0 comments on commit 7a1eb67

Please sign in to comment.