denoland/deno · error · AnyError
Failed to find CI runs for branch '{branch}': {stderr}
Error message
Failed to find CI runs for branch '{branch}': {stderr} What it means
For branch installs Deno runs `gh run list --branch <branch> ...` (limited to 5 runs, JSON databaseIds) to collect CI run IDs. If that gh command exits non-zero, Deno bails with the branch name and gh's stderr. The stderr distinguishes a bad branch name from auth/network failures.
Source
Thrown at cli/tools/upgrade.rs:870
"--repo",
"denoland/deno",
"--branch",
branch,
"--workflow",
"ci",
"--limit",
"5",
"--json",
"databaseId",
"-q",
".[].databaseId",
])
.output()
.context("failed to query CI runs")?;
if !runs_output.status.success() {
let stderr = String::from_utf8_lossy(&runs_output.stderr);
bail!("Failed to find CI runs for branch '{branch}': {stderr}");
}
let run_ids: Vec<String> = String::from_utf8_lossy(&runs_output.stdout)
.trim()
.lines()
.filter(|l| !l.is_empty())
.map(|s| s.to_string())
.collect();
if run_ids.is_empty() {
bail!(
"No CI runs found for branch '{branch}'. \
CI may not have run yet."
);
}
let temp_dir =
tempfile::TempDir::new().context("failed to create temporary directory")?;View on GitHub (pinned to 9ad36f7a2c)
Solutions
- Re-run `gh run list --branch <branch> --repo denoland/deno --limit 5` manually and read the stderr echoed in the error.
- Fix the branch name (check it exists: `git ls-remote --heads https://github.com/denoland/deno`).
- Authenticate gh (`gh auth login`) or refresh an expired token.
- Fix network/proxy access to GitHub if that is what stderr indicates.
Defensive patterns
Strategy: try-catch
Validate before calling
git ls-remote --heads https://github.com/denoland/deno "refs/heads/$BRANCH" | grep -q . || { echo "branch not found"; exit 1; }
gh run list --branch "$BRANCH" --repo denoland/deno --limit 1 >/dev/null || gh auth login
deno upgrade --branch "$BRANCH" Try / catch
if ! deno upgrade --branch "$BRANCH" 2>err.log; then grep -q 'Failed to find CI runs' err.log && cat err.log; fi
Prevention
- Verify the branch exists on denoland/deno before upgrading from it.
- Keep gh authenticated; surface its stderr — it names the true cause.
- Watch for deleted/renamed branches when copying names.
When it happens
Trigger: `deno upgrade` from a branch that does not exist in denoland/deno; gh unauthenticated/expired token; GitHub API unreachable; an old gh version that does not support the flags used.
Common situations: Typos in branch names; referencing a remote branch that was deleted or renamed; running in CI where gh is installed but has no token; proxies blocking api.github.com.
Related errors
- Failed to find PR #{pr_number}: {stderr}
- The `gh` CLI is required for installing from a branch. Insta
- No CI runs found for branch '{branch}'. CI may not have run
- The `gh` CLI is required for installing from a PR. Install i
- No CI runs found for PR #{pr_number}. The PR may not have be
AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20).
Data as JSON: /api/errors/348c5767d7965b96.
Report an issue: GitHub.