Skip to content

ldez/ghforms

Repository files navigation

ghforms logo

A tool to preview and validate GitHub forms (issues and discussions).

Why?

I created this tool because I was tired of having to commit and push my forms to GitHub to see if they would work.

Home example

Description

It applies a JSON schema validation and also the "post" rules from GitHub that you can only find by committing and pushing the form.

It also warns about some common mistakes (ex: dropdowns with required but without multiple).

The pages are live reloaded every time you change a form file, and the errors are immediately displayed.

The style of the form pages is close to GitHub, but not exactly the same.

Installation

go install github.com/ldez/ghforms@latest

or download the binary from the releases page.

Usage

Live Preview and Validation

ghforms [-addr :8080] [-dir .github/ISSUE_TEMPLATE]
Flag Default Description
-addr :8080 HTTP listen address
-dir .github/ISSUE_TEMPLATE Directory to scan for forms

Examples

By default, it looks for the forms inside the .github/ISSUE_TEMPLATE directory (non-recursive).

ghforms

If you want to use a different directory:

ghforms -dir .github/DISCUSSION_TEMPLATE

If you want to use a different port:

ghforms -addr ':8686'

Only Validate the Forms

ghforms verify [-dir .github]
Flag Default Description
-dir .github/ Directory to scan for forms (recursive)

Examples

By default, it looks for the forms inside the .github directory (recursive).

ghforms verify

References

About

GitHub Forms Live Preview and Validation (Issues and Discussions)

Topics

Resources

License

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Contributors