For all you new comers to web dev, or those who are looking for a quick refresher, read on to learn how GitHub templates can assist in your product documentation.
Join the DZone community and get the full member experience.Join For Free
Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.
In today’s web development world, Git is a powerful SCM (Source Control Management). GitHub is a web-based Git SCM Provider. These guys play an important role in all open-sourced projects, where you can see 95% of such projects.
GitHub's importance in open-source projects is made evident by the soaring number of contributors. It's important to note that internet giants like Facebook, Google and Microsoft have created their own organizational pages and published their projects. Let's get to the point. In this post, we are going to discuss GitHub Templates.
Why Do We Need Templates?
- GitHub introduces templates for their web forms (issues, pull requests, etc.), which can configure inputs to be pre-filled with data which will help maintainers to set up a questionnaire and help contributors to do their part fast.
- It’s hard and tough to solve a problem when important details about a contributor's project are missing in the pull request or in the issues folder. Both are web forms in GitHub where you can submit without an accompanying description, like below, which causes these contributions to become meaningless.
Bad Request — Pull Request with Empty Description
Let’s talk about the above Pull Request where the title and commit message says Header Changes. It’s hard to fathom this code change by Reviewers. It may be a great contribution, but this kind of code will give only a rough idea of which issues are most important. It may introduce new defects because they are not very clear about the current and new behavior.
How About With Descriptions? Let's Have a look!
Pull Request with Description
Above is a good and descriptive pull request which can be easily understood. Our goal should be to value the contributions and issue requests which will be reviewed and merge faster than usual.
So Github Templates Solve This Problem?
Yes. GitHub Templates help to configure your templates which will help to configure questionnaires. Now maintainers can add templates, but make sure your template file names are composed following proper naming conventions. Below is an example for an
It's always good to categorize your request as a pull request or an issue. Please read the
Things you should know section for few more templates in various use cases provided by GitHub.
Things You Should Know
PULL_REQUEST_TEMPLATE.mdfor Pull Request Template.
Issue_TEMPLATE.mdfor Issue Template.
CONTRIBUTING.mdfor Contribution Guidelines.
CODE_OF_CONDUCT.mdfor Setting Coding Standard Guidelines.
- You can keep it in the root directory or move all of them under the directory called
- A file extension is optional, but Markdown files (.md) are supported.
You Are Done. Checkout How it Looks!
Cool, isn’t it?!
Happy coding, stay tuned for the next one!
Published at DZone with permission of Venkatraman Ramamoorthy . See the original article here.
Opinions expressed by DZone contributors are their own.