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

Add typing: pair #160

Open
krzema12 opened this issue Dec 13, 2023 · 0 comments
Open

Add typing: pair #160

krzema12 opened this issue Dec 13, 2023 · 0 comments

Comments

@krzema12
Copy link
Member

Some actions accept a list of key-value pairs.

Examples:

https://github.com/aws-actions/amazon-ecs-render-task-definition/blob/ac1938bb1280b4d5564fdefc715af5d15f7f1c57/action.yml#L16-L18

https://github.com/aws-actions/amazon-ecs-render-task-definition/blob/ac1938bb1280b4d5564fdefc715af5d15f7f1c57/action.yml#L22-L24

https://github.com/aws-actions/amazon-ecs-render-task-definition/blob/ac1938bb1280b4d5564fdefc715af5d15f7f1c57/action.yml#L25-L27

https://github.com/madhead/intellij-http-client-action/blob/cfc73485b84b8dc42cdc6b8fe5977e4232c98d52/action.yml#L30-L32

https://github.com/docker/metadata-action/blob/31cebacef4805868f9ce9a0cb03ee36c32df2ac4/action.yml#L17-L19

We could add support for these, to avoid describing them as list of strings.

E.g. in Kotlin, it would be mapped to List<Pair>, and would be possible to write listOf("foo" to "bar", "baz" to "goo").

Consider (also?) introducing a dictionary typing, maybe it would cover this case in a more correct way.

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

No branches or pull requests

1 participant