Skip to content

Commit

Permalink
Fix broken tag_name and target_commitish inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
simonihmig committed Apr 21, 2021
1 parent ea6ce3b commit 510b85a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ describe('main', function () {
};

const { out, status } = await run(script, {
env: { ...env, INPUT_ID: '1', INPUT_NAME: 'NEW NAME', INPUT_BODY: 'NEW BODY' },
env: { ...env, INPUT_ID: '1', INPUT_NAME: 'NEW NAME', INPUT_BODY: 'NEW BODY', INPUT_TARGET_COMMITISH: 'master' },
mocks,
});
const output = parseOutput(out);
// console.log(out);

expect(status).toEqual(0);
expect(output).toEqual(
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export function getInputs(): Inputs {
id: getNormalizedInput('id', { required: true }),
name: getNormalizedInput('name'),
body: getNormalizedInput('body'),
prerelease: getNormalizedInput('prerelease', { type: 'boolean'}),
draft: getNormalizedInput('draft', { type: 'boolean'}),
tag_name: getNormalizedInput('tag_name'),
target_commitish: getNormalizedInput('target_commitish'),
prerelease: getNormalizedInput('prerelease', { type: 'boolean' }),
draft: getNormalizedInput('draft', { type: 'boolean' }),
};

return result;
Expand Down

0 comments on commit 510b85a

Please sign in to comment.