JulienKode / pull-request-name-linter-action

⚡️ Lint pull request name with commit lint. This is useful if you squash merge your pull requests ⚡️

Home Page:https://github.com/marketplace/actions/pull-request-linter-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to customize the error message ?

mohanraj-r opened this issue · comments

I would like to customize the error message to provide links/references to doc as right now even I forget at times and get lost as to what needs to be done. Is there a way to customize the error message currently ?

Hi @mohanraj-r ,

Thanks for contributing ! 😊

For the moment there is no way to customize the error message because we simply show the error of commitlint

const errorMessage = result.errors

  • What kind of api did you like to customize the message ?
  • Why the commitlint messages does not fits your need ? May be you want to display the commitlink error message + a link to solve the commitlint issue ? 🤔

Thanks @JulienKode
Yes an optional text (that users can supply with links to docs etc) to establish context so that what needs to be done to fix the error can be better understood. So if the text is given it should prefix the result.errors

It's sounds a pretty good idea @mohanraj-r 😊

We can close it as we do not have for now a precise idea of what we need on this feature

If anyone think it needs to be implemented feel free to re-open it 😊

Thanks @JulienKode Yes an optional text (that users can supply with links to docs etc) to establish context so that what needs to be done to fix the error can be better understood. So if the text is given it should prefix the result.errors

Agree very much! too bad there isn't a way to customize the error message.
for example the error message in https://github.com/wagoid/commitlint-github-action
is really descriptive.
eg:
Screenshot 2023-03-19 at 14 43 05