amannn / action-semantic-pull-request

A GitHub Action that ensures that your PR title matches the Conventional Commits spec
MIT License
941 stars 120 forks source link

Make scopes and types YAML lists #203

Open jszwedko opened 1 year ago

jszwedko commented 1 year ago

Hey all,

We'd like to have comments around our lists of types and scopes but because they are YAML scalars, this isn't possible. For example, we'd like to write:

        with:
          types: |
            chore               # An internal change this is not observable by users.
            enhancement         # Any user observable enhancement to an existing feature.

But the comments are included in the scalar.

Ideally we could provide the types and scopes as actual lists like:

        with:
          types: |
          - chore               # An internal change this is not observable by users.
          - enhancement         # Any user observable enhancement to an existing feature.

Is there a reason the types and scopes are newline delimited strings rather than being YAML lists? Would you be open to a (breaking) PR changing that?

amannn commented 1 year ago

Hi and thanks for your request! As far as I know GitHub actions don't support arrays as input parameters, that's why we went with the multiline strings. Can you confirm?

I see that comments are useful though, so I'd be open to remove them during parsing if you'd like to contribute this feature.