Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"sendNames": {
"type": "boolean",
"title": "Send task names",
"default": true,
"description": "Send each task's name (its name in the Claude Code sidebar, or its first prompt) to the webhook. Off: the board shows the task without a name."
"default": false,
"description": "Send each task's name (its name in the Claude Code sidebar, or its first prompt) to the webhook. Off by default: the board shows the task without a name."
}
}
}
2 changes: 1 addition & 1 deletion hooks/band/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async function record($: EngineInterface, b: Band, options: Options) {
const url = typeof options.webhookUrl === 'string' ? options.webhookUrl.trim() : ''
if (url !== '') {
const token = typeof options.webhookToken === 'string' ? options.webhookToken.trim() : ''
const request = webhookRequest(url, token, options.sendNames !== false, row)
const request = webhookRequest(url, token, options.sendNames === true, row)
if ('refused' in request) {
$.ui.status(`ponytail band: ${request.refused}`)
return
Expand Down
17 changes: 17 additions & 0 deletions tests/band-webhook-names.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env node
// The webhook gets no task names unless the user turns them on.

const assert = require('assert');
const fs = require('fs');
const path = require('path');

const root = path.join(__dirname, '..');

const plugin = JSON.parse(fs.readFileSync(path.join(root, '.claude-plugin', 'plugin.json'), 'utf8'));
assert.strictEqual(plugin.userConfig.sendNames.default, false, 'sendNames is off by default');

const register = fs.readFileSync(path.join(root, 'hooks', 'band', 'register.tsx'), 'utf8');
assert.ok(register.includes('options.sendNames === true'), 'an unset sendNames sends no names');
assert.ok(!register.includes('options.sendNames !== false'), 'an unset sendNames must not count as on');

console.log('ok');