Commit graph

9 commits

Author SHA1 Message Date
notomo
8f77b4a23f Add issue create --editor 2024-07-09 21:01:50 +09:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Cristian Dominguez
2f94adabb2
Use T.TempDir for temporary dirs in tests (#3580) 2021-05-07 12:21:26 +02:00
vilmibm
f5277e452e get everything working 2020-11-12 12:03:32 -08:00
Mislav Marohnić
07bee6a63c Improve support for legacy issue/PR template names
Now supports names such as `PULL-REQUEST-TEMPLATE` (dashes instead of
underscores) and `issue_template.txt` (any file extension, including no
extension), is valid.
2020-07-15 18:16:16 +02:00
AliabbasMerchant
864d74d0b1 Categorize Templates as Legacy and NonLegacy 2020-05-23 00:03:38 +05:30
Mislav Marohnić
8b9e7df705 Fix parsing some issue template names
YAML parsing sometimes gets sabotaged by asterisks that follow the end
of frontmatter (`---`). We now scope YAML parsing to only frontmatter
and we don't pass any contents that follow.
2020-05-07 15:50:01 +02:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures (#738) 2020-04-03 16:33:34 +02:00
Mislav Marohnić
d5ba3de751 Add template support to issue create, pr create
If multiple templates are found, the user is prompted to select one.

The templates are searched for, in order of preference:

- issues:
  1. `.github/ISSUE_TEMPLATE/*.md`
  2. `.github/ISSUE_TEMPLATE.md`
  3. `ISSUE_TEMPLATE/*.md`
  4. `ISSUE_TEMPLATE.md`
  5. `docs/ISSUE_TEMPLATE/*.md`
  6. `docs/ISSUE_TEMPLATE.md`

- pull requests:
  1. `.github/PULL_REQUEST_TEMPLATE/*.md`
  2. `.github/PULL_REQUEST_TEMPLATE.md`
  3. `PULL_REQUEST_TEMPLATE/*.md`
  4. `PULL_REQUEST_TEMPLATE.md`
  5. `docs/PULL_REQUEST_TEMPLATE/*.md`
  6. `docs/PULL_REQUEST_TEMPLATE.md`

The filename matches are case-insensitive.
2019-12-18 22:15:20 +01:00