From 03b6afa2f3a73bdecf29ba9c19ef1877bfd596a5 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 24 Aug 2019 13:55:49 +0200 Subject: [PATCH 1/2] docs: update implementation table docs: add bridge usage examples --- README.md | 40 +++++++++++++++++++++++++++++------- commands/bridge_configure.go | 11 ++++++++-- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 459fabc8d39113be97f4708b435bcb4e57a1c325..ca2b93e5ab1447fdc3d6b04a26ef7b29bb26bd63 100644 --- a/README.md +++ b/README.md @@ -135,13 +135,39 @@ The web UI interact with the backend through a GraphQL API. The schema is availa | | Github | Gitlab | Launchpad | | --- | --- | --- | --- | -| **bug** | :heavy_check_mark: | :x: | :x: | -| comments | :heavy_check_mark: | :x: | :x: | -| comment editions | :heavy_check_mark: | :x: | :x: | -| labels | :heavy_check_mark: | :x: | :x: | -| status | :heavy_check_mark: | :x: | :x: | -| title edition | :heavy_check_mark: | :x: | :x: | -| **automated test suite** | :heavy_check_mark: | :x: | :x: | +| **bug** | :heavy_check_mark: | :heavy_check_mark: | :x: | +| comments | :heavy_check_mark: | :heavy_check_mark: | :x: | +| comment editions | :heavy_check_mark: | :heavy_check_mark: | :x: | +| labels | :heavy_check_mark: | :heavy_check_mark: | :x: | +| status | :heavy_check_mark: | :heavy_check_mark: | :x: | +| title edition | :heavy_check_mark: | :heavy_check_mark: | :x: | +| **automated test suite** | :heavy_check_mark: | :heavy_check_mark: | :x: | + +#### Bridge usage + +configure a new github bridge +```bash +git bug bridge configure \ + --name=mybridge \ + --target=github \ + --url=https://github.com/michaelmure/git-bug \ + --token=$TOKEN +``` + +import bugs +```bash +git bug bridge pull mybridge +``` + +export modifications +```bash +git bug bridge push mybridge +``` + +deleting a bridge +```bash +git bug bridge rm mybridge +``` ## Internals diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go index e3576ead0a28045fc05d8d397d2524661f191f59..74ccf29896ab4568df1c75814319d1a15fc150ad 100644 --- a/commands/bridge_configure.go +++ b/commands/bridge_configure.go @@ -160,7 +160,7 @@ Private: Enter token: 87cf5c03b64029f18ea5f9ca5679daa08ccbd700 Successfully configured bridge: default -# For Github +# For GitHub git bug bridge configure \ --name=default \ --target=github \ @@ -172,7 +172,14 @@ git bug bridge configure \ git bug bridge configure \ --name=default \ --target=launchpad-preview \ - --url=https://bugs.launchpad.net/ubuntu/`, + --url=https://bugs.launchpad.net/ubuntu/ + +# For Gitlab +git bug bridge configure \ + --name=mybridge \ + --target=github \ + --url=https://github.com/michaelmure/git-bug \ + --token=$(TOKEN)`, PreRunE: loadRepo, RunE: runBridgeConfigure, } From 35c6cb6e36a0db48bfed2cd7ba5954537f9dfae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Sat, 24 Aug 2019 14:18:22 +0200 Subject: [PATCH 2/2] readme: tweaking --- README.md | 24 +++++++++++++++++------- commands/bridge_configure.go | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ca2b93e5ab1447fdc3d6b04a26ef7b29bb26bd63..0c1f4fcbd2ced443f178d29c0f30976775a3d5c1 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,14 @@ The web UI interact with the backend through a GraphQL API. The schema is availa #### Bridge usage -configure a new github bridge +Interactively configure a new github bridge: + +```bash +git bug bridge configure +``` + +Or manually: + ```bash git bug bridge configure \ --name=mybridge \ @@ -154,19 +161,22 @@ git bug bridge configure \ --token=$TOKEN ``` -import bugs +Import bugs: + ```bash -git bug bridge pull mybridge +git bug bridge pull [] ``` -export modifications +Export modifications: + ```bash -git bug bridge push mybridge +git bug bridge push [] ``` -deleting a bridge +Deleting a bridge: + ```bash -git bug bridge rm mybridge +git bug bridge rm [] ``` ## Internals diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go index 74ccf29896ab4568df1c75814319d1a15fc150ad..6bebc26245de7647fa997f07ef20414f1c490472 100644 --- a/commands/bridge_configure.go +++ b/commands/bridge_configure.go @@ -176,7 +176,7 @@ git bug bridge configure \ # For Gitlab git bug bridge configure \ - --name=mybridge \ + --name=default \ --target=github \ --url=https://github.com/michaelmure/git-bug \ --token=$(TOKEN)`,