GitHub supports templates that are pre-populated into the description input field of a newly opened Issues and Pull Requests. Apache Cordova uses both options.
The job of an issue template is to make sure, the creator includes all necessary information in an issue they open. It can also supply information to the reporter like text or links that are relevant before opening an issue.
Apache Cordova uses GitHub's multiple issues template functionality, which lets users choose what type of issue they want to create:
Note: You can "test" and preview these issue templates by creating an issue in this repository.
Collect all necessary information to understand if this is an actual bug or just a user problem. The information collected should enable the Apache Cordova community to reproduce and resolve the problem.
See .github/ISSUE_TEMPLATE/BUG_REPORT.md
for our current bug report template.
What new feature is being requested and what problem does it solve?
See .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
for our current feature request template.
People having problems with using one of Apache Cordova's components tend to also create issues. Apache Cordova unfortunately does not have the community to handle that volume of issues. Because of that, this template mainly refer people to the proper, more suited support channels:
- Stack Overflow
- Slack
- Framework channels (like e.g. Ionic Forum)
Note that Apache Cordova will close support questions if they are submitted to the repository anyway.
See .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
for our current support question template.
Users can still ignore the specific issue templates by going to the /issues/new
URL directly or use the "Don’t see your issue here? Open a regular issue." link below the template selection. This template provides the fallback for this case.
See .github/ISSUE_TEMPLATE.md
for our current fallback issues template.
Similar to an Issue Template, the Pull Request template ensures that new Pull Requests include all necessary information. It is also used to nudge contributors to run tests, write documentation etc.
See .github/PULL_REQUEST_TEMPLATE.md
for our current pull request template.
Distributing these templates manually would take quite some time. For that reason @janpio wrote a small script that takes care of the process:
- Check out both this repository
cordova-contribute
andcordova-coho
in the same folder. - In
cordova-coho
runnpm install
andnpm link
. - Go one level up, create a folder (e.g.
coho Checkouts
) and go into that folder. - Run
coho repo-update -g -r all
to check out "all" Cordova repositories. - Remove the folders of repositories you don't want to distribute the templates to.
- Check out any other Apache Cordova repositories that
coho
might have missed. - Create a file
run.rb
with the following content:This gets all folders, iterates through them and copies the templates fromfolders = Dir.glob('*').select {|f| File.directory? f} @source = "../cordova-contribute/.github" require 'fileutils' folders.each do |folder| FileUtils.copy_entry @source, "#{folder}/.github" Dir.chdir(folder) `git add .github` `git commit -m "Add or update GitHub pull request and issue template"` `git push origin` Dir.chdir("..") end
../cordova-contribute/.github
to.github
in each folder, then adds the new files via git and commits and pushes the changes. - Execute the script with
ruby run.rb
and wait until it is finished. - Manually confirm that everything went well.