kiosko-plugin-gitlab 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -66,7 +66,7 @@ Uses: `gitlab/merge-requests`.
66
66
 
67
67
  ### GitLab merge requests — `gitlab/merge-requests`
68
68
 
69
- Your open merge requests, the ones you are asked to review and the ones assigned to you, through glab or a token. Read every 3 min while a widget uses it. Options are set once in Kiosko → Settings → Data sources.
69
+ Your open merge requests, the ones you are asked to review and the ones assigned to you, through glab or a token. Read every 3 min while a widget uses it. Options are set in Kiosko → Settings → Data sources.
70
70
 
71
71
  | Option | Type | Default | |
72
72
  |---|---|---|---|
@@ -74,6 +74,12 @@ Your open merge requests, the ones you are asked to review and the ones assigned
74
74
  | `token` | string | *(secret)* | Access token. A personal access token with read_api. Empty = use the glab CLI and its login. |
75
75
  | `bin` | string | `"glab"` | glab command |
76
76
 
77
+ ### Several accounts
78
+
79
+ With Kiosko 0.2.12 and later the source can have **profiles**: named configurations, each with its own host and token, say «GitLab.com» for your own projects and «Work» for your company's GitLab (`gitlab.example.com`). A profile without a token uses glab's login for its host (`glab auth login --hostname gitlab.example.com`).
80
+
81
+ Each profile is read on its own and each tile picks its profile in the inspector (**Source profile**; **New profile…** makes one from the tile), so a pipelines card for work and another for your own projects can share a screen. Settings → Data sources shows the profiles as tabs. A tile with no profile reads the source's own options, as before; with older Kiosko versions there is one account.
82
+
77
83
  ## Development
78
84
 
79
85
  ```sh
package/dist/index.js CHANGED
@@ -243,7 +243,10 @@ var mergeRequests = defineSource({
243
243
  minIntervalMs: 6e4,
244
244
  timeoutMs: 2e4,
245
245
  read: ({ options, signal }) => readMergeRequests(options, signal),
246
- demo: ({ now, locale }) => demoMergeRequests(now, locale)
246
+ demo: ({ now, locale }) => demoMergeRequests(now, locale),
247
+ // Several accounts (gitlab.com and a company host), each with its host and token: Kiosko 0.2.12 and
248
+ // later; older ones ignore it. Each read is one query and keeps nothing, so profiles share no state.
249
+ ...{ profiles: true }
247
250
  });
248
251
  var aliasesField = () => t.map({
249
252
  advanced: true,
@@ -367,7 +370,7 @@ var reviews = defineWidget({
367
370
  var index_default = definePlugin({
368
371
  id: "gitlab",
369
372
  name: { en: "GitLab", es: "GitLab", de: "GitLab", "zh-Hant": "GitLab", "zh-Hans": "GitLab" },
370
- version: "0.2.2",
373
+ version: "0.3.0",
371
374
  languages: ["en", "es", "de", "zh-Hant", "zh-Hans"],
372
375
  sdk: "^0.2.0",
373
376
  permissions: { network: ["gitlab.com", "user"], exec: ["glab"] },
@@ -9,7 +9,7 @@
9
9
  "zh-Hant": "GitLab",
10
10
  "zh-Hans": "GitLab"
11
11
  },
12
- "version": "0.2.3",
12
+ "version": "0.3.0",
13
13
  "description": {
14
14
  "en": "Your merge requests' pipelines and the reviews waiting for you.",
15
15
  "es": "Los pipelines de tus merge requests y las revisiones que te esperan.",
@@ -553,6 +553,7 @@
553
553
  },
554
554
  "polled": true,
555
555
  "intervalMs": 180000,
556
+ "profiles": true,
556
557
  "options": {
557
558
  "default": {
558
559
  "host": "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiosko-plugin-gitlab",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "GitLab cards: the pipelines of your open merge requests and the ones waiting for your review.",
5
5
  "type": "module",
6
6
  "license": "MIT",