Commit graph

10 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
dca59d52b6 Fix linting issues: canonicalheader, embeddedstructfieldcheck, iotamixing, makezero, testableexamples, wastedassign, usetesting, tparallel, unconvert, intrange, iface
- canonicalheader: fix cacheTTL header value to canonical form
- embeddedstructfieldcheck: move embedded fields before regular fields in 4 structs
- iotamixing: split const blocks mixing iota with non-iota constants
- makezero: use make([]T, 0, n) instead of make([]T, n) before appending
- testableexamples: add missing Output: comment to ExampleOption_UnwrapOrZero
- wastedassign: remove wasted initial assignments in 4 locations
- usetesting: replace os.MkdirTemp/os.Setenv with t.TempDir/t.Setenv in tests
- tparallel: add t.Parallel() to 8 top-level test functions
- unconvert: remove 16 unnecessary type conversions
- intrange: convert 3 for loops to use integer range syntax
- iface: consolidate identical EditPrompter and Prompt interfaces via type alias

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 11:05:52 +00:00
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