mirror of
https://github.com/multipleof4/gitea-github-cron.git
synced 2026-03-17 02:11:00 +00:00
Feat: Sync repo visibility changes from GitHub to Gitea
This commit is contained in:
@@ -88,6 +88,9 @@ const getPages = async (url) => {
|
|||||||
mirror_prune: true
|
mirror_prune: true
|
||||||
};
|
};
|
||||||
await req(`${G_API}/repos/migrate`, headers.GT, 'POST', payload);
|
await req(`${G_API}/repos/migrate`, headers.GT, 'POST', payload);
|
||||||
|
} else if (exists.private !== r.private) {
|
||||||
|
console.log(`Updating visibility: ${owner}/${r.name} → ${r.private ? 'private' : 'public'}`);
|
||||||
|
await req(`${G_API}/repos/${owner}/${r.name}`, headers.GT, 'PATCH', { private: r.private });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(`Failed to mirror ${r.owner.login}/${r.name}:`, e.message);
|
console.error(`Failed to mirror ${r.owner.login}/${r.name}:`, e.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user