8000 feat!: move all env. vars to action inputs & follow naming conventions by polarathene · Pull Request #6 · micalevisk/last-issue-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat!: move all env. vars to action inputs & follow naming conventions #6

New issue

Have a question 8000 about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

polarathene
Copy link
Contributor
@polarathene polarathene commented Jul 4, 2022

This change is primarily for GITHUB_TOKEN which is not an ENV, but part of the secrets context.

The GH token is also available to Actions via the github context object which is the standard way to set a default (the official GH action actions/checkout does this).

This change was motivated by #5 (comment)


As this requires a major version bump, it may also be a good time to address the naming convention for outputs?

has_found, issue_number, is_closed => has-found, issue-number, is-closed is more appropriate? (again referencing the official GH actions like actions/checkout, they use kebab-case, not snake_case)

This change is primarily for `GITHUB_TOKEN` which is not an ENV, but part of the `secrets` context.

The GH token is also available to Actions via the `github` context object which is the standard way to set a default (_the official GH action `actions/checkout` does this_).
- v2 bump
- Revise inline doc comments
- Remove echo step
@polarathene polarathene mentioned this pull request Jul 4, 2022
< 8000 details-collapsible>
Copy link
Owner
@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

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

looks good! thanks

just minor changes on docs


We can levarage on this PR to changing from snak to kebab case

@micalevisk micalevisk changed the title refactor: Use inputs with github context, instead of sourcing from ENV feat!: move all env. vars to action inputs instead Jul 6, 2022
@micalevisk micalevisk linked an issue Jul 6, 2022 that may be closed by this pull request
@micalevisk micalevisk changed the title feat!: move all env. vars to action inputs instead feat!: move all env. vars to action inputs instead & use naming conventions Jul 6, 2022
polarathene and others added 2 commits July 7, 2022 10:37
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
@polarathene
Copy link
Contributor Author

just minor changes on docs

Applied your feedback, thanks for reviewing :)

We can levarage on this PR to changing from snak to kebab case

Sure, I'll take care of that shortly 👍

Copy link
Contributor Author
@polarathene polarathene left a comment

Choose a reason for hiding this comment

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

I think I caught a mistake from my earlier commits, and I need your advice for the types.d.ts file since I don't know TS and it doesn't seem like there is a test running for the PR that would verify.

Copy link
Owner
@micalevisk micalevisk left a comment

Choose a reason for hiding this comment

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

I'll merge this after testing this version locally

@micalevisk
Copy link
Owner
micalevisk commented Jul 7, 2022

due to that utils.getInput('token', { required: true }) we cannot test it locally without a valid token :/

we can circumvent that by changing that required: true to required: process.env.NODE_ENV !== 'development'

@polarathene
Copy link
Contributor Author

we cannot test it locally without a valid token :/

I'm not familiar with the REST API or testing actions locally. I guess you're just running the JS itself without the action?

If you did want to locally test the action, there is act (which can take a token from ENV, or you could provide one as input).

we can circumvent that by changing that required: true to required: process.env.NODE_ENV !== 'development'

If that's what you prefer, sure 👍

Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
@micalevisk
Copy link
Owner
micalevisk commented Jul 7, 2022

as the only issue so far is due to that token input, we don't need to use Act here.

I tested this locally with that required: process.env.NODE_ENV !== 'development' and it worked

@micalevisk micalevisk changed the title feat!: move all env. vars to action inputs instead & use naming conventions feat!: move all env. vars to action inputs & follow naming conventions Jul 8, 2022
@micalevisk micalevisk merged commit 11b4952 into micalevisk:main Jul 8, 2022
@polarathene
Copy link
Contributor Author

@micalevisk Cheers! Do you have an ETA on the v2 release? Will it be available some time next week, or is there anything else you'd like for v2?

@micalevisk
Copy link
Owner

@polarathene I'll test it again & release it today

Sign up for free to 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.

Error: Not Found
2 participants
0