wuffle 0.64.0 → 0.66.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.
@@ -83,7 +83,7 @@ export default function AuthRoutes(logger, router, securityContext) {
83
83
 
84
84
  return req.session.destroy(function(err) {
85
85
  return res.redirect(redirectTo);
86
- });
86
+ }) && null;
87
87
 
88
88
  });
89
89
 
@@ -185,7 +185,7 @@ export default function AuthRoutes(logger, router, securityContext) {
185
185
  } = session;
186
186
 
187
187
  if (!githubUser) {
188
- return res.type('json').json(null);
188
+ return res.type('json').json(null) && null;
189
189
  }
190
190
 
191
191
  const {
@@ -218,14 +218,14 @@ export default function AuthRoutes(logger, router, securityContext) {
218
218
  // access is not granted anymore, clear current session
219
219
  return req.session.destroy(function(err) {
220
220
  return res.type('json').json(null);
221
- });
221
+ }) && null;
222
222
  }
223
223
  }
224
224
 
225
225
  return res.type('json').json({
226
226
  login,
227
227
  avatar_url
228
- });
228
+ }) && null;
229
229
 
230
230
  });
231
231
 
@@ -104,7 +104,7 @@ We automatically synchronize all repositories you granted us access to via the G
104
104
  const octokit = await githubClient.getOrgScoped(owner);
105
105
 
106
106
  const repositories = await octokit.paginate(
107
- octokit.apps.listReposAccessibleToInstallation,
107
+ octokit.rest.apps.listReposAccessibleToInstallation,
108
108
  {
109
109
  per_page: 100
110
110
  }
@@ -152,7 +152,7 @@ We automatically synchronize all repositories you granted us access to via the G
152
152
 
153
153
  // open issues
154
154
  octokit.paginate(
155
- octokit.issues.listForRepo,
155
+ octokit.rest.issues.listForRepo,
156
156
  {
157
157
  ...params,
158
158
  state: 'open'
@@ -162,7 +162,7 @@ We automatically synchronize all repositories you granted us access to via the G
162
162
 
163
163
  // closed issues, updated last 30 days
164
164
  octokit.paginate(
165
- octokit.issues.listForRepo,
165
+ octokit.rest.issues.listForRepo,
166
166
  {
167
167
  ...params,
168
168
  state: 'closed',
@@ -173,7 +173,7 @@ We automatically synchronize all repositories you granted us access to via the G
173
173
 
174
174
  // open pulls, all
175
175
  octokit.paginate(
176
- octokit.pulls.list,
176
+ octokit.rest.pulls.list,
177
177
  {
178
178
  ...params,
179
179
  state: 'open'
@@ -182,7 +182,7 @@ We automatically synchronize all repositories you granted us access to via the G
182
182
 
183
183
  // closed pulls, updated last 30 days
184
184
  octokit.paginate(
185
- octokit.pulls.list,
185
+ octokit.rest.pulls.list,
186
186
  {
187
187
  ...params,
188
188
  state: 'closed'
@@ -174,17 +174,17 @@ export default async function BoardApiRoutes(
174
174
 
175
175
  return filterBoardItems(req, items).then(filteredItems => {
176
176
 
177
- res.type('json').json({
177
+ return res.type('json').json({
178
178
  items: filteredItems,
179
179
  cursor
180
- });
180
+ }) && null;
181
181
  }).catch(err => {
182
182
  log.error({
183
183
  err,
184
184
  cursor
185
185
  }, 'failed to retrieve cards');
186
186
 
187
- res.status(500).json({ error : true });
187
+ return res.status(500).json({ error : true }) && null;
188
188
  });
189
189
  });
190
190
 
@@ -206,7 +206,7 @@ export default async function BoardApiRoutes(
206
206
  };
207
207
  }),
208
208
  name: name || 'Wuffle Board'
209
- });
209
+ }) && null;
210
210
 
211
211
  });
212
212
 
