Skip to content
New issue

Have a question 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

Proposal: Use dashes (instead of underscores) in input names #57

Closed
smockle opened this issue Oct 5, 2023 · 3 comments · Fixed by #59
Closed

Proposal: Use dashes (instead of underscores) in input names #57

smockle opened this issue Oct 5, 2023 · 3 comments · Fixed by #59
Labels

Comments

@smockle
Copy link
Contributor

smockle commented Oct 5, 2023

From @gr2m in #54 (comment):

I think we should use dashes for our arguments, it seems to be the convention for actions/* actions, e.g. see https://github.com/actions/checkout/

Notably, changing the input names affects the translated environment variable names1:

  • An input named my_var is translated to INPUTS_MY_VAR.
  • An input named my-var is translated to INPUTS_MY-VAR.

So, we may want a plan for backwards-compatibility, or we may want to ship this in a major version bump.

Footnotes

  1. cf. “Metadata syntax for GitHub Actions > Example: Specifying inputs”

@gr2m
Copy link
Contributor

gr2m commented Oct 6, 2023

The way I would go about it is to release a feature version that

  1. supports both input types
  2. Logs a deprecation warning for the old notation
  3. Add a test for deprecations

Then once we release a new breaking version we can always look into the deprecations test file and remove them. It's a pattern that worked well for me in the past in several projects

@smockle
Copy link
Contributor Author

smockle commented Oct 6, 2023

Opened #59 to support this.

@gr2m gr2m closed this as completed in #59 Oct 6, 2023
gr2m pushed a commit that referenced this issue Oct 6, 2023
)

Fixes #57 

This PR implements the 3-step plan proposed by @gr2m in
#57 (comment):

> 1. Support both input types
> 2. Log a deprecation warning for the old notation
> 3. Add a test for deprecations

Although this PR supports both input formats simultaneously, I opted
_not_ to document the old format in the updated README. That’s a
decision I’m happy to revisit, if y’all would prefer to have
documentation for both the old and new formats.
create-app-token-action-releaser bot pushed a commit that referenced this issue Oct 6, 2023
# [1.5.0](v1.4.0...v1.5.0) (2023-10-06)

### Features

* use dash notation for inputs (deprecates underscore notation) ([#59](#59)) ([7b1d2ae](7b1d2ae)), closes [#57](#57) [/github.com//issues/57#issuecomment-1751272252](https://github.com//github.com/actions/create-github-app-token/issues/57/issues/issuecomment-1751272252)
@create-app-token-action-releaser

🎉 This issue has been resolved in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants