Skip to content

Commit 7a1eb67

Browse files
authored
Merge pull request #47 from lee-dohm/coerce-number
Coerce the number value into a string
2 parents 3a07eca + 0d6d7ab commit 7a1eb67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Toolkit.run(async tools => {
4646
milestone: tools.inputs.milestone || attributes.milestone
4747
})
4848

49-
core.setOutput('number', issue.data.number)
49+
core.setOutput('number', String(issue.data.number))
5050
core.setOutput('url', issue.data.html_url)
5151
tools.log.success(`Created issue ${issue.data.title}#${issue.data.number}: ${issue.data.html_url}`)
5252
} catch (err) {

tests/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('create-an-issue', () => {
5454
// Verify that the outputs were set
5555
expect(core.setOutput).toHaveBeenCalledTimes(2)
5656
expect(core.setOutput).toHaveBeenCalledWith('url', 'www')
57-
expect(core.setOutput).toHaveBeenCalledWith('number', 1)
57+
expect(core.setOutput).toHaveBeenCalledWith('number', '1')
5858
})
5959

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

0 commit comments

Comments
 (0)