Commit Graph

326 Commits

Author SHA1 Message Date
Michael Muré
5511c230b6
move {bug,identity} to /entities, move input to /commands 2022-08-18 23:44:06 +02:00
Steve Moyer
870fe69362
fix(836): revert to older test harness 2022-08-18 06:29:51 -04:00
Steve Moyer
a5802792ec
feat(836): updates default ls formatter for TSV output
Resolves #836
2022-08-18 06:18:55 -04:00
Steve Moyer
d3f2fb0d18
docs(847): add compact to docs and bash for ls command's format flag 2022-08-16 08:01:17 -04:00
Steve Moyer
6fc6a0f0ab
test(809): remove reliance on repo's filesystem 2022-06-22 10:38:09 -04:00
Steve Moyer
f3d316d16c
test(809): remove remaining calls to InitGoRepo in tests
Note that examples still need to shown how a developer would use the library.
2022-06-16 19:45:51 -04:00
Steve Moyer
1d4667c825
refactor(809): eliminate need to defer CleanupTestRepos() 2022-06-16 09:02:52 -04:00
Steve Moyer
d853a6fbc9
test(778): simplify and guarantee backend cleanup 2022-06-15 10:23:33 -04:00
Steve Moyer
0a9aaa9442
refactor(778): test only command implementations 2022-06-15 09:07:00 -04:00
Steve Moyer
941f5b3fc3
chore(808): rearrange imports to git-bug convention 2022-06-07 08:01:19 -04:00
Steve Moyer
6ec7d67ea1
test(808): document getCWD() and clean-up arguments 2022-06-07 07:45:30 -04:00
Steve Moyer
f0f52472dc
test(808): skip root help test that uses a golden file 2022-06-07 07:34:04 -04:00
Steve Moyer
848f72537d
fix(808): remove duplication stderr/stdout set-up 2022-06-06 10:13:42 -04:00
Steve Moyer
54306a8f0a
test(808): make build tag compatible with Go 1.16 2022-06-06 09:49:13 -04:00
Steve Moyer
99669d77b1
test(808): do not run golden file tests on Windows 2022-06-06 09:38:15 -04:00
Steve Moyer
1a504e0522
fix(808): simplify handling of Windows line terminations 2022-06-06 09:01:02 -04:00
Steve Moyer
5982e8fb3c
chore(808): merge in LocalStorage namespace configuration 2022-06-06 08:39:40 -04:00
Steve Moyer
8fc93d8824
Merge branch 'master' into fix/778-git-bug-rm-broken 2022-06-06 08:31:42 -04:00
Steve Moyer
cd1099aac8
fix(808): replace Windows line terminators 2022-06-06 08:25:36 -04:00
Steve Moyer
90208b5f6d
test(778): execute rm bug in testEnv (hangs) 2022-05-28 10:38:04 -04:00
Steve Moyer
ecfffe3902
test(778): execute add user in testEnv and return userID 2022-05-28 10:30:44 -04:00
Steve Moyer
508d0eb82a
test(778): clear output after user creation 2022-05-28 10:29:30 -04:00
Steve Moyer
50324b8a7c
test(778): verify user create results in an identity and cache 2022-05-27 13:39:16 -04:00
Steve Moyer
5962ed8453
test(778): verify root command returns main help text 2022-05-27 13:37:16 -04:00
Steve Moyer
523a148185
test(778): allow alternate CWD via context 2022-05-27 13:33:44 -04:00
Steve Moyer
1659fed99f
test(778): capture stderr and stdout during tests 2022-05-27 11:15:35 -04:00
Steve Moyer
e120fdb97e
refactor: use namespace instead of application of applicationName 2022-05-26 13:39:13 -04:00
Steve Moyer
b42fae382a
feat: make local storage configurable 2022-05-25 07:55:28 -04:00
Michael Muré
3d534a70e9
completion: lots of small ironing 2022-05-01 12:46:58 +02:00
Michael Muré
b9991d84b9
ls: fix incorrect query parsing with quotes escaped by the shell 2022-05-01 12:31:50 +02:00
Michael Muré
f25690db47
completion: use the correct GenBashCompletionV2 instead of the legacy function 2022-05-01 10:54:13 +02:00
Johannes Altmanninger
bc6ba02bd8
Add command-specific argument completions
Complete bug IDs, bridges, users, labels where appropriate.

This works in bash and fish. ZSH is not yet supported by Cobra.
In fish, descriptions (the part of a completion after the "\t") are shown
as completion label, and can be searched with Ctrl+S.

Reproduce with

	fish -C 'source misc/fish_completion/git-bug'
	git bug select ^I

(tested with fish version 3.3.1)

Also works with bash, but only for "git-bug" (with the dash)

	bash --rcfile <(echo source misc/bash_completion/git-bug)
	git-bug select ^I

