Commit Graph

117 Commits

Author SHA1 Message Date
TsT
edc8b7589d
misc: fix bash completion with "git bug" 2022-05-01 10:54:13 +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
Michael Muré
9ed515fd54 update gqlgen 2022-02-15 19:57:26 +01: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é
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
Michael Muré
365073d022 cmd: better powershell completion, thanks to cobra upgrade 2021-02-27 21:24:26 +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é
3f6ef50883
bug: migrate to the DAG entity structure! 2021-02-14 12:19:50 +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é
4ef2c11040
repo: finish RepoStorage move 2020-12-08 13:07:51 +01:00
6543
86faedc966
Vendor: upgrade spf13/cobra to v1.1.1 (#479)
* build(deps): bump github.com/spf13/cobra from 1.0.0 to 1.1.1

* update doc (man & md)

* update bash|fish|zsh completion
2020-10-27 14:38:55 +01:00
Michael Muré
ca720f165c
cache,bug,identity: structural change
- bug doesn't commit identities anymore, only make sure they are commit
- cache use an IdentityResolver to load bugs with identities from the cache (deps injection)
- IdentityCache now are identity.Interface
2020-10-04 20:39:10 +02:00
Michael Muré
02146f0b40 use go-git by default! 2020-09-29 20:43:53 +02:00
Michael Muré
9f3a56b1f3
misc: move the random bug command on its own package 2020-09-27 21:39:05 +02:00
Michael Muré
7f87eb8602
doc: generate concurrently 2020-09-27 21:30:50 +02:00
Michael Muré
ae5c0967ce commands: cleanup the command's usage to avoid warnings when generating the doc 2020-07-28 20:24:24 +02:00
Michael Muré
26bd1dd110
commands: refactor to avoid globals 2020-06-28 18:26:29 +02:00
Luke Granger-Brown
4a28f25347
Add support for read-only mode for web UI.
Fixes #402.
2020-06-27 22:56:10 +02:00
Michael Muré
939bcd57b9
repo: more tests 2020-06-27 22:00:15 +02:00
Michael Muré
88ad7e606f
repository: remove tie to Bug, improved and reusable testing
- allow the creation of arbitrary Lamport clocks, freeing the way to new entities and removing Bug specific (upper layer) code.
- generalize the memory-only and persisted Lamport clocks behind a common interface
- rework the tests to provide reusable testing code for a Repo, a Clock, a Config, opening a path to add a new Repo implementation more easily
- test previously untested components with those new tests

Note: one problem found during this endeavor is that `identity.Version` also need to store one time + Lamport time for each other Entity (Bug, config, PR ...). This could possibly done without breaking change but it would be much easier to wait for https://github.com/MichaelMure/git-bug-migration to happen.
2020-06-26 19:14:22 +02:00
Michael Muré
1d06244c82
cmds: cleanup and re-generate files 2020-06-24 15:10:57 +02:00
Vincent Tiu
f790083fb2
Merge pull request #403 from MichaelMure/ls-dump
[ls] add support for different output formats
2020-06-18 20:37:00 +08:00
Martin Michlmayr
ff0ff86336
doc: fix typos 2020-06-16 21:32:03 +08:00
vince
de5565b5f9
ls: Add support to ls dump bug information in specific formats
This adds an optional flag to the ls command that allows users to specify the format they wish to dump the output as. Currently, supported parameters are 'default', 'plain' and 'json'.
2020-06-16 15:05:48 +02:00
Michael Muré
6352d6aa23
generate docs and completion concurrently for a faster "make" 2020-06-14 22:26:47 +02:00
Michael Muré
78f39c4077
CLI: enable Fish completion 2020-06-14 19:46:24 +02:00
Michael Muré
6fd7934f53
update cobra 2020-06-14 19:43:58 +02:00
Michael Muré
685a4fdc0c
readme: document workflows 2020-04-04 14:05:53 +02:00
Michael Muré
e53d7c6561
add workflow diagrams 2020-03-01 12:59:42 +01:00
Michael Muré
0e68c10ffc
update webUI's screenshots 2020-02-23 16:32:08 +01:00
Michael Muré
4559af5e71
update auto-generated files 2020-02-23 14:38:02 +01:00
Michael Muré
4ec4f45195
update auto-generated files 2020-02-23 14:24:15 +01:00
Michael Muré
fe3d5c95e4
bridges: massive refactor
- automatic flag validation and warning
- generalized prompt
- cleanups
2020-02-15 02:55:19 +01:00
Michael Muré
646fd681ff
it compiles \o/ 2020-02-08 17:19:57 +01:00
ludovicm67
7de5a25ffa
webui: add logo 2020-01-24 00:28:18 +01:00
amine
f6b4830c0b bridge/gitlab: support self-hosted GitLab instance 2019-12-10 21:05:55 +01:00
Michael Muré
b92adfcb5f
bridge: huge refactor to accept multiple kind of credentials 2019-12-08 21:28:27 +01:00
Michael Muré
afe69d0c93 github: tiny cleanups of the configurator 2019-11-26 19:46:50 +01:00
Michael Muré
283e97111b bug: make sure there is no Operation's hash collision 2019-11-19 19:51:18 +01:00
Michael Muré
e0b15ee764
cli: rename "token" into "auth" 2019-11-10 17:33:44 +01:00
Michael Muré
f8cf3fea03
cli: add bridge token show 2019-11-10 15:50:56 +01:00
Michael Muré
e2445edcb9
bridge: various improvement on the global token PR 2019-11-10 14:53:40 +01:00
amine
45653bd31d token: regenerate documentation and fix imports 2019-11-09 14:55:27 +01:00
amine
baefa687b5 tokens: use a hash as token identifier instead of the token it self 2019-11-09 13:26:52 +01:00