Skip to content
Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"drizzle:generate": "drizzle-kit generate",
"build:mcp": "npm --workspace @jsonbored/gittensory-mcp run build",
"test:mcp-pack": "node scripts/check-mcp-package.mjs",
"actionlint": "github-actionlint .github/workflows/*.yml",
"actionlint": "node scripts/actionlint.mjs",
"ui:dev": "npm run ui:preview",
"extension:build": "node scripts/build-extension.mjs",
"ui:build": "npm run ui:openapi && npm run extension:build && npm --workspace @jsonbored/gittensory-ui run build",
Expand Down
16 changes: 16 additions & 0 deletions scripts/actionlint.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { execFileSync } from "node:child_process";
import { readdirSync } from "node:fs";
import { join } from "node:path";

const workflowDir = ".github/workflows";
const files = readdirSync(workflowDir)
.filter((name) => name.endsWith(".yml") || name.endsWith(".yaml"))
.map((name) => join(workflowDir, name));

if (files.length === 0) {
console.error(`No workflow files found in ${workflowDir}`);
process.exit(1);
}

const bin = process.platform === "win32" ? "github-actionlint.cmd" : "github-actionlint";
execFileSync(bin, files, { stdio: "inherit", shell: process.platform === "win32" });
1 change: 0 additions & 1 deletion scripts/check-mcp-release-due.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { execFileSync, spawnSync } from "node:child_process";
import { readFileSync, writeFileSync } from "node:fs";
import { resolve } from "node:path";
Expand Down
2 changes: 0 additions & 2 deletions scripts/github-type-label.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env node

import { readFile } from "node:fs/promises";
import { pathToFileURL } from "node:url";

Expand Down
374 changes: 364 additions & 10 deletions src/github/commands.ts

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/queue/processors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ async function maybeProcessGittensoryMentionCommand(env: Env, deliveryId: string
repoFullName,
issue,
pullRequest: cachedPullRequest,
});
}, command.question);
const body = buildPublicAgentCommandComment({
command,
repo,
Expand Down Expand Up @@ -1044,6 +1044,7 @@ async function buildMentionCommandBundle(
issue: NonNullable<GitHubWebhookPayload["issue"]>;
pullRequest: Awaited<ReturnType<typeof getPullRequest>>;
},
question?: string | undefined,
) {
if (commandName === "help" || commandName === "miner-context") return null;
if (commandName === "blockers") return explainBlockersWithAgent(env, { login: context.login, repoFullName: context.repoFullName, surface: "github_comment" });
Expand All @@ -1053,7 +1054,10 @@ async function buildMentionCommandBundle(
login: context.login,
repoFullName: context.repoFullName,
surface: "github_comment",
objective: `Respond to @gittensory ${commandName} for ${context.repoFullName}#${context.issue.number}.`,
objective:
commandName === "ask" && question && question.trim().length > 0
? `Respond to @gittensory ask for ${context.repoFullName}#${context.issue.number}. Question: ${question.trim().slice(0, 280)}`
: `Respond to @gittensory ${commandName} for ${context.repoFullName}#${context.issue.number}.`,
});
}

Expand Down
5 changes: 5 additions & 0 deletions test/unit/eligibility-scenarios.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ describe("reopened-link — linked issue is raw (unvalidated, needs evidence)",
const codes = result.blockedBy.map((b) => b.code);
expect(codes).toContain("linked_issue_unvalidated");
});

it("cleanup path covers unvalidated linked-issue sync guidance", () => {
const plan = deriveEligibilityPlan(result);
expect(plan.cleanupPaths.join(" ")).toMatch(/solved-by-PR evidence|official mirror to sync/i);
});
});

// ── Fixture: plausible and unavailable link statuses ───────────────────────
Expand Down
Loading