Commit graph

18 commits

Author SHA1 Message Date
vilmibm
2d90c09f48 review feedback 2020-03-16 15:32:35 -05:00
vilmibm
a23549001e cleanup 2020-03-13 15:14:32 -05:00
vilmibm
c4c967fa0f add AskStubber 2020-03-13 15:12:17 -05:00
vilmibm
8769299731 titlebody prepopulation 2020-03-13 15:12:03 -05:00
Dasio
9289ab99f2 Use var syntax when empty struct is initialized 2020-02-24 22:33:22 +01:00
Dasio
8aa46c236e Init slice with provided capacity if it's known in advance 2020-02-24 22:16:41 +01:00
UmairShahzad
12216fee8c reset to template if body is empty 2020-02-19 02:16:12 +05:00
Mislav Marohnić
a710893fc1 Rename to cli/cli 2020-01-24 16:08:52 +01:00
Mislav Marohnić
9122bc181c Migrate away from errors.Wrap()
Turns out the "standard" way of wrapping errors in Go is via
`fmt.Errorf("%w")`, which doesn't require an external package and also allows a
finer control of error sentence formatting.
2020-01-23 13:19:28 +01:00
vilmibm
115cc30a8e rely on iota syntax magic 2020-01-16 14:28:49 -06:00
vilmibm
ffb6b8e29f move survey extension to its own package and clarify 2020-01-16 14:28:40 -06:00
vilmibm
beeb35e7e2 clean up body prompt text 2020-01-16 14:03:58 -06:00
vilmibm
d8cbb6a6a7 support previewing PRs in the browser 2020-01-14 17:03:53 -06:00
vilmibm
e821d2781a towards extending survey.Editor behavior 2020-01-14 15:20:11 -06: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
Mislav Marohnić
48aeff1ca7 Assert stdout separarely from stderr in command tests
This stubs stderr separately from stdout in command tests (before those
streams were combined) and improves test assertions around output.

Additionally, no longer use the `cmd.Print*()` family of Cobra functions
because their name sounds like the text will go to stdout, but they
write to stderr instead. Use the more explicit `cmd.ErrOrStderr()` as
output destination instead.
2019-12-16 15:46:42 +01:00
vilmibm
619c42fc87 use iota 2019-11-25 11:33:59 -06:00
vilmibm
633c8c070b factor out title body prompting 2019-11-20 11:39:42 -06:00