Mislav Marohnić
ea3a55c3d6
Ensure that cobra command tests don't write to system stdout/stderr
2020-05-20 16:28:35 +02:00
Mislav Marohnić
292b428465
Add test for showing response headers
2020-05-20 16:28:27 +02:00
Mislav Marohnić
bef62faaea
Make NewCmdApi testable
2020-05-20 15:21:35 +02:00
Mislav Marohnić
f58e0bf710
Add api tests
2020-05-20 15:21:32 +02:00
Mislav Marohnić
d8146cd16e
Extract cmdutil package
2020-05-20 15:21:31 +02:00
Mislav Marohnić
4c762d5bd7
Add iostreams package
2020-05-20 15:21:31 +02:00
Mislav Marohnić
a7100b1fdd
Extract parseFields to a func
2020-05-20 15:21:31 +02:00
Mislav Marohnić
7ffbde3e12
Allow setting multiple values for a request header
2020-05-20 15:21:31 +02:00
Mislav Marohnić
90fa193eaf
Promote api command to a pkg/cmd/api package
2020-05-20 15:21:31 +02:00
Mislav Marohnić
57e60ab8a1
Merge remote-tracking branch 'origin/master' into issue-metadata-resolve-ids
2020-05-13 17:20:37 +02:00
Mislav Marohnić
6d57f2a91e
Faster resolve GraphQL node IDs for assignees, reviewers, and labels
2020-05-12 15:33:51 +02:00
vilmibm
7009321314
review feedback
2020-05-11 17:06:18 -05:00
Mislav Marohnić
3000847bb2
Merge pull request #874 from cli/httpmock
...
Parallelism-safe mechanism for stubbing HTTP responses
2020-05-08 17:34:57 +02:00
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ć
0a4d4ee007
Replace FakeHTTP with httpmock which is now compatible
2020-05-07 15:19:14 +02:00
Mislav Marohnić
1d4065e4c4
Add a HTTP mocking interface that matches incoming requests
...
This adds a thread-safe RoundTripper that can be used for mocking HTTP
requests in tests. Incoming requests are matched based on their
contents, not the order the stubs were registered in.
2020-05-06 22:03:32 +02:00
vilmibm
9641eee38a
use more clear name
2020-04-22 14:31:09 -05:00
vilmibm
3c8b87c9c6
respect configured editor
2020-04-22 11:23:14 -05:00
Mislav Marohnić
734497a8d8
Code fixes informed by golangci-lint failures ( #738 )
2020-04-03 16:33:34 +02:00
Mislav Marohnić
bc3f964621
Merge pull request #697 from tariq1890/simple_sort
...
simplify sort string slice method call
2020-03-25 07:34:29 +01:00
Tariq Ibrahim
653229c7b5
simplify sort string slice method call
2020-03-24 22:47:51 -07:00
Mislav Marohnić
4c3e498021
Fix column alignment and truncation for Eastern Asian languages
...
- Ensure that text is never truncated mid-character, which would result
in garbled text
- Ensure that columns in `issue/pr list` output align properly
2020-02-20 18:52:17 +01:00
Ahmed El Gabri
4a5135d820
Use if/else/if instead
2020-02-12 23:07:36 +01:00
Ahmed El Gabri
ff2d5fa6d0
Check $GIT_EDITOR first
2020-02-07 19:38:04 +01:00
HowJMay
c517fd79b9
fix: Fix typos
...
Fix typos in files
2020-02-02 01:49:11 +08:00
Mislav Marohnić
fe7cdd8ab7
Extract web browser launching to a package
...
This fixes opening URLs with `&` on Windows.
2020-01-29 11:49:38 +01:00
Mislav Marohnić
a710893fc1
Rename to cli/cli
2020-01-24 16:08:52 +01:00
vilmibm
7aa186fe02
make prompt match mockup more
2020-01-16 14:29:59 -06:00
vilmibm
ffb6b8e29f
move survey extension to its own package and clarify
2020-01-16 14:28:40 -06:00
Mislav Marohnić
d553f45bd1
Replace goto with break <label>
...
Labels are neat, but let's not use them for control flow just yet unless
it REALLY improves on any other alternative.
2019-12-20 15:05:37 +01: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