Closes #493
2022-05-01 10:54:13 +02:00
Sascha
6d0331e112 Command ls: Add compact format 2021-08-17 17:07:36 +02:00
Michael Muré
271dc1334c
commands: proper backend close on RunE error 2021-05-09 11:33:20 +02:00
Sascha
1939949fcd
CLI: Add non-interactive option to interactive commands (#651)
* Add option to skip the AvatarURL input request

Using an empty string for the avatar cli flag e.g. `git-bug user create
-a ""` will still result in a prompt. As the avatar URL is an optional
option, it should be possible to skip asking for it entirely.
Otherwise automated user creation via a script must make use of pipe hacks.

* Add global --non-interactive cmdline option

* Replace --skipAvatar for --non-interactive option

* Cmd BugAdd: respect non-interactive option

* Cmd bridge configure: respect non-interactive opt

* Cmd CommentAdd: respect non-interactive option

* Cmd CommentEdit: respect non-interactive option

* Cmd TermUI: respect non-interactive option

* Cmd TitleEdit: respect non-interactive option

* Remove global non-interactive option

* Cmd UserCreate: Use local non-interactive option

* Cmd BugAdd: Use local non-interactive option

* Cmd BridgeConfigure: Use local non-interactive option

* Cmd CommentAdd: Use local non-interactive option

* Cmd CommentEdit: Use local non-interactive option

* Cmd TermUI: Drop non-interactive option

It should be obviouse that the termui is an interactive command.

* Cmd TitleEdit: Use local non-interactive option

* Update docs

* Bridge GitHub: respect non-interactive option

* Bridge GitLab: respect non-interactive option

* Bridge Jira: respect non-interactive and token opt

* Fix failing compilation

* Bridge launchpad: respect non-interactive option

* bridge: isNonInteractive --> interactive

Co-authored-by: Michael Muré <batolettre@gmail.com>
2021-05-09 11:14:45 +02:00
Hariharan
bc96f316ff
CLI - allow user create without prompt (#650)
* CLI - allow user create without prompt. Fixes #577

* Update commands/user_create.go email message

Co-authored-by: Michael Muré <batolettre@gmail.com>

* Update docs

Co-authored-by: Michael Muré <batolettre@gmail.com>
2021-04-25 16:46:36 +02:00
Michael Muré
51a2c85954
make sure every text input is safe and validated
fix #630
2021-04-17 17:40:11 +02:00
Michael Muré
aa0449a3ea
Merge remote-tracking branch 'origin/master' into dag-entity 2021-03-29 11:02:08 +02:00
Michael Muré
3a819525d7
commands: minor fixes for the webui open with query
- go fmt
- add a shorthand
- fix displayed webUI URL in the terminal
2021-03-07 21:44:48 +01:00
Miklos Vajna
626ec9835b webui: allow specifying the initial query
Example use-case: given a github URL in a source code comment or commit
message, one can now run:

git bug webui --query 'metadata:github-url:"https://github.com/author/myproject/issues/42"'

on the commandline to look up the details of that issue on the web ui
quickly, offline.

Fixes <https://github.com/MichaelMure/git-bug/issues/592>.
2021-03-07 14:11:04 +01:00
Sascha
ea329aed69 Add option to specify host address
'--host'-cmdline-option is added to the webui command.

Previously, the WebUI couldn't be hosted inside of a container. As the
WebUI-server only listend per default to localhost and there was no
option to change the address, the server should listend to. This means,
that the WebUI was only reachable from localhost. So only from inside of
the container but never from outside.
The '--host'-option allows to set the IP address or a hostname
which the WebUI-server should listen to. E.g. by setting 0.0.0.0 or ::
as address.

Update documentation for new option.

Update shell completion for new option.

Compilation seems to add another go-gitlab version.
2021-02-28 21:20:15 +01:00
Miklos Vajna
cb61245078 Add ability to search by arbitrary metadata
Example:

~/git/git-bug/git-bug ls --metadata github-url=https://github.com/author/myproject/issues/42

or

~/git/git-bug/git-bug ls metadata:github-url:\"https://github.com/author/myproject/issues/42\"

Fixes the cmdline part of <https://github.com/MichaelMure/git-bug/issues/567>.
2021-02-21 14:15:50 +01:00
Michael Muré
bb8a214df3
command: fix "comment edit" usage 2021-02-14 12:17:49 +01:00
vince
d96284da64
Change the comment ID to use both bug and comment ID references.
Add comment edit command
This commit adds the comment edit command, which provides a CLI tool that allows a user to edit a comment.
2021-02-14 12:17:48 +01:00
Michael Muré
ab57d74a31
deal with the previous changes 2021-02-14 12:17:47 +01:00
Michael Muré
c884d557bf
repo: move bleve there 2020-12-08 14:42:13 +01:00
Michael Muré
4ef2c11040
repo: finish RepoStorage move 2020-12-08 13:07:51 +01:00
Mike Goldin
ee3841155e
Update docs for full text search 2020-11-17 08:32:19 -05:00
Michael Muré
9bea84e232
ls: fix query quotation 2020-11-17 08:09:51 -05:00
Michael Muré
499dbc0a03
identity: remove support for legacy identity 2020-10-04 20:50:15 +02:00