aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man/git-bug-bridge-configure.1
blob: 6ccd44cb2172e81e667ed626c82d81554af8f596 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH "GIT-BUG" "1" "Apr 2019" "Generated from git-bug's source code" "" 
.nh
.ad l


.SH NAME
.PP
git\-bug\-bridge\-configure \- Configure a new bridge.


.SH SYNOPSIS
.PP
\fBgit\-bug bridge configure [flags]\fP


.SH DESCRIPTION
.PP
.RS

.nf
Configure a new bridge by passing flags or/and using interactive terminal prompts. You can avoid all the terminal prompts by passing all the necessary flags to configure your bridge.
Repository configuration can be made by passing either the \-\-url flag or the \-\-project and \-\-owner flags. If the three flags are provided git\-bug will use \-\-project and \-\-owner flags.
Token configuration can be directly passed with the \-\-token flag or in the terminal prompt. If you don't already have one you can use the interactive procedure to generate one.

.fi
.RE


.SH OPTIONS
.PP
\fB\-n\fP, \fB\-\-name\fP=""
    A distinctive name to identify the bridge

.PP
\fB\-t\fP, \fB\-\-target\fP=""
    The target of the bridge. Valid values are [github,gitlab,launchpad\-preview]

.PP
\fB\-u\fP, \fB\-\-url\fP=""
    The URL of the target repository

.PP
\fB\-o\fP, \fB\-\-owner\fP=""
    The owner of the target repository

.PP
\fB\-T\fP, \fB\-\-token\fP=""
    The authentication token for the API

.PP
\fB\-i\fP, \fB\-\-token\-id\fP=""
    The authentication token identifier for the API

.PP
\fB\-\-token\-stdin\fP[=false]
    Will read the token from stdin and ignore \-\-token

.PP
\fB\-p\fP, \fB\-\-project\fP=""
    The name of the target repository

.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
    help for configure


.SH EXAMPLE
.PP
.RS

.nf
# Interactive example
[1]: github
[2]: launchpad\-preview
target: 1
name [default]: default

Detected projects:
[1]: github.com/a\-hilaly/git\-bug
[2]: github.com/MichaelMure/git\-bug

[0]: Another project

Select option: 1

[1]: user provided token
[2]: interactive token creation
Select option: 1

You can generate a new token by visiting https://github.com/settings/tokens.
Choose 'Generate new token' and set the necessary access scope for your repository.

The access scope depend on the type of repository.
Public:
	\- 'public\_repo': to be able to read public repositories
Private:
	\- 'repo'       : to be able to read private repositories

Enter token: 87cf5c03b64029f18ea5f9ca5679daa08ccbd700
Successfully configured bridge: default

# For GitHub
git bug bridge configure \\
    \-\-name=default \\
    \-\-target=github \\
    \-\-owner=$(OWNER) \\
    \-\-project=$(PROJECT) \\
    \-\-token=$(TOKEN)

# For Launchpad
git bug bridge configure \\
    \-\-name=default \\
    \-\-target=launchpad\-preview \\
	\-\-url=https://bugs.launchpad.net/ubuntu/

# For Gitlab
git bug bridge configure \\
    \-\-name=default \\
    \-\-target=github \\
    \-\-url=https://github.com/michaelmure/git\-bug \\
    \-\-token=$(TOKEN)

.fi
.RE


.SH SEE ALSO
.PP
\fBgit\-bug\-bridge(1)\fP