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

[FEATURE] wrap output of action-io-generator if line exceeds a threshold #61

Open
dkwon17 opened this issue Jan 25, 2023 · 0 comments
Open

Comments

@dkwon17
Copy link

dkwon17 commented Jan 25, 2023

Is your feature request related to a problem? Please describe.

If I have this action.yml with a long input description:

inputs:
  foo:
    required: true
    description: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
    default: foo-default

and use the action-io-generator to generate inputs-outputs.ts using npx action-io-generator --actionYml ./action.yml --outFile ./src/generated/inputs-outputs.ts, the result becomes:

export enum Inputs {
    /**
     * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
     * Required: true
     * Default: "foo-default"
     */
    FOO = "foo",
}

Describe the solution you'd like

It would be nice if there was an option (ex, --line-wrap [# of characters])to wrap the long description into multiple lines:

export enum Inputs {
    /**
     * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
     * et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
     * aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
     * dolore eu fugiat nulla pariatur.
     * Required: true
     * Default: "foo-default"
     */
    FOO = "foo",
}

This would be great for readability, and it would also work well with alongside eslint's max-len if that's configured.
image

Describe alternatives you've considered

Additional context

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

No branches or pull requests

1 participant