@mcptoolshop/housekeeping 1.6.0 → 1.6.2
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/CHANGELOG.md +26 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/analyze.mjs +1 -1
- package/src/load.mjs +10 -5
- package/src/mcp.mjs +103 -36
- package/src/workflow-risks.mjs +18 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project are recorded here.
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
|
|
6
|
+
## [1.6.2] - 2026-12-06
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- Added explicit 4-hint `READ_ONLY` `ToolAnnotations` (`readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: false`) across all 11 `hk` MCP tools (#19).
|
|
10
|
+
- Preserved literal job names containing parenthesized suffixes during `classifyRequiredChecks` analysis, and added M8ven Live Score badge.
|
|
11
|
+
|
|
12
|
+
## [1.6.1] - 2026-12-05
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `WF_NO_PATHS_FILTER` no longer fires on a `push:` trigger gated to tags alone
|
|
17
|
+
(`on: { push: { tags: [v*] } }` with no `branches:`), the shape of a tag-push
|
|
18
|
+
release workflow. Its tag patterns already narrow the trigger, and a `paths:`
|
|
19
|
+
filter there would stop the release from firing at all — a tag push carries no
|
|
20
|
+
changed file a paths filter can match. A push that also fires on a branch
|
|
21
|
+
(with or without tags), a bare `on: push`, and `pull_request` (which has no
|
|
22
|
+
tag form) are still flagged. `WF_NO_CONCURRENCY` and `WF_NO_DISPATCH` are
|
|
23
|
+
unchanged and still hold a tag-only release to the same concurrency and
|
|
24
|
+
manual-dispatch rules.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- The Atlas engine pin moves from 1.27.0 to 1.28.0: the export (`ATLAS_PIN`),
|
|
29
|
+
the regenerated map, and the CI `atlas check` move together, as
|
|
30
|
+
`rules/atlas-map.md` asks.
|
|
31
|
+
|
|
6
32
|
## [1.6.0] - 2026-12-05
|
|
7
33
|
|
|
8
34
|
### Added
|
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
<a href="https://mcp-tool-shop-org.github.io/housekeeping/handbook/"><img src="https://img.shields.io/badge/Handbook-read-blue" alt="Handbook" /></a>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
|
+
[](https://m8ven.ai/mcp/mcp-tool-shop-org/housekeeping?s=readme)
|
|
25
|
+
|
|
24
26
|
One sweep collects every repository's CI status, open issues and pull requests,
|
|
25
27
|
releases, version tags, workflow files, branch protection, security alerts,
|
|
26
28
|
lockfiles and Actions billing into SQLite, then audits it all against written
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcptoolshop/housekeeping",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Operational-health warehouse for a GitHub organization: CI, issues, PRs, releases, Actions cost and repo hygiene, collected into SQLite and audited against written rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
package/src/analyze.mjs
CHANGED
|
@@ -512,7 +512,7 @@ export function classifyRequiredChecks({ required, observedNames, declaredJobs }
|
|
|
512
512
|
|
|
513
513
|
const stale = required
|
|
514
514
|
.filter(c => !universe.has(c))
|
|
515
|
-
.filter(c => observedBases.has(base(c)) || !jobs.has(base(c)));
|
|
515
|
+
.filter(c => !jobs.has(c) && (observedBases.has(base(c)) || !jobs.has(base(c))));
|
|
516
516
|
const staleSet = new Set(stale);
|
|
517
517
|
// Everything not proven dead. A stale context is absent from every PR by
|
|
518
518
|
// definition, so leaving it in `live` would bill one defect twice under two
|
package/src/load.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { parse as parseYaml } from 'yaml';
|
|
|
9
9
|
import {
|
|
10
10
|
editsWorkflowFiles, prCreateWithDefaultToken, auditSteps,
|
|
11
11
|
pagesDeployJobs, jobEnvironment, jobRunsOnDefaultBranch, atlasCheckPins,
|
|
12
|
-
resolveFailedStep, scheduleGaps,
|
|
12
|
+
resolveFailedStep, scheduleGaps, isTagOnlyPush,
|
|
13
13
|
} from './workflow-risks.mjs';
|
|
14
14
|
import { safeJson } from './collect.mjs';
|
|
15
15
|
import { reconcileRepos } from './cost.mjs';
|
|
@@ -132,12 +132,17 @@ export function inspectWorkflow(text, path, defaultBranch = null, atlasEnv = nul
|
|
|
132
132
|
out.on_triggers = triggers.join(',');
|
|
133
133
|
out.has_workflow_dispatch = bool(triggers.includes('workflow_dispatch'));
|
|
134
134
|
|
|
135
|
-
// "paths-gated" only means anything for push/pull_request triggers.
|
|
135
|
+
// "paths-gated" only means anything for push/pull_request triggers. A push
|
|
136
|
+
// that fires on tags alone (isTagOnlyPush) is already narrowed by its tag
|
|
137
|
+
// patterns and takes no paths filter -- one would stop its tag releases from
|
|
138
|
+
// firing -- so it is not counted as an ungated push. pull_request has no tag
|
|
139
|
+
// form, so it always counts.
|
|
136
140
|
if (on && typeof on === 'object' && !Array.isArray(on)) {
|
|
137
|
-
const
|
|
138
|
-
|
|
141
|
+
const pushLike = ['push', 'pull_request'].filter(
|
|
142
|
+
t => t in on && !(t === 'push' && isTagOnlyPush(on.push)));
|
|
143
|
+
const gated = pushLike.filter(t => on[t] && typeof on[t] === 'object');
|
|
139
144
|
out.has_paths_filter = bool(
|
|
140
|
-
|
|
145
|
+
pushLike.length === 0 || gated.some(t => on[t]['paths'] || on[t]['paths-ignore'])
|
|
141
146
|
);
|
|
142
147
|
} else {
|
|
143
148
|
// `on: push` bare form is by definition ungated.
|
package/src/mcp.mjs
CHANGED
|
@@ -9,7 +9,8 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
9
9
|
import { ListToolsRequestSchema, CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
10
10
|
import { DatabaseSync } from 'node:sqlite';
|
|
11
11
|
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
-
import { join } from 'node:path';
|
|
12
|
+
import { join, resolve } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
13
14
|
import { EXIT, formatError, readOnlyQuery, structured, userError } from './errors.mjs';
|
|
14
15
|
import { DATA_DIR, PACKAGE_ROOT } from './paths.mjs';
|
|
15
16
|
import { HEAD_CHECKS_RED } from './analyze.mjs';
|
|
@@ -18,22 +19,19 @@ import { runQueue } from './queue.mjs';
|
|
|
18
19
|
import { runAtlas } from './atlas-view.mjs';
|
|
19
20
|
|
|
20
21
|
const DB_FILE = process.env.HK_DB || join(DATA_DIR, 'housekeeping.db');
|
|
21
|
-
const VERSION = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8')).version;
|
|
22
|
-
|
|
23
|
-
if (!existsSync(DB_FILE)) {
|
|
24
|
-
console.error(formatError(userError('NO_DATABASE', `no database at ${DB_FILE}`, 'run `hk refresh` first')));
|
|
25
|
-
process.exit(EXIT.USER);
|
|
26
|
-
}
|
|
27
|
-
const db = new DatabaseSync(DB_FILE, { readOnly: true });
|
|
28
|
-
const sid = () => db.prepare('SELECT MAX(id) AS id FROM snapshot').get().id;
|
|
29
22
|
|
|
23
|
+
// The database handle and the snapshot-id helper. They are filled in by start()
|
|
24
|
+
// when this file is run as the server; left unset on import so a test (or any
|
|
25
|
+
// other importer) can read the tool declarations below without a database on
|
|
26
|
+
// disk -- importing must not open a file or exit the process. Every tool's run()
|
|
27
|
+
// closes over these bindings and is only ever called after start() has set them.
|
|
28
|
+
let db;
|
|
29
|
+
let sid;
|
|
30
30
|
// Meta repos are a fact about the org, read from the config exactly as the CLI
|
|
31
31
|
// reads it, so hk_queue and hk_atlas leave out non-product repositories by
|
|
32
|
-
// default.
|
|
33
|
-
//
|
|
32
|
+
// default. The default stands until start() reads the config; a malformed config
|
|
33
|
+
// must not take the server down, so start() falls back to it and says so on stderr.
|
|
34
34
|
let META_REPOS = ['.github'];
|
|
35
|
-
try { META_REPOS = loadConfig().metaRepos; }
|
|
36
|
-
catch (e) { console.error(`[hk-mcp] ${formatError(e)} (using default metaRepos ${JSON.stringify(META_REPOS)})`); }
|
|
37
35
|
|
|
38
36
|
/** Render rows as a pipe table: far cheaper in tokens than pretty-printed JSON. */
|
|
39
37
|
function asTable(rows, note) {
|
|
@@ -51,9 +49,33 @@ const str = (d) => ({ type: 'string', description: d });
|
|
|
51
49
|
const int = (d) => ({ type: 'integer', description: d });
|
|
52
50
|
const bool = (d) => ({ type: 'boolean', description: d });
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
// Tool annotations (the MCP `annotations` block). Every tool below is identical
|
|
53
|
+
// on all four hints, and the values are the honest ones: each handler only runs
|
|
54
|
+
// SELECTs against the warehouse, which start() opens read-only (`new DatabaseSync(
|
|
55
|
+
// DB_FILE, { readOnly: true })`), and neither the handlers nor their helpers
|
|
56
|
+
// (readOnlyQuery, runQueue, runAtlas) write a file, spawn a process, or make a
|
|
57
|
+
// network call.
|
|
58
|
+
// readOnlyHint true - the tool modifies nothing;
|
|
59
|
+
// destructiveHint false - it performs no destructive update (moot while
|
|
60
|
+
// readOnlyHint is true, declared so the spec default
|
|
61
|
+
// `true` can never misrepresent these tools);
|
|
62
|
+
// idempotentHint true - repeated identical calls have no additional effect,
|
|
63
|
+
// there being no effect at all;
|
|
64
|
+
// openWorldHint false - a call touches only the local warehouse, a closed
|
|
65
|
+
// world; GitHub was read earlier by `hk refresh`, never
|
|
66
|
+
// live from a tool call.
|
|
67
|
+
// A tool that ever writes, shells out, or reaches the network must NOT reuse this.
|
|
68
|
+
const READ_ONLY = Object.freeze({
|
|
69
|
+
readOnlyHint: true,
|
|
70
|
+
destructiveHint: false,
|
|
71
|
+
idempotentHint: true,
|
|
72
|
+
openWorldHint: false,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const TOOLS = [
|
|
55
76
|
{
|
|
56
77
|
name: 'hk_summary',
|
|
78
|
+
annotations: READ_ONLY,
|
|
57
79
|
description: 'Portfolio totals for the newest snapshot: repo/issue/PR/workflow/finding counts.',
|
|
58
80
|
inputSchema: { type: 'object', properties: {} },
|
|
59
81
|
run: () => {
|
|
@@ -71,6 +93,7 @@ const TOOLS = [
|
|
|
71
93
|
},
|
|
72
94
|
{
|
|
73
95
|
name: 'hk_findings',
|
|
96
|
+
annotations: READ_ONLY,
|
|
74
97
|
description: 'Audit findings, optionally filtered. Omit all filters for counts grouped by code.',
|
|
75
98
|
inputSchema: {
|
|
76
99
|
type: 'object',
|
|
@@ -101,6 +124,7 @@ const TOOLS = [
|
|
|
101
124
|
},
|
|
102
125
|
{
|
|
103
126
|
name: 'hk_ci',
|
|
127
|
+
annotations: READ_ONLY,
|
|
104
128
|
description: 'CI health. Default lists repos whose DEFAULT BRANCH is red (the ones that matter).',
|
|
105
129
|
inputSchema: {
|
|
106
130
|
type: 'object',
|
|
@@ -137,6 +161,7 @@ const TOOLS = [
|
|
|
137
161
|
},
|
|
138
162
|
{
|
|
139
163
|
name: 'hk_repo',
|
|
164
|
+
annotations: READ_ONLY,
|
|
140
165
|
description: 'Everything known about one repo: metadata, findings, workflows, open PRs and issues.',
|
|
141
166
|
inputSchema: {
|
|
142
167
|
type: 'object',
|
|
@@ -158,6 +183,7 @@ const TOOLS = [
|
|
|
158
183
|
},
|
|
159
184
|
{
|
|
160
185
|
name: 'hk_backlog',
|
|
186
|
+
annotations: READ_ONLY,
|
|
161
187
|
description: 'Open pull requests or issues across the org, oldest first.',
|
|
162
188
|
inputSchema: {
|
|
163
189
|
type: 'object',
|
|
@@ -181,6 +207,7 @@ const TOOLS = [
|
|
|
181
207
|
},
|
|
182
208
|
{
|
|
183
209
|
name: 'hk_health',
|
|
210
|
+
annotations: READ_ONLY,
|
|
184
211
|
description: 'Per-repo health score (100 minus severity-weighted findings), worst first.',
|
|
185
212
|
inputSchema: { type: 'object', properties: { limit: int('default 25') } },
|
|
186
213
|
run: ({ limit = 25 }) => asTable(db.prepare(`
|
|
@@ -194,6 +221,7 @@ const TOOLS = [
|
|
|
194
221
|
},
|
|
195
222
|
{
|
|
196
223
|
name: 'hk_queue',
|
|
224
|
+
annotations: READ_ONLY,
|
|
197
225
|
description: 'A ranked remediation queue: every finding in the newest snapshot sorted into an '
|
|
198
226
|
+ 'actionable sweep lane (security-alerts, lockfile-cves, mainline-ci, atlas-rollout, '
|
|
199
227
|
+ 'workflow-rules, pr-backlog, repo-hygiene), grouped by repository (worst severity first) or, '
|
|
@@ -220,6 +248,7 @@ const TOOLS = [
|
|
|
220
248
|
},
|
|
221
249
|
{
|
|
222
250
|
name: 'hk_atlas',
|
|
251
|
+
annotations: READ_ONLY,
|
|
223
252
|
description: 'Fleet-wide Atlas rollout from the newest snapshot: the fleet target engine, how many '
|
|
224
253
|
+ 'active repositories carry a committed map versus none, and a breakdown by engine version. '
|
|
225
254
|
+ 'Set missing to list repositories with no map, behind to list maps older than the fleet engine '
|
|
@@ -244,6 +273,7 @@ const TOOLS = [
|
|
|
244
273
|
},
|
|
245
274
|
{
|
|
246
275
|
name: 'hk_cost',
|
|
276
|
+
annotations: READ_ONLY,
|
|
247
277
|
description: 'GitHub Actions spend. `scope` picks the grain: "repo" (the invoice, per repo), '
|
|
248
278
|
+ '"workflow" or "job" (computed from per-job durations). IMPORTANT: gross and net are '
|
|
249
279
|
+ 'different numbers. GitHub meters public repos at full price and discounts them to zero, '
|
|
@@ -303,6 +333,7 @@ const TOOLS = [
|
|
|
303
333
|
},
|
|
304
334
|
{
|
|
305
335
|
name: 'hk_sql',
|
|
336
|
+
annotations: READ_ONLY,
|
|
306
337
|
description: 'Read-only SQL against the warehouse. Tables: snapshot, repo, topic, language, '
|
|
307
338
|
+ 'issue, pull_request, release, workflow, workflow_run, file_presence, finding, collect_error, '
|
|
308
339
|
+ 'billing_usage, run_cost, run_cost_job, cost_reconciliation. '
|
|
@@ -318,6 +349,7 @@ const TOOLS = [
|
|
|
318
349
|
},
|
|
319
350
|
{
|
|
320
351
|
name: 'hk_schema',
|
|
352
|
+
annotations: READ_ONLY,
|
|
321
353
|
description: 'The warehouse schema - table and column names, for writing hk_sql queries.',
|
|
322
354
|
inputSchema: { type: 'object', properties: { table: str('one table, or omit for all') } },
|
|
323
355
|
run: ({ table }) => {
|
|
@@ -333,28 +365,63 @@ const TOOLS = [
|
|
|
333
365
|
},
|
|
334
366
|
];
|
|
335
367
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
368
|
+
/**
|
|
369
|
+
* The `tools/list` response: each tool's name, description, inputSchema and its
|
|
370
|
+
* four-hint `annotations` block. One source of truth, used by the server's
|
|
371
|
+
* ListTools handler and by the tests, so the two can never disagree about what
|
|
372
|
+
* the server advertises.
|
|
373
|
+
*/
|
|
374
|
+
export function listToolsResult(tools = TOOLS) {
|
|
375
|
+
return {
|
|
376
|
+
tools: tools.map((t) => ({
|
|
377
|
+
name: t.name,
|
|
378
|
+
description: t.description,
|
|
379
|
+
inputSchema: t.inputSchema,
|
|
380
|
+
annotations: t.annotations,
|
|
381
|
+
})),
|
|
382
|
+
};
|
|
383
|
+
}
|
|
344
384
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
try {
|
|
353
|
-
return { content: [{ type: 'text', text: tool.run(req.params.arguments ?? {}) }] };
|
|
354
|
-
} catch (e) {
|
|
355
|
-
return fail(e);
|
|
385
|
+
// Open the warehouse read-only, wire the two request handlers, serve over stdio.
|
|
386
|
+
// Only called when this file is run directly (the `hk-mcp` bin, `node src/mcp.mjs`),
|
|
387
|
+
// never on import -- that is what keeps the module testable without a database.
|
|
388
|
+
async function start() {
|
|
389
|
+
if (!existsSync(DB_FILE)) {
|
|
390
|
+
console.error(formatError(userError('NO_DATABASE', `no database at ${DB_FILE}`, 'run `hk refresh` first')));
|
|
391
|
+
process.exit(EXIT.USER);
|
|
356
392
|
}
|
|
357
|
-
});
|
|
393
|
+
db = new DatabaseSync(DB_FILE, { readOnly: true });
|
|
394
|
+
sid = () => db.prepare('SELECT MAX(id) AS id FROM snapshot').get().id;
|
|
395
|
+
try { META_REPOS = loadConfig().metaRepos; }
|
|
396
|
+
catch (e) { console.error(`[hk-mcp] ${formatError(e)} (using default metaRepos ${JSON.stringify(META_REPOS)})`); }
|
|
397
|
+
|
|
398
|
+
const version = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8')).version;
|
|
399
|
+
const server = new Server(
|
|
400
|
+
{ name: 'housekeeping', version },
|
|
401
|
+
{ capabilities: { tools: {} } },
|
|
402
|
+
);
|
|
403
|
+
|
|
404
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => listToolsResult(TOOLS));
|
|
405
|
+
|
|
406
|
+
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
407
|
+
const tool = TOOLS.find(t => t.name === req.params.name);
|
|
408
|
+
// Every failure is a structured result: { code, message, hint, retryable }.
|
|
409
|
+
// A bad argument or a failing query must never take the server down, and a
|
|
410
|
+
// stack trace is never sent to the caller.
|
|
411
|
+
const fail = e => ({ isError: true, content: [{ type: 'text', text: JSON.stringify(structured(e)) }] });
|
|
412
|
+
if (!tool) return fail(userError('UNKNOWN_TOOL', `unknown tool "${req.params.name}"`, `tools: ${TOOLS.map(t => t.name).join(', ')}`));
|
|
413
|
+
try {
|
|
414
|
+
return { content: [{ type: 'text', text: tool.run(req.params.arguments ?? {}) }] };
|
|
415
|
+
} catch (e) {
|
|
416
|
+
return fail(e);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
|
|
420
|
+
await server.connect(new StdioServerTransport());
|
|
421
|
+
console.error(`[hk-mcp] serving ${TOOLS.length} tools from ${DB_FILE}`);
|
|
422
|
+
}
|
|
358
423
|
|
|
359
|
-
|
|
360
|
-
|
|
424
|
+
// Run as the server only when invoked directly, the same guard scripts/export-public.mjs
|
|
425
|
+
// uses, so importing this module has no side effects.
|
|
426
|
+
const invokedDirectly = process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
427
|
+
if (invokedDirectly) await start();
|
package/src/workflow-risks.mjs
CHANGED
|
@@ -263,6 +263,23 @@ export function filterMatches(patterns, branch) {
|
|
|
263
263
|
return unknown ? null : 0;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
+
/**
|
|
267
|
+
* A `push:` trigger that fires on tags alone: it declares `tags`/`tags-ignore`
|
|
268
|
+
* and neither `branches` nor `branches-ignore`, so GitHub starts it only for a
|
|
269
|
+
* tag push and never for a branch push. A bare `push:` (null, `true`, or an
|
|
270
|
+
* empty map) fires on every branch and is NOT this.
|
|
271
|
+
*
|
|
272
|
+
* Such a trigger is already narrowed by its tag patterns, so the paths rule has
|
|
273
|
+
* nothing to say about it: a `paths:` filter would stop its tag releases from
|
|
274
|
+
* firing at all -- paths is a change filter and a tag push carries no changed
|
|
275
|
+
* file it can read -- which is why a tag-only push is not an ungated push.
|
|
276
|
+
*/
|
|
277
|
+
export function isTagOnlyPush(push) {
|
|
278
|
+
if (push == null || push === true || typeof push !== 'object' || Array.isArray(push)) return false;
|
|
279
|
+
if ('branches' in push || 'branches-ignore' in push) return false;
|
|
280
|
+
return 'tags' in push || 'tags-ignore' in push;
|
|
281
|
+
}
|
|
282
|
+
|
|
266
283
|
/**
|
|
267
284
|
* Can a push to `branch` start this workflow? 1, 0 or null.
|
|
268
285
|
*
|
|
@@ -274,9 +291,7 @@ export function filterMatches(patterns, branch) {
|
|
|
274
291
|
export function pushAdmitsBranch(push, branch) {
|
|
275
292
|
if (push == null || push === true || typeof push !== 'object' || Array.isArray(push)) return 1;
|
|
276
293
|
const hasBranches = 'branches' in push, hasIgnore = 'branches-ignore' in push;
|
|
277
|
-
if (!hasBranches && !hasIgnore)
|
|
278
|
-
return ('tags' in push || 'tags-ignore' in push) ? 0 : 1;
|
|
279
|
-
}
|
|
294
|
+
if (!hasBranches && !hasIgnore) return isTagOnlyPush(push) ? 0 : 1;
|
|
280
295
|
if (hasBranches) return filterMatches(push.branches, branch);
|
|
281
296
|
const ignored = filterMatches(push['branches-ignore'], branch);
|
|
282
297
|
return ignored === null ? null : ignored === 1 ? 0 : 1;
|