Skip to content

Commit 89a7e14

Browse files
authored
fix: make drift detection fail when transfer automation is not ready (#13)
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.
1 parent ca4719a commit 89a7e14

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

scripts/detect-drift.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,17 @@ async function main() {
227227
console.log(report);
228228

229229
// Exit with error code if drift detected (useful for CI)
230-
// Note: pendingTransfer is informational, not an error
230+
// Note: pendingTransfer blocks CI until transfer automation is implemented
231231
const hasDrift = drift.missing.length > 0 ||
232232
drift.extra.length > 0 ||
233233
drift.descriptionDiff.length > 0 ||
234-
drift.topicsDiff.length > 0;
234+
drift.topicsDiff.length > 0 ||
235+
drift.pendingTransfer.length > 0;
235236

236-
// Warn about pending transfers
237+
// Warn about pending transfers (causes CI to fail)
237238
if (drift.pendingTransfer.length > 0) {
238-
console.error('\n⚠️ Warning: Repository transfer feature is under development');
239-
console.error(' PRs with Origin field will be blocked until transfer automation is complete');
239+
console.error('\n❌ Error: Repository transfer feature is under development');
240+
console.error(' This PR will be blocked until transfer automation is complete');
240241

241242
// Check permission status
242243
const readyCount = drift.pendingTransfer.filter(

0 commit comments

Comments
 (0)