From b6370f1a115f0bff328ae6709d30edc81b179ddb Mon Sep 17 00:00:00 2001 From: Tobias Wilken Date: Thu, 27 Nov 2025 21:40:47 +0100 Subject: [PATCH] fix: make drift detection fail when transfer automation is not ready MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update drift detection to fail CI checks when repositories with Origin field are present, since the transfer automation is not yet implemented. Previously, pending transfers were treated as "informational only" and the CI would pass even though the PR couldn't be executed. This was misleading because: - The repository doesn't exist in the org yet - The transfer can't be performed (API not implemented) - The PR represents actual drift that should block merging Changes: - Include pendingTransfer in hasDrift calculation - Update error messages to reflect blocking behavior - Change warning icon (⚠️) to error icon (❌) for clarity This ensures PRs with Origin field will properly fail CI until the transfer automation is complete, preventing confusion about whether the PR can actually be merged and executed. --- scripts/detect-drift.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/detect-drift.js b/scripts/detect-drift.js index 6d9dd54..ce0439a 100755 --- a/scripts/detect-drift.js +++ b/scripts/detect-drift.js @@ -227,16 +227,17 @@ async function main() { console.log(report); // Exit with error code if drift detected (useful for CI) - // Note: pendingTransfer is informational, not an error + // Note: pendingTransfer blocks CI until transfer automation is implemented const hasDrift = drift.missing.length > 0 || drift.extra.length > 0 || drift.descriptionDiff.length > 0 || - drift.topicsDiff.length > 0; + drift.topicsDiff.length > 0 || + drift.pendingTransfer.length > 0; - // Warn about pending transfers + // Warn about pending transfers (causes CI to fail) if (drift.pendingTransfer.length > 0) { - console.error('\n⚠️ Warning: Repository transfer feature is under development'); - console.error(' PRs with Origin field will be blocked until transfer automation is complete'); + console.error('\n❌ Error: Repository transfer feature is under development'); + console.error(' This PR will be blocked until transfer automation is complete'); // Check permission status const readyCount = drift.pendingTransfer.filter(