@@ -236,7 +236,7 @@ export default async function BoardApiRoutes(
236
236
  const user = authRoutes.getGitHubUser(req);
237
237
 
238
238
  if (!user) {
239
- return res.status(401).json({});
239
+ return res.status(401).json({}) && null;
240
240
  }
241
241
 
242
242
  const body = JSON.parse(req.body);
@@ -251,13 +251,13 @@ export default async function BoardApiRoutes(
251
251
  const issue = await store.getIssueById(id);
252
252
 
253
253
  if (!issue) {
254
- return res.status(404).json({});
254
+ return res.status(404).json({}) && null;
255
255
  }
256
256
 
257
257
  const column = columns.getByName(columnName);
258
258
 
259
259
  if (!column) {
260
- return res.status(404).json({});
260
+ return res.status(404).json({}) && null;
261
261
  }
262
262
 
263
263
  const repo = repoAndOwner(issue);
@@ -265,7 +265,7 @@ export default async function BoardApiRoutes(
265
265
  const canWrite = await userAccess.canWrite(user, repo);
266
266
 
267
267
  if (!canWrite) {
268
- return res.status(403).json({});
268
+ return res.status(403).json({}) && null;
269
269
  }
270
270
 
271
271
  const octokit = await githubClient.getUserScoped(user);
@@ -288,7 +288,7 @@ export default async function BoardApiRoutes(
288
288
 
289
289
  res.status(500).json({ error : true });
290
290
  })
291
- );
291
+ ) && null;
292
292
 
293
293
  });
294
294
 
