fix: skip ai review bot commits

This commit is contained in:
2026-05-15 14:00:59 +00:00
parent 09b7be2c40
commit 60f3a9beba
4 changed files with 47 additions and 7 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import { GITEA_SERVER_URL, GITEA_REPOSITORY, GITEA_TOKEN, PR_HEAD_BRANCH, FINDIN
const ACTION_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const GENERATED_SYNC_PATHS = [FINDINGS_PATH, '.gitea/ai-review/exclusions.json'];
const remoteUrl = `${GITEA_SERVER_URL.replace(/\/$/, '')}/${GITEA_REPOSITORY}.git`;
export const BOT_COMMIT_MARKER = '[ai-review-bot]';
export const SYNC_PATHS = [
'.amazonq/rules/triage-findings.md',
'.codex/skills/triage-findings/SKILL.md',
@@ -124,7 +125,7 @@ export async function commitAndPush(workspace, repoDir, _spawnSync = spawnSync,
return;
}
const out = run(['commit', '-m', 'chore: update ai-review findings [skip ci]'], repoDir);
const out = run(['commit', '-m', `chore: update ai-review findings ${BOT_COMMIT_MARKER}`], repoDir);
const commitHash = out.match(/\[.+ ([a-f0-9]+)\]/)?.[1] || 'unknown';
try {
run(['push', remoteUrl, PR_HEAD_BRANCH], repoDir, credEnv);