Skip to content

Use core.getBooleanInput() to resolve include-prerelease option - #250

Merged
marko-zivic-93 merged 3 commits into
actions:mainfrom
nogic1008:refactor/boolean-input
Aug 2, 2022
Merged

Use core.getBooleanInput() to resolve include-prerelease option#250
marko-zivic-93 merged 3 commits into
actions:mainfrom
nogic1008:refactor/boolean-input

Conversation

@nogic1008

@nogic1008nogic1008 commented Nov 24, 2021

Copy link
Copy Markdown
Contributor

Description:
getBooleanInput() function was added since @actions/core@1.3.0 (actions/toolkit#725).
This PR uses it to reduce code path.

⚠️This change is BREAKING CHANGE if include-prerelease set invalid value.

- uses: actions/setup-dotnet@v1with:
dotnet-version: '6.0.x'include-prerelease: 'foo'# Resolved 'false' before, but throws error now

Related issue:
None.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@vsafonkin

Copy link
Copy Markdown

Hi @nogic1008, could you please revert the lines in index.js with module.exports?

@dorsseldorssel mentioned this pull request Dec 20, 2021
2 tasks
@vsafonkin

Copy link
Copy Markdown

@nogic1008 , could you update your branch from main to fix license issue?

@nogic1008

Copy link
Copy Markdown
ContributorAuthor

@vsafonkin rebased.

Comment thread__tests__/setup-dotnet.test.ts
@jafar141

This comment was marked as spam.

@jafar141

This comment was marked as spam.

@nogic1008
nogic1008 requested a review from a teamJuly 21, 2022 23:48
@nogic1008

Copy link
Copy Markdown
ContributorAuthor

I'm sorry to have staled this PR.
I rebased to current main branch.

@nogic1008
nogic1008 requested a review from vsafonkinJuly 26, 2022 07:30
Comment threadaction.yml
include-prerelease:
description: 'Whether prerelease versions should be matched with non-exact versions (for example 5.0.0-preview.6 being matched by 5, 5.0, 5.x or 5.0.x). Defaults to false if not provided.'
required: False
default: 'false'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please remove single quotes ?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmitry-shibanov
GitHub Action schema warns this should be string. Should I still remove the quotes?
Incorrect type. Expected "string".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be okay, because we use the similar approach for setup-node https://github.com/actions/setup-node/blob/main/action.yml#L16. But I think you can keep this variant due to the parsing logic of runner.

@marko-zivic-93
marko-zivic-93 merged commit 37b00c4 into actions:mainAug 2, 2022
@nogic1008
nogic1008 deleted the refactor/boolean-input branch August 2, 2022 23:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@nogic1008@vsafonkin@jafar141@dmitry-shibanov@TURBULENTLAW@IvanZosimov@marko-zivic-93@e-korolevskii