@@ -245,7 +245,7 @@ export default function GithubApp(config, app, logger, injector) {
245
245
  function fetchInstallations() {
246
246
  return /** @type Promise<Array<Installation>> */ (getAppScopedClient().then(
247
247
  octokit => octokit.paginate(
248
- octokit.apps.listInstallations,
248
+ octokit.rest.apps.listInstallations,
249
249
  { per_page: 100 }
250
250
  )
251
251
  ));
@@ -44,7 +44,7 @@ export default function GithubChecks(webhookEvents, events, githubClient, store)
44
44
 
45
45
  const {
46
46
  data: result
47
- } = await github.checks.listForRef({
47
+ } = await github.rest.checks.listForRef({
48
48
  owner,
49
49
  repo,
50
50
  ref: sha,
@@ -1,4 +1,4 @@
1
- import { ProbotOctokit } from 'probot/lib/octokit/probot-octokit.js';
1
+ import { ProbotOctokit } from 'probot';
2
2
  import { Cache } from '../../util/index.js';
3
3
 
4
4
 
@@ -77,7 +77,7 @@ export default function GithubIssues(config, logger, columns) {
77
77
 
78
78
  const params = context.repo({ issue_number });
79
79
 
80
- return context.octokit.issues.get(params)
80
+ return context.octokit.rest.issues.get(params)
81
81
  .then(response => response.data)
82
82
  .catch(err => {
83
83
 
@@ -156,7 +156,7 @@ export default function GithubIssues(config, logger, columns) {
156
156
  log.info(addLabelParams, 'add labels');
157
157
 
158
158
  invocations.push(
159
- context.octokit.issues.addLabels(addLabelParams)
159
+ context.octokit.rest.issues.addLabels(addLabelParams)
160
160
  );
161
161
  }
162
162
 
@@ -170,7 +170,7 @@ export default function GithubIssues(config, logger, columns) {
170
170
  log.info(params, 'update');
171
171
 
172
172
  invocations.push(
173
- context.octokit.issues.update(params)
173
+ context.octokit.rest.issues.update(params)
174
174
  );
175
175
  }
176
176
 
@@ -187,7 +187,7 @@ export default function GithubIssues(config, logger, columns) {
187
187
  }, 'remove label');
188
188
 
189
189
  invocations.push(
190
- context.octokit.issues.removeLabel(removeLabelParams).catch(err => {
190
+ context.octokit.rest.issues.removeLabel(removeLabelParams).catch(err => {
191
191
 
192
192
  // gracefully handle non-existing label
193
193
  // may have been already removed by other
@@ -39,7 +39,7 @@ export default function GithubReviews(webhookEvents, events, githubClient, store
39
39
 
40
40
  const {
41
41
  data: reviews
42
- } = await github.pulls.listReviews({
42
+ } = await github.rest.pulls.listReviews({
43
43
  owner,
44
44
  repo,
45
45
  pull_number: issue.number
@@ -46,7 +46,7 @@ export default function GithubStates(webhookEvents, events, githubClient, store)
46
46
 
47
47
  const {
48
48
  data: response
49
- } = await github.repos.getCombinedStatusForRef({
49
+ } = await github.rest.repos.getCombinedStatusForRef({
50
50
  owner,
51
51
  repo,
52
52
  ref: sha
@@ -17,7 +17,7 @@ export default function SecurityContext(githubClient) {
17
17
 
18
18
  const {
19
19
  data: user
20
- } = await github.users.getAuthenticated();
20
+ } = await github.rest.users.getAuthenticated();
21
21
 
22
22
  return user;
23
23
  };
@@ -46,7 +46,7 @@ export default function UserAccess(
46
46
  const octokit = await githubClient.getUserScoped(user);
47
47
 
48
48
  return octokit.paginate(
49
- octokit.apps.listInstallationsForAuthenticatedUser
49
+ octokit.rest.apps.listInstallationsForAuthenticatedUser
50
50
  );
51
51
  }
52
52
 
@@ -65,7 +65,7 @@ export default function UserAccess(
65
65
  const octokit = await githubClient.getUserScoped(user);
66
66
 
67
67
  return octokit.paginate(
68
- octokit.apps.listInstallationReposForAuthenticatedUser,
68
+ octokit.rest.apps.listInstallationReposForAuthenticatedUser,
69
69
  {
70
70
  installation_id: installation.id,
71
71
  per_page: 100
@@ -184,7 +184,7 @@ export default function UserAccess(
184
184
 
185
185
  return githubClient.getOrgScoped(owner)
186
186
  .then(octokit => {
187
- return octokit.repos.getCollaboratorPermissionLevel({
187
+ return octokit.rest.repos.getCollaboratorPermissionLevel({
188
188
  repo,
189
189
  owner,
190
190
  username: login
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuffle",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "description": "A multi-repository task board for GitHub issues",
5
5
  "author": {
6
6
  "name": "Nico Rehwaldt",
@@ -44,36 +44,36 @@
44
44
  "dependencies": {
45
45
  "@aws-sdk/client-s3": "^3.525.0",
46
46
  "async-didi": "^0.3.1",
47
- "body-parser": "^1.20.0",
48
- "compression": "^1.7.5",
49
- "express-session": "^1.18.1",
47
+ "body-parser": "^2.0.0",
48
+ "compression": "^1.8.1",
49
+ "express-session": "^1.18.2",
50
50
  "fake-tag": "^5.0.0",
51
51
  "memorystore": "^1.6.7",
52
- "min-dash": "^4.2.2",
52
+ "min-dash": "^4.2.3",
53
53
  "mkdirp": "^3.0.1",
54
54
  "p-defer": "^4.0.1",
55
55
  "prexit": "^2.3.0",
56
- "probot": "^13.4.1",
57
- "smee-client": "^2.0.4"
56
+ "probot": "^13.4.5",
57
+ "smee-client": "^4.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@graphql-eslint/eslint-plugin": "^4.3.0",
60
+ "@graphql-eslint/eslint-plugin": "^4.4.0",
61
61
  "@octokit/graphql-schema": "^15.25.0",
62
- "@types/compression": "^1.7.2",
63
- "@types/express-session": "^1.18.1",
62
+ "@types/compression": "^1.8.1",
63
+ "@types/express-session": "^1.18.2",
64
64
  "@types/mocha": "^10.0.10",
65
- "chai": "^4.5.0",
66
- "graphql": "^16.10.0",
67
- "mocha": "^10.8.2",
68
- "nock": "^13.5.6",
69
- "nodemon": "^3.1.9",
70
- "npm-run-all2": "^7.0.2",
71
- "sinon": "^18.0.1",
72
- "sinon-chai": "^3.7.0",
65
+ "chai": "^6.0.0",
66
+ "graphql": "^16.11.0",
67
+ "mocha": "^11.0.0",
68
+ "nock": "^14.0.10",
69
+ "nodemon": "^3.1.10",
70
+ "npm-run-all2": "^8.0.4",
71
+ "sinon": "^21.0.0",
72
+ "sinon-chai": "^4.0.0",
73
73
  "typescript": "^5.7.2"
74
74
  },
75
75
  "engines": {
76
- "node": ">= 18"
76
+ "node": ">= 20"
77
77
  },
78
78
  "files": [
79
79
  "bin",
@@ -83,5 +83,5 @@
83
83
  "index.js",
84
84
  "wuffle.config.example.js"
85
85
  ],
86
- "gitHead": "bf153a12861bce84a2562407218d9110a328977b"
86
+ "gitHead": "ce1d4f52d8ac699a03db60e3fd35a3f6f81f8397"
87
87
  }