You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bugwarrior/docs/other-services/tutorial.rst
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@ Now define an initial configuration schema as follows. Don't worry, we're about
75
75
76
76
classGitbugConfig(config.ServiceConfig):
77
77
service: typing.Literal['gitbug']
78
+
KEYRING_SERVICE='gitbug://{path}'
78
79
79
80
path: pathlib.Path
80
81
@@ -93,6 +94,8 @@ The ``service`` attribute is how bugwarrior will know to assign a given section
93
94
94
95
The ``path`` is the only particular detail required to access our local git-bug instance. You'll likely need additional details such as a username and token to authenticate to the service. Look at how you accessed the API in step 1 and ask yourself which components need to be configurable.
95
96
97
+
The ``KEYRING_SERVICE`` attribute is a format string that returns a string identifier for secrets in the keyring. Ideally, this string uniquely identifies a given instance of the service when it is possible to have multiple instances of the service configured. Service configuration values may be referenced by field name, such as ``{path}``.
98
+
96
99
The ``import_labels_as_tags`` and ``port`` attributes create optional configuration fields to allow customization of bugwarrior behavior.
97
100
98
101
.. note::
@@ -199,10 +202,6 @@ Now for the main service class which bugwarrior will invoke to fetch issues.
@@ -217,11 +216,9 @@ Now for the main service class which bugwarrior will invoke to fetch issues.
217
216
218
217
yieldself.get_issue_for_record(issue)
219
218
220
-
Here we see three required class attributes and two required methods.
221
-
222
-
The ``API_VERSION`` is set to the latest, while the other two attributes point to our previously defined classes.
219
+
Here we see three required class attributes and one required method.
223
220
224
-
The ``get_keyring_service`` method returns a string identifier for secrets in the keyring. Ideally, this string uniquely identifies a given instance of the service when it is possible to have multiple instances of the service configured.
221
+
The ``API_VERSION`` is set to the latest, while ``ISSUE_CLASS`` and ``CONFIG_SCHEMA`` point to our previously defined classes.
225
222
226
223
The ``issues`` method is a generator which yields individual issue dictionaries.
0 commit comments