docs icon indicating copy to clipboard operation
docs copied to clipboard

Mention `Body cannot be empty` in `Common validation errors when creating issue forms`

Open jsoref opened this issue 3 years ago β€’ 4 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms

What part(s) of the article would you like to see updated?

Add a section for Body cannot be empty

Ideally it should explain something about the error.

Additional information

I created a file https://github.com/jsoref/choco/commit/f613096f4da2e1b7b01d018a9fa0ef96f93914a1

When I browse to it right now: https://github.com/jsoref/choco/blob/develop/.github/ISSUE_TEMPLATE/ReportPackageIssue.yaml

I see:

There is a problem with this template

Body cannot be empty. Learn more.

image

Fwiw, I tried to model the file after https://raw.githubusercontent.com/github/docs/main/.github/ISSUE_TEMPLATE/improve-existing-docs.yaml

jsoref avatar May 04 '22 20:05 jsoref

Fwiw, there's also

There is a problem with this template

YAML syntax error: (): mapping values are not allowed in this context at line 12 column 53. Learn more.

https://github.com/jsoref/choco/commit/6d2bc05103ef064c081293a86f02215c491ad84e

image

jsoref avatar May 04 '22 20:05 jsoref

@jsoref Did you mean to have this link for "What article on docs.github.com is affected?" question?

ramyaparimi avatar May 05 '22 12:05 ramyaparimi

Sigh. Thanks. Clipboard fail trying to do three interrelated things at once.

jsoref avatar May 05 '22 13:05 jsoref

@jsoref Thanks so much for opening an issue! I'll triage this for the team to review :eyes:

ramyaparimi avatar May 05 '22 18:05 ramyaparimi

πŸ‘‹ @jsoref Thank you for your patience on this one. πŸ’›

I’ve spoken with the team, we were able to reproduce this instance without the Body cannot be empty error populating. However, we did so without the --- around the name and description, as the body tag is found externally here.

As for adding the error, you or anyone else are welcome to open a PR adding the error with a sentence similar to β€œThe template body key:value pair must not be empty.” And for more info include a link to the β€œSyntax for issue forms” article

cmwilson21 avatar Aug 17 '22 21:08 cmwilson21

I probably should have explained that in my case, I'm pretty sure the reason for the error was the ---. I'm not sure which will be more common: not having a body or for some reason copying a --- and thus causing it not to be seen.

jsoref avatar Aug 17 '22 21:08 jsoref

Gotcha. Thanks for clarifying here. And for submitting a PR, I'll get it triaged ⚑

cmwilson21 avatar Aug 18 '22 13:08 cmwilson21