-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(formatters): add markdown formatters
- Loading branch information
1 parent
6a64790
commit 0fa768b
Showing
36 changed files
with
9,818 additions
and
5,773 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# template-spike | ||
|
||
> Spike for "Filling issues and pull requests with custom templates" | ||
## Overview | ||
|
||
According to the GitHub Help article "[Creating an issue template for your repository][adding-multiple-templates-url]:" | ||
|
||
> You can create an ISSUE_TEMPLATE/ subdirectory in any of the supported folders to contain multiple | ||
> issue templates. Use the template query parameter to specify the template that will automatically | ||
> fill the issue body. For more information, see "[About automation for issues and pull requests with query parameters][automation-for-multiple-issues-url]." | ||
> | ||
> Creating an issue template for your repository - User Documentation . (2018). Help.github.com. Retrieved 23 February 2018, from <https://help.github.com/articles/creating-an-issue-template-for-your-repository/#adding-multiple-issue-templates> | ||
## Pull request templates `.github/PULL_REQUEST_TEMPLATE/` instructions | ||
|
||
### User story | ||
|
||
As an engineer,<br> | ||
I want to select the most appropriate ADR for my proposal<br> | ||
In order to make the best case for my proposal. | ||
|
||
### Acceptance criterion | ||
|
||
- [ ] People can prepopulate a new pull request body with the ADR template of their choice by selecting a hyperlink. | ||
|
||
### Examples | ||
|
||
1. Load a template with an absolute-path URL: | ||
|
||
_Link:_ | ||
|
||
> [**Propose an architecture decision (MADR)**][adr-pr-madr-url]. | ||
_Template path:_ | ||
|
||
> `.github/PULL_REQUEST_TEMPLATE/adr_template_madr.md` | ||
_URL:_ | ||
|
||
> <https://github.com/gregswindle/template-spike/compare/adr-0001?expand=1&title=docs(techniques):%20add%20MADR%20template&template=adr_template_madr.md> | ||
_Query parameters:_ | ||
|
||
> | Parameter Name | Value | | ||
> |:---------------|:-------------------------------------------| | ||
> | `expand` | `1` | | ||
> | `title` | `docs(techniques):%20add%20MADR%20template`| | ||
> | `template` | `adr_template_madr.md` | | ||
### Issue templates `.github/ISSUE_TEMPLATE/` | ||
|
||
1. [`.github/ISSUE_TEMPLATE/feat-request-template.md`][.github/ISSUE_TEMPLATE/feat-request-template.md] | ||
1. [`.github/ISSUE_TEMPLATE/defect-report-template.md`][.github/ISSUE_TEMPLATE/defect-report-template.md] | ||
1. [`.github/ISSUE_TEMPLATE/feat-request-template.md`][.github/ISSUE_TEMPLATE/feat_request_template.md] | ||
1. [`.github/ISSUE_TEMPLATE/defect-report-template.md`][.github/ISSUE_TEMPLATE/defect_report_template.md] | ||
1. [`.github/ISSUE_TEMPLATE/issue_template.md`][.github/ISSUE_TEMPLATE/issue_template.md] | ||
1. [`.github/ISSUE_TEMPLATE/issue_template.md`][.github/ISSUE_TEMPLATE/new_issue_template.md] | ||
|
||
<!-- ⛔️ LINK REFERENCES: please alphabetize these ⛔️ --> | ||
|
||
[adding-multiple-templates-url]: https://help.github.com/articles/creating-an-issue-template-for-your-repository/#adding-multiple-issue-templates | ||
[automation-for-multiple-issues-url]: https://help.github.com/articles/about-automation-for-issues-and-pull-requests-with-query-parameters | ||
[adr-pr-madr-url]: https://github.com/gregswindle/template-spike/compare/adr-0001?expand=1&title=docs(techniques):%20add%20MADR%20template&template=adr_template_madr.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* eslint global-require: "off" */ | ||
/* eslint node/no-unpublished-require: "off" */ | ||
const path = require("path"); | ||
const markdownMagic = require("markdown-magic"); | ||
const markdownMagicDependencyTable = require("markdown-magic-dependency-table"); | ||
const markdownMagicPackageScripts = require("markdown-magic-package-scripts"); | ||
const path = require('path') | ||
const markdownMagic = require('markdown-magic') | ||
const markdownMagicDependencyTable = require('markdown-magic-dependency-table') | ||
const markdownMagicPackageScripts = require('markdown-magic-package-scripts') | ||
|
||
const config = { | ||
"DEBUG": false, | ||
"transforms": { | ||
"DEPENDENCYTABLE": markdownMagicDependencyTable, | ||
"SCRIPTS": markdownMagicPackageScripts | ||
'DEBUG': false, | ||
'transforms': { | ||
'DEPENDENCYTABLE': markdownMagicDependencyTable, | ||
'SCRIPTS': markdownMagicPackageScripts | ||
} | ||
}; | ||
} | ||
|
||
let markdownPath = path.join(__dirname, "../*.md"); | ||
markdownMagic(markdownPath, config); | ||
let markdownPath = path.join(__dirname, '../*.md') | ||
markdownMagic(markdownPath, config) | ||
|
||
markdownPath = path.join(__dirname, "../.github/CONTRIBUTING.md"); | ||
markdownMagic(markdownPath, config); | ||
markdownPath = path.join(__dirname, '../.github/CONTRIBUTING.md') | ||
markdownMagic(markdownPath, config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.