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

feat: only add description subject to table #198

Merged

Conversation

fty4
Copy link
Contributor

@fty4 fty4 commented Jan 12, 2023

Instead of adding the whole description to the table (inputs and outputs) only the first line should be added.

Similar to best practice of git commit messages the description would benefit if the description will be split to subject and body.
In the first line the basic information will be placed (subject).
Followed after a blank line the body will follow.

The full description (subject and body) will then be available in the usage section only.
This will improve the readability of the table.

Example

Usage

- uses: bitflight-devops/github-action-readme-generator@main
  with:
    # first line
    #
    # second after space
    # and another one
    #
    # Default: action.yml
    multiline-with-space: ""

    # first line
    # Default: action.yml
    singleline: ""

    # first line
    # but no space after ln
    # Default: action.yml
    multiline-without-space: ""

Inputs

Input Description Default Required
multiline-with-space first line action.yml false
singleline first line action.yml false
multiline-without-space first line
but no space after ln
action.yml false

Diff

Inputs

<!-- start inputs -->

| **Input**                                | **Description**                                              | **Default**             | **Required** |
| ---------------------------------------- | ------------------------------------------------------------ | ----------------------- | ------------ |
- | **<code>multiline-with-space</code>**   | first line<br /><br />second after space<br />and another one | <code>action.yml</code> | **false**    |
+ | **<code>multiline-with-space</code>**  | first line                                                    | <code>action.yml</code> | **false**    |
| **<code>singleline</code>**              | first line                                                    | <code>action.yml</code> | **false**    |
| **<code>multiline-without-space</code>** | first line<br />but no space after ln                         | <code>action.yml</code> | **false**    |

<!-- end inputs -->

Use same behavior as in update-inputs
Instead of adding the whole description to the table of inputs and outputs only the first line should be added.

Similar to best practice of git commit messages the description would benefit if the description will be split to subject and body.
In the first line the basic information will be placed (subject).
Followed after a blank line the body will follow.

For the action the body will then be available in the usage section only.
This will improve the readability of the table.
Copy link
Contributor

@Jamie-BitFlight Jamie-BitFlight left a comment

Choose a reason for hiding this comment

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

lgtm

@Jamie-BitFlight Jamie-BitFlight merged commit d235bc6 into bitflight-devops:main Sep 26, 2023
@fty4 fty4 deleted the feat/table-only-subject branch September 27, 2023 06:10
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.

2 participants