Skip to content

Commit 74992cd

Browse files
authored
fix: add step-by-step instructions and direct URLs to drift report (#18)
When repository transfers are blocked due to missing permissions, the drift detection now shows: - Direct link to the repository's access settings page - Step-by-step instructions for granting admin access - Clear action items in the CI error output
1 parent 1435e7d commit 74992cd

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

scripts/detect-drift.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,14 @@ function formatDriftReport(drift, desiredCount, actualCount) {
127127
lines.push(` - **Ready for transfer** (once transfer automation is complete)`);
128128
} else {
129129
lines.push(` - ❌ **Permission Status**: ${permission.details}`);
130-
lines.push(` - **Action required**: Grant worlddriven admin access to ${repo.origin}`);
131-
lines.push(` - See REPOSITORIES.md for instructions on granting permissions`);
130+
lines.push(` - **Action required**: Grant worlddriven admin access to \`${repo.origin}\``);
131+
lines.push('');
132+
lines.push(' **How to grant access:**');
133+
lines.push(` 1. Go to https://github.com/${repo.origin}/settings/access`);
134+
lines.push(' 2. Click "Add people" or "Add teams"');
135+
lines.push(' 3. Search for "worlddriven" and select the organization');
136+
lines.push(' 4. Set permission level to **Admin**');
137+
lines.push(' 5. Send the invitation - worlddriven will auto-accept');
132138
}
133139
} else {
134140
lines.push(` - ⚠️ **Permission Status**: Not checked`);
@@ -258,7 +264,12 @@ async function main() {
258264
// Only fail CI if there are blocked transfers (missing permissions)
259265
if (blockedTransfers.length > 0) {
260266
console.error('\n❌ Error: Cannot proceed with repository transfer(s) - missing permissions');
261-
console.error(' Grant worlddriven admin access to the source repositories to unblock');
267+
console.error('');
268+
for (const repo of blockedTransfers) {
269+
console.error(` → ${repo.origin}: https://github.com/${repo.origin}/settings/access`);
270+
}
271+
console.error('');
272+
console.error(' Grant worlddriven "Admin" access at the URLs above to unblock this PR.');
262273
process.exit(1);
263274
}
264275

0 commit comments

Comments
 (0)