Compare commits

...
Author SHA1 Message Date
MervinPraison abe4667fb5 fix(merge-gate): raise Tools auto-merge size limit via gate-config
Tool + tests + docs PRs routinely exceed the 800-line UI default.
Make limits config-driven (2000 lines) and stop treating pyproject.toml
as a hard sensitive path so optional tool deps can auto-merge.
2026-07-09 10:02:53 +01:00
3 changed files with 11 additions and 5 deletions

No files matched your search

+4 -1
View File
@@ -5,10 +5,13 @@
module.exports = {
repoFullName: 'MervinPraison/PraisonAI-Tools',
productPathPrefixes: ['praisonai_tools/', 'tests/'],
// Workflows stay gated; pyproject.toml is normal for optional tool deps.
sensitivePathPatterns: [
/^\.github\/workflows\//,
/^pyproject\.toml$/,
],
// Tool + tests + docs routinely exceed the UI/SDK 800-line default.
maxAutoAdditions: 2000,
maxAutoFiles: 30,
requiredCheckPatterns: [/^ci$/i, /python/i, /test/i, /lint/i, /ruff/i],
ciWorkflowFile: 'ci.yml',
ciWorkflowName: 'CI',
+5 -2
View File
@@ -247,8 +247,11 @@ assert('product code with tests ok', mg.missingTestsReason([
{ filename: 'tests/test_x.py', additions: 10 },
]) === null);
// PR size
assert('large PR blocked', mg.prSizeReasons([{ additions: 900 }]).length > 0);
// PR size (threshold from gate-config; Tools allows larger tool+tests+docs PRs)
const sizeLimit = config.maxAutoAdditions ?? 800;
assert('under size limit ok', mg.prSizeReasons([{ additions: sizeLimit }]).length === 0);
assert('large PR blocked', mg.prSizeReasons([{ additions: sizeLimit + 1 }]).length > 0);
assert('typical tool PR under Tools limit', mg.prSizeReasons([{ additions: 1510 }]).length === 0);
assert('internal PR link accepted', mg.isInternalPullRequestLink(
{ base: { repo: { full_name: config.repoFullName } } },
+2 -2
View File
@@ -14,8 +14,8 @@ const STALE_FINAL_MAX_PER_WINDOW = 2;
const PUSH_AFTER_FINAL_DEBOUNCE_MS = 15 * 60 * 1000;
const ALLOWED_MERGE_STATES = new Set(['CLEAN', 'UNSTABLE']);
const AGENT_PY_MAX_AUTO_LINES = 100;
const PR_MAX_AUTO_ADDITIONS = 800;
const PR_MAX_AUTO_FILES = 30;
const PR_MAX_AUTO_ADDITIONS = config.maxAutoAdditions ?? 800;
const PR_MAX_AUTO_FILES = config.maxAutoFiles ?? 30;
const MANUAL_ONLY_LABELS = new Set(['security', 'breaking-change', 'needs-manual-review', 'release']);
const WORKFLOW_ONLY_LABEL = 'merge-gate-ci-only';
const CI_ONLY_PATH_PREFIXES = ['.github/workflows/', '.github/actions/', '.github/scripts/merge-gate'];