From 16f82f3ef6ed16afac61b207f3a867abf1a29be5 Mon Sep 17 00:00:00 2001 From: damocles Date: Wed, 2 Sep 2026 08:59:35 +0200 Subject: [PATCH] hive-forge: remove pr-blocked-by-issue hint now that the direction works --- hive-forge/src/verbs/dependency.rs | 37 +----------------------------- 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/hive-forge/src/verbs/dependency.rs b/hive-forge/src/verbs/dependency.rs index 7fc8205d..64a9d943 100644 --- a/hive-forge/src/verbs/dependency.rs +++ b/hive-forge/src/verbs/dependency.rs @@ -17,7 +17,7 @@ use forgejo_api::structs::IssueMeta; use serde_json::Value; use crate::client::{Client, index}; -use crate::verbs::{dependency_summaries, is_pr, print_json}; +use crate::verbs::{dependency_summaries, print_json}; #[derive(ClapArgs)] pub struct Args { @@ -152,10 +152,6 @@ fn apply_and_verify( "hive-forge: warning: dependency on #{dep} converged despite a reported \ error (server-side issue after the write, not a real failure): {e:#}" ); - } else if let Some(hint) = - pr_blocked_by_issue_hint(client, owner, name, number, dep, adding) - { - real_failures.push(format!("#{dep}: {e:#}\n {hint}")); } else { real_failures.push(format!("#{dep}: {e:#}")); } @@ -172,37 +168,6 @@ fn apply_and_verify( Ok(()) } -/// A hint appended to a genuine add-failure when it matches the one known -/// unsupported shape: a **PR** depending on a plain **issue**. -/// -/// Confirmed via the full four-way matrix against the live forge: -/// issue→issue and issue→PR both work, PR→issue 500s every time with the -/// edge genuinely absent on read-back. `hive-forge`'s own request is -/// identical across all four directions, so this is an upstream Forgejo -/// limitation, not a bug this client can route around — there is no other -/// side to add the edge from. Best-effort: the two extra classification -/// GETs are swallowed on error rather than obscuring the real failure with -/// a diagnostic-aid failure. -fn pr_blocked_by_issue_hint( - client: &Client, - owner: &str, - name: &str, - number: u64, - dep: u64, - adding: bool, -) -> Option<&'static str> { - if !adding { - return None; - } - let source_is_pr = is_pr(client, owner, name, number).ok()?; - let target_is_pr = is_pr(client, owner, name, dep).ok()?; - (source_is_pr && !target_is_pr).then_some( - "known limitation: a PR cannot be marked as depending on a plain issue (an upstream \ - Forgejo limitation, not a hive-forge bug). Record the hold as prose in the PR \ - body/comment instead; there's no dependency-edge mechanism for this direction.", - ) -} - /// Build the `IssueMeta` body the create/remove endpoints want. /// /// `owner`/`repo` are filled in with the *same* repo the request URL