From cbfd36bc62afd1e9eef1ce7d54871b81c4b3f990 Mon Sep 17 00:00:00 2001 From: Lee Dohm <1038121+lee-dohm@users.noreply.github.com> Date: Wed, 4 Mar 2020 15:58:55 -0800 Subject: [PATCH 1/2] Coerce the number value into a string --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ef0e890..16dce00 100644 --- a/index.js +++ b/index.js @@ -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) { From 0d6d7ab8cb6a91d7d1c927d3d991ed720eb763f0 Mon Sep 17 00:00:00 2001 From: Lee Dohm <1038121+lee-dohm@users.noreply.github.com> Date: Wed, 4 Mar 2020 16:04:47 -0800 Subject: [PATCH 2/2] :white_check_mark: Fix the broken test --- tests/index.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/index.test.js b/tests/index.test.js index bfecc70..a147430 100644 --- a/tests/index.test.js +++ b/tests/index.test.js @@ -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 () => {