In today's post, I'll be sharing a power tip for all non-coders using Github.
When people mention the community or collaboration layers of Github interactions, the first thing you probably think of is code contributions.
However, there is an especially novel way to encourage other Github users to participate in your repo, even if it isn't a coding project.
What if I told you that Github has a secret feature that enables you to make fully customized web forms (complete with file upload fields) that you can direct users to fill out and submit?
I'm talking about Issue Templates, of course.
The requirements to make one are very strict, so there are a few things you absolutely MUST get right when making one.
You MUST have a folder at the root of your repo that is named .github
Inside of that folder, you MUST have a folder named ISSUE_TEMPLATE
To create a custom form inside of that folder, it must be written in YML (yaml) using Github's required conventions
Unless you are experienced with writing forms in YAML (which I'll assume you aren't like me) then you'll want to use a generator that is specifically made for Github, or it will likely throw an error.
There are tons of tools available, just search for "github issue template generator."
After you've created your YAML form using the tool I linked to, you can click the button on the right sidebar to download the file. Save it in the ISSUE_TEMPLATE folder inside of .github at your root.
If you've generated a valid form and saved it in the correct location (with folders named 100% exactly as shown here) then refresh the page a couple times so Github Pages has a chance to deploy and once it has, refresh your repo, then head to the Issues tab.
Click on New Issue, and it should take you to a screen with a Template chooser that includes the form you just created.
This example is from my GooDocs repo, which is a curated collection of Google Docs templates that use table-based layouts to simulate more advanced designs.
To encourage other users to engage with the repo, I setup a submission form that users can fill out if they want to submit a template they have created for possible inclusion in the list.
These are great for non-coders who may be running community-driven repos where you want to allow for user-submitted files of any kind. Notice from the screenshot that the form automatically has the label "submission" applied to it. That was specified during the form creation using the generator.
Figuring out the correct deeplink to use to direct users to your specific form can be challenging, but there are tools to help you here as well. Github Power Links is especially handy for generating the correct link patterns if you fill in details like username, repo name, file name, etc.
The deeplink to my form for submitting a template is here:
What other ideas do you have for using Issue Templates in your repos and projects?