[F] Fix webhook uninstall

This commit is contained in:
2026-05-09 23:53:43 +00:00
parent 260f42b973
commit b0469d80a7
2 changed files with 147 additions and 1 deletions
+5 -1
View File
@@ -241,6 +241,7 @@ pub fn uninstall_webhooks(config: &Config, options: WebhookUninstallOptions) ->
style("Webhook group").cyan().bold(),
style(&mirror.name).bold()
);
let repo_filter = mirror.repo_filter()?;
for endpoint in &mirror.endpoints {
let site = config.site(&endpoint.site).unwrap();
let client = ProviderClient::new(site)?;
@@ -252,7 +253,10 @@ pub fn uninstall_webhooks(config: &Config, options: WebhookUninstallOptions) ->
let repos = client
.list_repos(endpoint)
.with_context(|| format!("failed to list repos for {}", endpoint.label()))?;
for repo in repos {
for repo in repos
.into_iter()
.filter(|repo| webhook_repo_matches(mirror, &repo_filter, repo))
{
tasks.push(WebhookUninstallTask {
group: mirror.name.clone(),
site: site.clone(),