Skip to content

Commit 01a9475

Browse files
committed
Fix /deploy <package>
While diagnosing problems, one should also look at the left-hand side of an assignment that apparently does not work... in this instance, `const { package_name } = ...` means that the right-hand side cannot be just a string, it has to be an object with a `package_name` attribute... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 1179a7a commit 01a9475

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

GitForWindowsHelper/slash-commands.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ module.exports = async (context, req) => {
106106
}
107107

108108
const deployMatch = command.match(/^\/deploy(\s+(\S+)\s*)?$/)
109-
context.log(deployMatch)
110109
if (deployMatch) {
111110
if (owner !== 'git-for-windows'
112111
|| !req.body.issue.pull_request
@@ -117,7 +116,9 @@ module.exports = async (context, req) => {
117116
await checkPermissions()
118117

119118
const { guessComponentUpdateDetails, isMSYSPackage } = require('./component-updates')
120-
const { package_name } = deployMatch[2] || guessComponentUpdateDetails(req.body.issue.title, req.body.issue.body)
119+
const { package_name } = deployMatch[2]
120+
? { package_name: deployMatch[2] }
121+
: guessComponentUpdateDetails(req.body.issue.title, req.body.issue.body)
121122

122123
// The commit hash of the tip commit is sadly not part of the
123124
// "comment.created" webhook's payload. Therefore, we have to get it

0 commit comments

Comments
 (0)