wuffle 0.51.1 → 0.53.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.
@@ -226,6 +226,7 @@ function filterIssue(issue) {
226
226
  key,
227
227
  number,
228
228
  state,
229
+ state_reason = null,
229
230
  title,
230
231
  user,
231
232
  assignees = [],
@@ -245,6 +246,7 @@ function filterIssue(issue) {
245
246
  key,
246
247
  number,
247
248
  state,
249
+ state_reason,
248
250
  title,
249
251
  user: user ? filterUser(user) : null,
250
252
  assignees: assignees.map(filterUser),
@@ -1,5 +1,7 @@
1
1
  const express = require('express');
2
2
 
3
+ const fs = require('fs');
4
+
3
5
  const path = require('path');
4
6
 
5
7
 
@@ -8,7 +10,7 @@ const path = require('path');
8
10
  *
9
11
  * @param {import('express').Router} router
10
12
  */
11
- module.exports = async (router) => {
13
+ module.exports = async (config, router) => {
12
14
 
13
15
  const staticDirectory = path.join(__dirname, '..', '..', 'public');
14
16
 
@@ -18,8 +20,51 @@ module.exports = async (router) => {
18
20
 
19
21
  // board page
20
22
 
23
+ const {
24
+ name,
25
+ columns
26
+ } = config;
27
+
28
+ const boardConfig = {
29
+ columns: columns.map(c => {
30
+ const { name, collapsed } = c;
31
+
32
+ return {
33
+ name,
34
+ collapsed: collapsed || false
35
+ };
36
+ }),
37
+ name: name || 'Wuffle Board'
38
+ };
39
+
40
+ let indexPage;
41
+
42
+ function getIndexPage() {
43
+ if (indexPage) {
44
+ return indexPage;
45
+ }
46
+
47
+ indexPage = fs.readFileSync(path.join(staticDirectory, 'index.html'), 'utf8');
48
+
49
+ indexPage = indexPage.replace(
50
+ '<title>Wuffle Board</title>',
51
+ '<title>' + boardConfig.name + ' · Wuffle Board</title>'
52
+ );
53
+
54
+ indexPage = indexPage.replace(
55
+ '<script type="application/json+config"></script>',
56
+ '<script type="application/json+config">' +
57
+ JSON.stringify(boardConfig)
58
+ .replace(/</g, '&lt;')
59
+ .replace(/>/g, '&gt;') +
60
+ '</script>'
61
+ );
62
+ }
63
+
21
64
  router.get('/board', (req, res, next) => {
22
- res.sendFile(path.join(staticDirectory, 'index.html'));
65
+ indexPage = getIndexPage();
66
+
67
+ res.type('html').status(200).send(getIndexPage());
23
68
  });
24
69
 
25
70
  router.get('/robots.txt', (req, res, next) => {
package/lib/filters.js CHANGED
@@ -216,6 +216,7 @@ function filterIssue(githubIssue, githubRepository) {
216
216
  node_id,
217
217
  number,
218
218
  state,
219
+ state_reason,
219
220
  title,
220
221
  user,
221
222
  body,
@@ -244,6 +245,7 @@ function filterIssue(githubIssue, githubRepository) {
244
245
  url,
245
246
  number,
246
247
  state,
248
+ state_reason,
247
249
  title,
248
250
  user: filterUser(user),
249
251
  body,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuffle",
3
- "version": "0.51.1",
3
+ "version": "0.53.0",
4
4
  "description": "A multi-repository task board for GitHub issues",
5
5
  "author": {
6
6
  "name": "Nico Rehwaldt",
@@ -92,5 +92,5 @@
92
92
  "index.js",
93
93
  "wuffle.config.example.js"
94
94
  ],
95
- "gitHead": "a6adad9a8ddc7dcb000bcd1e90fbfe931c901c85"
95
+ "gitHead": "33e580d5670764e17de90752f2045d6b68676bc8"
96
96
  }
package/public/bundle.css CHANGED
@@ -9,9 +9,9 @@
9
9
  .tag.svelte-12ss6nn{list-style:none;display:inline-block;height:auto;margin:0 4px 4px 0;padding:2px 7px;font-size:12px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:white;background:#fafafa;border-radius:6px;text-decoration:none}.tag.svelte-12ss6nn:not(a){cursor:default}.tag.inverted.svelte-12ss6nn{color:#000}.svelte-12ss6nn:not(a.tag, .tag.clickable){cursor:default}
10
10
  .pull-request-icon.svelte-1vxuq5n{margin-right:3px}.pull-request-icon.open.svelte-1vxuq5n{color:#1a7f37}.pull-request-icon.closed.svelte-1vxuq5n{color:#cf222e}.pull-request-icon.merged.svelte-1vxuq5n{color:#8250df}.pull-request-icon.draft.svelte-1vxuq5n{color:#57606a}
11
11
  .icon.svelte-tuoxjm{margin-right:3px;color:#1d76db}
12
+ .icon.svelte-1ek0gob{margin-right:3px}.icon.closed.svelte-1ek0gob{color:#8250df}.icon.open.svelte-1ek0gob{color:#1a7f37}.icon.not-planned.svelte-1ek0gob{color:#6e7781}
12
13
  .card-status.svelte-9jlwim.svelte-9jlwim{display:flex;flex-direction:row;align-items:stretch;height:3px;width:auto;margin:3px -8px -4px}.state.svelte-9jlwim.svelte-9jlwim{flex:1;background-color:#adb5bd}.state.svelte-9jlwim>span.svelte-9jlwim{display:none}.state.striped.svelte-9jlwim.svelte-9jlwim{background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);animation:svelte-9jlwim-progress-bar-stripes 1s linear infinite;background-size:1rem 1rem}.state.success.svelte-9jlwim.svelte-9jlwim{background-color:#4ede9b;box-shadow:0 1px 2px 0px rgba(36, 124, 83, 0.3)}.state.failure.svelte-9jlwim.svelte-9jlwim{background-color:#ea868f;box-shadow:0 1px 2px 0px rgba(203, 70, 83, 0.3)}.state.action-required.svelte-9jlwim.svelte-9jlwim{background-color:#ffda6a;box-shadow:0 1px 2px 0px rgba(230, 181, 32, 0.3)}.state.svelte-9jlwim+.state.svelte-9jlwim{margin-left:1px}@keyframes svelte-9jlwim-progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}
13
14
  .assignee.svelte-pr1826.svelte-pr1826{box-sizing:border-box;margin:0;font-size:14px;position:relative;display:flex;text-align:center;border-radius:2px;margin-left:3px;transition:margin 0.1s;height:18px}.assignee.svelte-pr1826 img.svelte-pr1826{height:100%;border-radius:2px;vertical-align:unset}.assignee.svelte-pr1826 .icon-shadow.svelte-pr1826{position:absolute;display:none;top:0;left:0;height:100%;width:100%;box-shadow:inset 0 0 2px 0 rgba(20, 20, 20, 0.3);border-radius:2px}.assignee.requested-reviewer.svelte-pr1826.svelte-pr1826:before{content:"";display:block;background:#bf8700;box-shadow:0 0 0 2px white;width:6px;height:6px;border-radius:50%;position:absolute;top:-2px;left:-2px;z-index:1}.assignee.commented.svelte-pr1826.svelte-pr1826:before{content:"";display:block;background:#0dcaf0;box-shadow:0 0 0 2px white;width:6px;height:6px;border-radius:50%;position:absolute;top:-2px;left:-2px;z-index:1}.assignee.approved.svelte-pr1826.svelte-pr1826:before{content:"";display:block;background:#198754;box-shadow:0 0 0 2px white;width:6px;height:6px;border-radius:50%;position:absolute;top:-2px;left:-2px;z-index:1}.assignee.requested-changes.svelte-pr1826.svelte-pr1826:before{content:"";display:block;background:#dc3545;box-shadow:0 0 0 2px white;width:6px;height:6px;border-radius:50%;position:absolute;top:-2px;left:-2px;z-index:1}.assignee.svelte-pr1826+.assignee.svelte-pr1826{margin-left:-6px;box-shadow:0 0 0 1px white}.hovered>.header .assignee+.assignee{margin-left:3px !important;box-shadow:none}
14
- .icon.svelte-1is0y1z{margin-right:3px}.icon.closed.svelte-1is0y1z{color:#8250df}.icon.open.svelte-1is0y1z{color:#1a7f37}
15
15
  .card-link:not(:last-child)>.card-status{margin-bottom:-2px !important}.board-card-links.attached .card-link:last-child>.card-status .state:last-child,.board-card>.card-status .state:last-child{border-bottom-right-radius:4px}.board-card-links.attached .card-link:last-child>.card-status .state:first-child,.board-card>.card-status .state:first-child{border-bottom-left-radius:4px}.header.svelte-1z10lc.svelte-1z10lc{display:flex;align-items:center;user-select:none}.header.svelte-1z10lc>.svelte-1z10lc{flex-shrink:0}.header.svelte-1z10lc>.collaborator-links.svelte-1z10lc{display:flex;align-items:center}.issue-number.svelte-1z10lc.svelte-1z10lc{font-weight:bold;margin-right:6px;display:flex;align-items:center;text-decoration:none}.short-title.svelte-1z10lc.svelte-1z10lc{color:#6c757d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-link.svelte-1z10lc.svelte-1z10lc{border-top:solid 1px #F0F0F0;margin-top:2px;padding-top:2px}.card-link.svelte-1z10lc .short-title.svelte-1z10lc{flex:1}.card-link .epic{color:#1d76db}
16
16
  .board-card-container.svelte-dd5meo.svelte-dd5meo{width:100%}.board-card.svelte-dd5meo.svelte-dd5meo{background:white;border-radius:4px;box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);position:relative;z-index:1;padding:4px 8px;cursor:default}.board-card.svelte-dd5meo .header.svelte-dd5meo{margin-bottom:7px}.card-link:not(:last-child)>.card-status{margin-bottom:-2px !important}.board-card-links.attached .card-link:last-child>.card-status .state:last-child,.board-card>.card-status .state:last-child{border-bottom-right-radius:4px}.board-card-links.attached .card-link:last-child>.card-status .state:first-child,.board-card>.card-status .state:first-child{border-bottom-left-radius:4px}.board-card-links.svelte-dd5meo.svelte-dd5meo{margin-top:2px}.header.svelte-dd5meo.svelte-dd5meo{display:flex;align-items:center;user-select:none}.header.svelte-dd5meo>.svelte-dd5meo{flex-shrink:0}.header.svelte-dd5meo>.repository.svelte-dd5meo{flex:1}.header.svelte-dd5meo>.collaborator-links.svelte-dd5meo{display:flex;align-items:center}.issue-type.svelte-dd5meo.svelte-dd5meo{margin-right:3px}.issue-type-pull-request.svelte-dd5meo.svelte-dd5meo{color:#6cc644}.issue-number.svelte-dd5meo.svelte-dd5meo{font-weight:bold;margin-right:6px;display:flex;align-items:center;text-decoration:none}.repository.svelte-dd5meo.svelte-dd5meo,.short-title.svelte-dd5meo.svelte-dd5meo{color:#6c757d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title.svelte-dd5meo.svelte-dd5meo{font-size:1.1em;margin:0 0 9px 0;min-height:30px;line-height:1.2em;color:#495057;overflow:hidden}.footer.svelte-dd5meo.svelte-dd5meo{display:flex;flex-direction:row;flex-wrap:wrap}.links.svelte-dd5meo.svelte-dd5meo{margin-left:auto}.links.svelte-dd5meo a.svelte-dd5meo{color:#adb5bd}.links.svelte-dd5meo a.svelte-dd5meo:hover{color:#6c757d}.tag.label,.tag.milestone{margin-right:4px;margin-bottom:4px}.tag.milestone{color:#343a40 !important;border:solid 1px #6c757d}.card-link:first-child{border-top:none !important;margin-top:1px !important}.board-card-links.attached.svelte-dd5meo.svelte-dd5meo{background:#F9F9F9;border-radius:0 0 4px 4px;box-shadow:inset 0 3px 5px -2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.1);margin-top:-6px;position:relative;padding:7px 8px 4px 8px}.progress.svelte-dd5meo.svelte-dd5meo{display:flex;flex-direction:row;align-items:center;margin-bottom:7px;cursor:pointer}.progress.svelte-dd5meo svg.svelte-dd5meo{color:#6c757d}.progress.svelte-dd5meo .bar.svelte-dd5meo{border-radius:3px;height:5px;width:80px;background:#e9ecef;margin:auto 6px}.progress.svelte-dd5meo .bar .indicator.svelte-dd5meo{border-radius:3px;background:#6c757d;height:100%}.progress.svelte-dd5meo .text.svelte-dd5meo{margin-left:6px;font-size:0.9rem;color:#6c757d}
17
17
  .dropdown-parent.svelte-w96e7f{position:relative}.help-dropdown.svelte-w96e7f{border-radius:4px;margin:0;margin-top:5px;text-align:left;height:auto;position:relative;background:transparent;border:none;z-index:999;width:100%;min-width:0 !important;max-width:none !important;padding:0;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0, 0, 0, 0.1);box-shadow:0 0.1rem 1rem rgba(0, 0, 0, 0.075);position:absolute;top:100%;z-index:100;left:0px;right:auto;display:block}.repository-select.svelte-w96e7f{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10}.overlay.svelte-w96e7f{width:100%;height:100%;background:rgba(30, 30, 30, 0.3)}.issue-creator.svelte-w96e7f{position:absolute;z-index:2;width:500px;max-width:100%;background:white;top:30%;left:50%;transform:translate(-50%);line-height:1.5;border-radius:5px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}