Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(ci-status): experimental Gitea CI-status detection (#2702)
Maximilian Roosbfb117a665bd
diff --git a/src/commands/config/mod.rs b/src/commands/config/mod.rsindex 59d4d12ad..694421abb 100644--- a/src/commands/config/mod.rs+++ b/src/commands/config/mod.rs@@ -190,6 +190,16 @@ mod tests {render_ci_tool_status(&mut out, "gh", "GitHub", true, false).unwrap();assert_snapshot!(out, @"[33m▲[39m [33m[1mgh[22m installed but not authenticated; run [1mgh auth login[22m[39m");+ // The auth-setup command differs by CLI: `tea` uses `tea login add`,+ // `az` uses `az login`, the rest use `<tool> auth login`.+ let mut out = String::new();+ render_ci_tool_status(&mut out, "tea", "Gitea", true, false).unwrap();+ assert_snapshot!(out, @"[33m▲[39m [33m[1mtea[22m installed but not authenticated; run [1mtea login add[22m[39m");++ let mut out = String::new();+ render_ci_tool_status(&mut out, "az", "Azure DevOps", true, false).unwrap();+ assert_snapshot!(out, @"[33m▲[39m [33m[1maz[22m installed but not authenticated; run [1maz login[22m[39m");+// Not installedlet mut out = String::new();render_ci_tool_status(&mut out, "glab", "GitLab", false, false).unwrap();diff --git a/src/commands/config/show.rs b/src/commands/config/show.rsindex fce939c8e..420015b5a 100644--- a/src/commands/config/show.rs+++ b/src/commands/config/show.rs@@ -377,6 +377,16 @@ fn render_diagnostics(out: &mut String) -> anyhow::Result<()> {ci_tools.glab_authenticated,)?;}+ Some(CiPlatform::Gitea) => {+ let ci_tools = CiToolsStatus::detect(None);+ render_ci_tool_status(+ out,+ "tea",+ "Gitea",+ ci_tools.tea_installed,+ ci_tools.tea_authenticated,+ )?;+ }Some(CiPlatform::AzureDevOps) => {let ci_tools = CiToolsStatus::detect(None);render_ci_tool_status(@@ -391,7 +401,7 @@ fn render_diagnostics(out: &mut String) -> anyhow::Result<()> {writeln!(out,"{}",- hint_message("CI status requires GitHub, GitLab, or Azure DevOps remote")+ hint_message("CI status requires GitHub, GitLab, Gitea, or Azure DevOps remote"))?;}}@@ -1256,11 +1266,18 @@ pub(super) fn render_ci_tool_status(success_message(cformat!("<bold>{tool}</> installed & authenticated")))?;} else {+ // The auth-setup command differs by CLI: `gh`/`glab` use+ // `<tool> auth login`, `az` uses `az login`, `tea` uses `tea login add`.+ let auth_command = match tool {+ "az" => format!("{tool} login"),+ "tea" => format!("{tool} login add"),+ _ => format!("{tool} auth login"),+ };writeln!(out,"{}",warning_message(cformat!(- "<bold>{tool}</> installed but not authenticated; run <bold>{tool} auth login</>"+ "<bold>{tool}</> installed but not authenticated; run <bold>{auth_command}</>")))?;}diff --git a/src/commands/list/ci_status/gitea.rs b/src/commands/list/ci_status/gitea.rsnew file mode 100644index 000000000..e7053e87d--- /dev/null+++ b/src/commands/list/ci_status/gitea.rs@@ -0,0 +1,250 @@+//! Gitea CI status detection.+//!+//! Detects CI status from Gitea pull requests and commit statuses using the+//! `tea` CLI. Gitea's API is GitHub-compatible:+//!+//! - `GET /repos/{owner}/{repo}/commits/{sha}/status` returns a *combined*+//! commit status (`state` + `total_count`). Both Gitea Actions and external+//! CI report into commit statuses, so this is the pass/fail/pending rollup —+//! the equivalent of GitHub's check-runs API.+//! - `GET /repos/{owner}/{repo}/pulls?state=open` lists open PRs (the `state`+//! filter is required — the endpoint returns *all* states by default); each+//! PR carries `mergeable`, which surfaces merge conflicts.+//!+//! ## Two paths (mirrors [`super::azure`])+//!+//! - [`detect_gitea_pr`] — finds an open PR whose head branch matches, surfaces+//! conflicts from `mergeable` and the real CI state from the PR head commit's+//! combined status, and yields the PR's `html_url` for the clickable+//! indicator.+//! - [`detect_gitea_commit_status`] — the branch fallback when no PR exists:+//! queries the combined status of the local HEAD SHA.+//!+//! When a PR exists, two API calls are made (pulls list + combined status);+//! results are cached for 30–60s by the caller, so `wt list` over many branches+//! doesn't refetch.+//!+//! ## Known limitations (experimental)+//!+//! - Only the first page of open PRs (Gitea's default page size, newest-first)+//! is inspected; in a repo with many open PRs, ours could fall off the page.+//! - The PR lookup queries the primary remote's repo only, so PRs opened from a+//! fork (head repo owner ≠ that repo's owner) aren't matched.+//! - `mergeable` is computed asynchronously by Gitea, so a freshly-opened PR can+//! briefly report a false conflict until the check completes (self-corrects+//! when the cache expires).++use serde::Deserialize;+use std::process::Output;+use worktrunk::git::{Repository, parse_owner_repo};++use super::{+ CiBranchName, CiSource, CiStatus, PrStatus, is_retriable_error, non_interactive_cmd, parse_json,+};++/// Resolve `(owner, repo)` for this repo's Gitea remote.+///+/// Platform is already known to be Gitea, so we extract owner/repo from the+/// primary remote's raw URL (not the `insteadOf`-rewritten one — `tea` talks to+/// the upstream host, not a local alias target) without re-checking the host.+/// Mirrors `git::remote_ref::gitea`'s resolution for the `pr:` shortcut.+fn gitea_owner_repo(repo: &Repository) -> Option<(String, String)> {+ let remote = repo.primary_remote().ok()?;+ let url = repo.remote_url(&remote)?;+ parse_owner_repo(&url)+}++/// Run `tea api <path>` from the worktree root.+///+/// `is_tool_available` has already confirmed `tea` is on PATH, so a spawn+/// failure here is an OS-level edge case — fall through to `None` (no CI status+/// for this branch) rather than logging.+fn tea_api(repo: &Repository, path: &str) -> Option<Output> {+ let repo_root = repo.current_worktree().root().ok()?;+ non_interactive_cmd("tea")+ .args(["api", path])+ .current_dir(&repo_root)+ .run()+ .ok()+}++/// Combine stderr and stdout for retriable-error sniffing. `tea` reports API+/// errors as a JSON `{"message": "..."}` on stdout, but transport errors land+/// on stderr — check both.+fn error_text(output: &Output) -> String {+ format!(+ "{}{}",+ String::from_utf8_lossy(&output.stderr),+ String::from_utf8_lossy(&output.stdout)+ )+}++/// Fetch the combined CI status for a commit SHA.+///+/// Returns `Some(CiStatus::Error)` for retriable failures (rate limit, network),+/// `None` when the commit has no statuses or the call fails non-retriably.+fn fetch_combined_status(+ repo: &Repository,+ owner: &str,+ repo_name: &str,+ sha: &str,+) -> Option<CiStatus> {+ let path = format!("repos/{owner}/{repo_name}/commits/{sha}/status");+ let output = tea_api(repo, &path)?;+ if !output.status.success() {+ return is_retriable_error(&error_text(&output)).then_some(CiStatus::Error);+ }+ let combined: GiteaCombinedStatus = parse_json(&output.stdout, "tea api commit status", sha)?;+ if combined.total_count == 0 {+ return None;+ }+ parse_gitea_status_state(&combined.state)+}++/// Detect Gitea PR CI status for a branch.+///+/// Lists open PRs (`tea api repos/{owner}/{repo}/pulls?state=open`), finds the+/// one whose head branch matches `branch.name`, then reports conflicts+/// (`mergeable`) and the head commit's combined CI status.+pub(super) fn detect_gitea_pr(+ repo: &Repository,+ branch: &CiBranchName,+ local_head: &str,+) -> Option<PrStatus> {+ let (owner, repo_name) = gitea_owner_repo(repo)?;++ // `state=open` is required: the pulls list returns all states by default.+ let path = format!("repos/{owner}/{repo_name}/pulls?state=open");+ let output = tea_api(repo, &path)?;+ if !output.status.success() {+ return is_retriable_error(&error_text(&output)).then(PrStatus::error);+ }++ let prs: Vec<GiteaPr> = parse_json(&output.stdout, "tea api pulls", &branch.full_name)?;++ // Match by head branch name; require the head repo owner (when present) to+ // be the repo we queried — same-repo PRs only, since this branch looks at+ // the primary remote alone (fork PRs are out of scope). A missing owner is+ // treated as a potential match, as in the GitHub path.+ let pr = prs.iter().find(|pr| {+ pr.head.ref_name == branch.name+ && pr+ .head+ .repo+ .as_ref()+ .map(|r| r.owner.login.eq_ignore_ascii_case(&owner))+ .unwrap_or(true)+ })?;++ let base_status = fetch_combined_status(+ repo,+ &owner,+ &repo_name,+ pr.head.sha.as_deref().unwrap_or(local_head),+ )+ .unwrap_or(CiStatus::NoCI);+ let ci_status = if pr.mergeable == Some(false) {+ CiStatus::Conflicts+ } else {+ base_status+ };++ let is_stale = pr+ .head+ .sha+ .as_deref()+ .map(|sha| sha != local_head)+ .unwrap_or(false);++ Some(PrStatus {+ ci_status,+ source: CiSource::PullRequest,+ is_stale,+ url: Some(pr.html_url.clone()),+ })+}++/// Detect Gitea CI status for a branch's HEAD commit (fallback when no PR).+///+/// Queries the combined commit status of `local_head` directly, so the result+/// is never stale.+pub(super) fn detect_gitea_commit_status(repo: &Repository, local_head: &str) -> Option<PrStatus> {+ let (owner, repo_name) = gitea_owner_repo(repo)?;+ let ci_status = fetch_combined_status(repo, &owner, &repo_name, local_head)?;+ Some(PrStatus {+ ci_status,+ source: CiSource::Branch,+ is_stale: false,+ url: None,+ })+}++/// Map a Gitea combined-status `state` to [`CiStatus`].+///+/// Gitea collapses the per-commit statuses into one combined value — in+/// practice `success` / `pending` / `failure` (a status-less commit reports+/// `pending`, which the caller already excludes via `total_count == 0`).+/// `error` and `warning` are per-status values handled defensively in case a+/// Gitea version surfaces them here; unknown values map to `None`.+fn parse_gitea_status_state(state: &str) -> Option<CiStatus> {+ match state {+ "success" => Some(CiStatus::Passed),+ "pending" => Some(CiStatus::Running),+ "failure" | "error" | "warning" => Some(CiStatus::Failed),+ _ => None,+ }+}++/// Combined commit status from `GET /repos/{owner}/{repo}/commits/{ref}/status`.+#[derive(Debug, Deserialize)]+struct GiteaCombinedStatus {+ #[serde(default)]+ state: String,+ #[serde(default)]+ total_count: u32,+}++/// A pull request from `GET /repos/{owner}/{repo}/pulls`.+#[derive(Debug, Deserialize)]+struct GiteaPr {+ #[serde(default)]+ mergeable: Option<bool>,+ html_url: String,+ head: GiteaPrBranch,+}++#[derive(Debug, Deserialize)]+struct GiteaPrBranch {+ #[serde(rename = "ref", default)]+ ref_name: String,+ #[serde(default)]+ sha: Option<String>,+ #[serde(default)]+ repo: Option<GiteaPrRepo>,+}++#[derive(Debug, Deserialize)]+struct GiteaPrRepo {+ owner: GiteaOwner,+}++#[derive(Debug, Deserialize)]+struct GiteaOwner {+ login: String,+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn test_parse_gitea_status_state() {+ assert_eq!(parse_gitea_status_state("success"), Some(CiStatus::Passed));+ assert_eq!(parse_gitea_status_state("pending"), Some(CiStatus::Running));+ assert_eq!(parse_gitea_status_state("failure"), Some(CiStatus::Failed));+ assert_eq!(parse_gitea_status_state("error"), Some(CiStatus::Failed));+ assert_eq!(parse_gitea_status_state("warning"), Some(CiStatus::Failed));+ assert_eq!(parse_gitea_status_state(""), None);+ assert_eq!(parse_gitea_status_state("bogus"), None);+ }+}diff --git a/src/commands/list/ci_status/mod.rs b/src/commands/list/ci_status/mod.rsindex 5ab229df2..da8a1def5 100644--- a/src/commands/list/ci_status/mod.rs+++ b/src/commands/list/ci_status/mod.rs@@ -1,11 +1,13 @@-//! CI status detection for GitHub, GitLab, and Azure DevOps.+//! CI status detection for GitHub, GitLab, Gitea, and Azure DevOps.//!//! This module provides CI status detection by querying GitHub PRs/workflows,-//! GitLab MRs/pipelines, and Azure DevOps PRs/pipelines using their respective-//! CLI tools (`gh`, `glab`, and `az`).+//! GitLab MRs/pipelines, Gitea PRs/commit-statuses, and Azure DevOps+//! PRs/pipelines using their respective CLI tools (`gh`, `glab`, `tea`, and+//! `az`).mod azure;mod cache;+mod gitea;mod github;mod gitlab;mod platform;@@ -155,6 +157,10 @@ pub struct CiToolsStatus {pub glab_installed: bool,/// glab is installed and authenticatedpub glab_authenticated: bool,+ /// tea is installed (can run --version)+ pub tea_installed: bool,+ /// tea is installed and has a login configured+ pub tea_authenticated: bool,/// az is installed (can run --version)pub az_installed: bool,/// az is installed and authenticated (logged in)@@ -177,6 +183,11 @@ impl CiToolsStatus {} else {tool_available("glab", &["auth", "status"])};+ let tea_installed = tool_available("tea", &["--version"]);+ // `tea` stores logins in its config file; reading it (rather than+ // invoking `tea`) avoids the OAuth-refresh side effect a `tea` lookup+ // can trigger. See `git::remote_ref::gitea`.+ let tea_authenticated = tea_installed && worktrunk::git::remote_ref::gitea::has_any_login();let az_installed = tool_available("az", &["--version"]);// `az account show` exits non-zero when logged out — works whether or not// the azure-devops extension is installed.@@ -186,6 +197,8 @@ impl CiToolsStatus {gh_authenticated,glab_installed,glab_authenticated,+ tea_installed,+ tea_authenticated,az_installed,az_authenticated,}@@ -313,7 +326,7 @@ impl PrStatus {}}- /// Detect CI status for a branch using gh/glab CLI+ /// Detect CI status for a branch using the forge CLI (`gh`/`glab`/`tea`/`az`)/// First tries to find PR/MR status, then falls back to workflow/pipeline runs/// Returns None if no CI found or CLI tools unavailable///diff --git a/src/commands/list/ci_status/platform.rs b/src/commands/list/ci_status/platform.rsindex 0b1e35a52..4a7f80a09 100644--- a/src/commands/list/ci_status/platform.rs+++ b/src/commands/list/ci_status/platform.rs@@ -1,16 +1,16 @@//! Forge dispatch for CI status detection.//!//! Given a [`CiPlatform`] (resolved by [`Repository::ci_platform`]), routes to-//! the GitHub (`gh`), GitLab (`glab`), or Azure DevOps (`az`) backend and-//! checks whether that CLI is installed.+//! the GitHub (`gh`), GitLab (`glab`), Gitea (`tea`), or Azure DevOps (`az`)+//! backend and checks whether that CLI is installed.use std::sync::OnceLock;use worktrunk::git::{CiPlatform, Repository};-use super::{CiBranchName, PrStatus, azure, github, gitlab, tool_available};+use super::{CiBranchName, PrStatus, azure, gitea, github, gitlab, tool_available};-/// Cached availability of CI CLI tools (`gh`, `glab`, `az`).+/// Cached availability of CI CLI tools (`gh`, `glab`, `tea`, `az`).////// Probed once on first access via a `--version` check.static CI_TOOLS: OnceLock<CiToolsAvailable> = OnceLock::new();@@ -18,6 +18,7 @@ static CI_TOOLS: OnceLock<CiToolsAvailable> = OnceLock::new();struct CiToolsAvailable {gh: bool,glab: bool,+ tea: bool,az: bool,}@@ -26,6 +27,7 @@ impl CiToolsAvailable {CI_TOOLS.get_or_init(|| Self {gh: tool_available("gh", &["--version"]),glab: tool_available("glab", &["--version"]),+ tea: tool_available("tea", &["--version"]),az: tool_available("az", &["--version"]),})}@@ -36,6 +38,7 @@ fn is_tool_available(platform: CiPlatform) -> bool {match platform {CiPlatform::GitHub => CiToolsAvailable::get().gh,CiPlatform::GitLab => CiToolsAvailable::get().glab,+ CiPlatform::Gitea => CiToolsAvailable::get().tea,CiPlatform::AzureDevOps => CiToolsAvailable::get().az,}}@@ -50,6 +53,7 @@ fn detect_pr_mr(match platform {CiPlatform::GitHub => github::detect_github(repo, branch, local_head),CiPlatform::GitLab => gitlab::detect_gitlab(repo, branch, local_head),+ CiPlatform::Gitea => gitea::detect_gitea_pr(repo, branch, local_head),CiPlatform::AzureDevOps => azure::detect_azure_pr(repo, branch, local_head),}}@@ -65,6 +69,8 @@ fn detect_branch(CiPlatform::GitHub => github::detect_github_commit_checks(repo, branch, local_head),// GitLab pipelines use the bare branch name (not "origin/feature").CiPlatform::GitLab => gitlab::detect_gitlab_pipeline(repo, &branch.name, local_head),+ // Gitea queries the combined commit status by SHA — branch-independent.+ CiPlatform::Gitea => gitea::detect_gitea_commit_status(repo, local_head),CiPlatform::AzureDevOps => azure::detect_azure_pipeline(repo, &branch.name, local_head),}}diff --git a/src/config/project.rs b/src/config/project.rsindex 0dc20af9c..3b25dd9cf 100644--- a/src/config/project.rs+++ b/src/config/project.rs@@ -53,7 +53,8 @@ pub struct ProjectListConfig {pub struct ProjectCiConfig {/// CI platform. When unset, the platform is detected from the remote URL.///- /// Values: "github" or "gitlab"+ /// Deprecated alias for `[forge].platform`; same accepted values+ /// ("github", "gitlab", "gitea", "azure-devops").#[serde(default)]pub platform: Option<String>,}@@ -76,8 +77,9 @@ pub struct ProjectForgeConfig {/// Forge platform. When unset, the platform is detected from the remote URL.////// Values: "github", "gitlab", "gitea" (experimental), or "azure-devops"- /// (experimental). The `wt switch pr:` shortcut uses `forge.platform` to- /// decide which CLI to invoke (`gh`, `glab`, `tea`, or `az`).+ /// (experimental). Both the `wt switch pr:` shortcut and `wt list --full`+ /// CI status detection use `forge.platform` to pick the forge CLI (`gh`,+ /// `glab`, `tea`, or `az`).#[serde(default)]pub platform: Option<String>,diff --git a/src/git/ci_platform.rs b/src/git/ci_platform.rsindex 255a118ed..116a4e57b 100644--- a/src/git/ci_platform.rs+++ b/src/git/ci_platform.rs@@ -1,9 +1,9 @@//! CI platform identification.//!-//! [`CiPlatform`] names the forge a repository's CI runs on (GitHub, GitLab, or-//! Azure DevOps). It comes from project config (`forge.platform`, or the-//! deprecated `ci.platform`) when set, otherwise from the remote URL host — see-//! [`Repository::ci_platform`].+//! [`CiPlatform`] names the forge a repository's CI runs on (GitHub, GitLab,+//! Gitea, or Azure DevOps). It comes from project config (`forge.platform`, or+//! the deprecated `ci.platform`) when set, otherwise from the remote URL host —+//! see [`Repository::ci_platform`].use crate::git::{GitRemoteUrl, Repository};@@ -17,17 +17,22 @@ use crate::git::{GitRemoteUrl, Repository};pub enum CiPlatform {GitHub,GitLab,+ /// Experimental — Gitea CI status via the `tea` CLI.+ Gitea,#[strum(serialize = "azure-devops", serialize = "azuredevops")]AzureDevOps,}-/// Identify the CI platform from a remote URL host ("github" / "gitlab" / Azure DevOps).+/// Identify the CI platform from a remote URL host ("github" / "gitlab" /+/// "gitea" / Azure DevOps).fn platform_from_url(url: &str) -> Option<CiPlatform> {let parsed = GitRemoteUrl::parse(url)?;if parsed.is_github() {Some(CiPlatform::GitHub)} else if parsed.is_gitlab() {Some(CiPlatform::GitLab)+ } else if parsed.is_gitea() {+ Some(CiPlatform::Gitea)} else if parsed.is_azure_devops() {Some(CiPlatform::AzureDevOps)} else {@@ -72,10 +77,9 @@ impl Repository {/// The CI platform set in project config (`forge.platform` / `ci.platform`).///- /// `None` when unset, set to `gitea` (a valid `forge.platform` for `wt- /// switch pr:`, but one worktrunk doesn't fetch CI status from), or- /// unrecognized. Resolved once per repository handle, so an unrecognized- /// value warns a single time rather than once per branch `wt list` probes.+ /// `None` when unset or unrecognized. Resolved once per repository handle,+ /// so an unrecognized value warns a single time rather than once per branch+ /// `wt list` probes.fn configured_ci_platform(&self) -> Option<CiPlatform> {*self.cache.configured_ci_platform.get_or_init(|| {let raw = self@@ -84,23 +88,18 @@ impl Repository {.flatten()?.forge_platform().map(str::to_string)?;- if let Ok(platform) = raw.parse::<CiPlatform>() {- log::debug!("Using CI platform from config: {platform}");- return Some(platform);+ match raw.parse::<CiPlatform>() {+ Ok(platform) => {+ log::debug!("Using CI platform from config: {platform}");+ Some(platform)+ }+ Err(_) => {+ log::warn!(+ "Invalid CI platform in config: '{raw}'. Expected 'github', 'gitlab', 'gitea', or 'azure-devops'."+ );+ None+ }}- // `gitea` is a valid `forge.platform` (the `wt switch pr:` shortcut- // uses it), but worktrunk fetches CI status only from GitHub and- // GitLab — so it's "no CI status here", not a misconfiguration.- if raw.eq_ignore_ascii_case("gitea") {- log::debug!(- "forge.platform is 'gitea'; CI status is shown for GitHub and GitLab only"- );- return None;- }- log::warn!(- "Invalid CI platform in config: '{raw}'. Expected 'github', 'gitlab', or 'azure-devops'."- );- None})}}@@ -119,6 +118,7 @@ mod tests {"gitlab".parse::<CiPlatform>().ok(),Some(CiPlatform::GitLab));+ assert_eq!("gitea".parse::<CiPlatform>().ok(), Some(CiPlatform::Gitea));// Azure DevOps accepts both spellings; `azure-devops` is canonical.assert_eq!("azure-devops".parse::<CiPlatform>().ok(),@@ -162,6 +162,14 @@ mod tests {assert_eq!(platform_from_url(url), Some(CiPlatform::GitLab), "{url}");}+ // Gitea — gitea.com and self-hosted instances with "gitea" in the host.+ for url in [+ "https://gitea.com/owner/repo.git",+ "[email protected]:owner/repo.git",+ ] {+ assert_eq!(platform_from_url(url), Some(CiPlatform::Gitea), "{url}");+ }+// Azure DevOps — HTTPS, SSH, and the legacy visualstudio.com host.for url in ["https://dev.azure.com/myorg/myproject/_git/myrepo",@@ -175,7 +183,8 @@ mod tests {);}- // Unknown forges.+ // Unknown forges (a Gitea/Forgejo host without "gitea" in the name+ // needs an explicit `forge.platform` override).assert_eq!(platform_from_url("https://bitbucket.org/owner/repo.git"),Nonediff --git a/src/git/remote_ref/gitea.rs b/src/git/remote_ref/gitea.rsindex 8dda7476f..23ff21b15 100644--- a/src/git/remote_ref/gitea.rs+++ b/src/git/remote_ref/gitea.rs@@ -295,6 +295,28 @@ fn config_has_login_for(content: &str, target: &str) -> bool {})}+/// Whether `tea` has *any* login configured (host-agnostic).+///+/// Used by `wt config show` diagnostics to report Gitea auth status when the+/// caller has no specific host in hand. Like [`is_authed_for`], reads tea's+/// config file directly rather than invoking `tea` (which can trigger an OAuth+/// refresh on lookup).+pub fn has_any_login() -> bool {+ read_tea_config().is_some_and(|content| content_has_any_login(&content))+}++/// Pure parser: true if any line is a `url:` entry carrying an http(s) URL.+/// Mirrors the line shape `config_has_login_for` matches, minus the host check.+fn content_has_any_login(content: &str) -> bool {+ content.lines().any(|line| {+ let Some(rest) = line.trim_start().strip_prefix("url:") else {+ return false;+ };+ let value = rest.trim().trim_matches(|c: char| c == '"' || c == '\'');+ value.starts_with("https://") || value.starts_with("http://")+ })+}+/// Read tea's config.yml, honoring `$XDG_CONFIG_HOME` and the legacy/// `~/.tea/tea.yml` fallback. Returns None if neither file is readable.fn read_tea_config() -> Option<String> {@@ -513,4 +535,21 @@ mod tests {// by asserting the tea-shaped scheme-prefixed form is required.assert!(!config_has_login_for("url: gitea.com\n", "gitea.com"));}++ #[test]+ fn test_content_has_any_login() {+ let yaml = r#"logins:+ - name: gitea-com+ url: https://gitea.com+ default: true+"#;+ assert!(content_has_any_login(yaml));+ assert!(content_has_any_login(+ " url: \"http://forge.example.com/\"\n"+ ));+ // No logins / no scheme-prefixed url.+ assert!(!content_has_any_login(""));+ assert!(!content_has_any_login("logins: []\n"));+ assert!(!content_has_any_login("url: gitea.com\n"));+ }}diff --git a/src/testing/mod.rs b/src/testing/mod.rsindex 7fe73bc31..d718ceda7 100644--- a/src/testing/mod.rs+++ b/src/testing/mod.rs@@ -1665,6 +1665,21 @@ impl TestRepo {self.mock_bin_path = Some(mock_bin);}+ /// Add a mock `tea` (installed, no login) to the existing mock bin.+ ///+ /// Call this after `setup_mock_ci_tools_unauthenticated()` to make+ /// `wt config show --full` against a Gitea remote deterministic — the+ /// Gitea diagnostics row only depends on `tea`'s state.+ pub fn setup_mock_tea_installed(&mut self) {+ let mock_bin = self+ .mock_bin_path+ .as_ref()+ .expect("call setup_mock_ci_tools_unauthenticated() first");+ MockConfig::new("tea")+ .version("tea version development (mock)")+ .write(mock_bin);+ }+/// Setup mock `claude` CLI as installed////// Call this after setup_mock_ci_tools_unauthenticated() to simulate@@ -2031,6 +2046,118 @@ impl TestRepo {self.mock_bin_path = Some(mock_bin);}+ /// Setup mock `tea` that returns configurable Gitea PR / commit-status data.+ ///+ /// Use this for testing Gitea CI status parsing. The mock handles:+ /// - `tea api repos/{owner}/{repo}/pulls?state=open` → `pulls_json`+ /// - `tea api repos/{owner}/{repo}/commits/{head_sha}/status` → `status_json`+ ///+ /// `owner`/`repo_name`/`head_sha` are needed because mock-stub matches the+ /// invocation's leading arguments verbatim, and `tea api <path>` passes the+ /// whole API path as a single argument — so the exact path string must be+ /// registered.+ ///+ /// # Arguments+ /// * `owner`, `repo_name` - the Gitea repo the test's remote points at.+ /// * `head_sha` - the SHA used for the `commits/{sha}/status` lookup+ /// (the feature branch's HEAD; also the PR head SHA in `pulls_json`).+ /// * `pulls_json` - JSON array for `tea api .../pulls`. Each entry should+ /// include `mergeable`, `html_url`, and `head.{ref,sha,repo.owner.login}`.+ /// * `status_json` - JSON object for `tea api .../commits/{sha}/status`,+ /// with `state` and `total_count`.+ pub fn setup_mock_tea_with_ci_data(+ &mut self,+ owner: &str,+ repo_name: &str,+ head_sha: &str,+ pulls_json: &str,+ status_json: &str,+ ) {+ let mock_bin = self.temp_dir.path().join("mock-bin");+ std::fs::create_dir_all(&mock_bin).unwrap();++ std::fs::write(mock_bin.join("tea_pulls.json"), pulls_json).unwrap();+ std::fs::write(mock_bin.join("tea_status.json"), status_json).unwrap();++ let pulls_path = format!("api repos/{owner}/{repo_name}/pulls?state=open");+ let status_path = format!("api repos/{owner}/{repo_name}/commits/{head_sha}/status");++ MockConfig::new("tea")+ .version("tea version development (mock)")+ .command(&pulls_path, MockResponse::file("tea_pulls.json"))+ .command(&status_path, MockResponse::file("tea_status.json"))+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);++ // Other CI tools fail — platform detection is URL-based, but keep these+ // present-but-useless so a real tool on PATH can't interfere.+ for tool in ["gh", "glab", "az"] {+ MockConfig::new(tool)+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);+ }++ self.mock_bin_path = Some(mock_bin);+ }++ /// Setup mock `tea` where every `tea api` call fails with the given stderr+ /// (exit code 1).+ ///+ /// Used to exercise the `is_retriable_error` branch in `detect_gitea_pr`.+ pub fn setup_mock_tea_with_detection_error(&mut self, stderr: &str) {+ let mock_bin = self.temp_dir.path().join("mock-bin");+ std::fs::create_dir_all(&mock_bin).unwrap();++ MockConfig::new("tea")+ .version("tea version development (mock)")+ .command("api", MockResponse::stderr(stderr).with_exit_code(1))+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);++ for tool in ["gh", "glab", "az"] {+ MockConfig::new(tool)+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);+ }++ self.mock_bin_path = Some(mock_bin);+ }++ /// Setup mock `tea` for the Gitea commit-status fallback (no PR): the+ /// `pulls` list returns `[]`, and the `commits/{head_sha}/status` lookup+ /// fails with `stderr` (exit code 1). Assumes the repo's remote points at+ /// `owner/test-repo`.+ ///+ /// Used to exercise the `is_retriable_error` branch in+ /// `fetch_combined_status`.+ pub fn setup_mock_tea_commit_status_error(&mut self, head_sha: &str, stderr: &str) {+ let mock_bin = self.temp_dir.path().join("mock-bin");+ std::fs::create_dir_all(&mock_bin).unwrap();++ std::fs::write(mock_bin.join("tea_pulls.json"), "[]").unwrap();++ MockConfig::new("tea")+ .version("tea version development (mock)")+ .command(+ "api repos/owner/test-repo/pulls?state=open",+ MockResponse::file("tea_pulls.json"),+ )+ .command(+ &format!("api repos/owner/test-repo/commits/{head_sha}/status"),+ MockResponse::stderr(stderr).with_exit_code(1),+ )+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);++ for tool in ["gh", "glab", "az"] {+ MockConfig::new(tool)+ .command("_default", MockResponse::exit(1))+ .write(&mock_bin);+ }++ self.mock_bin_path = Some(mock_bin);+ }+/// Configure a command to use mock gh/glab commands////// Must call `setup_mock_gh()` first. Prepends the mock bin directory to PATHdiff --git a/tests/integration_tests/ci_status.rs b/tests/integration_tests/ci_status.rsindex c6de41d72..a48b32f5d 100644--- a/tests/integration_tests/ci_status.rs+++ b/tests/integration_tests/ci_status.rs@@ -414,9 +414,10 @@ fn test_list_full_with_gitlab_remote(mut repo: TestRepo) {#[rstest]fn test_list_full_with_gitea_forge_platform(mut repo: TestRepo) {- // `forge.platform = "gitea"` is a valid value (the `wt switch pr:` shortcut- // uses it), but worktrunk fetches CI status only from GitHub/GitLab. `wt- // list` must not warn that the value is "invalid" — it just leaves CI blank.+ // `forge.platform = "gitea"` resolves to the (experimental) Gitea CI+ // backend, but without `tea` installed there's nothing to show — CI stays+ // blank, and `wt list` must not warn that the value is "invalid". (Gitea CI+ // detection with a mocked `tea` is covered by the `gitea_*` tests below.)repo.run_git(&["remote","set-url",@@ -1051,3 +1052,162 @@ fn test_list_full_with_azure_pipeline_retriable_error(mut repo: TestRepo) {assert_cmd_snapshot!("azure_pipeline_retriable_error", cmd);});}++// =============================================================================+// Gitea CI status tests+// =============================================================================++/// Set up a repo with a Gitea remote and a `feature` worktree carrying its own+/// commit (so its HEAD SHA differs from `main`'s, keeping the per-branch+/// commit-status lookups distinct). Returns the `feature` HEAD SHA.+fn setup_gitea_repo_with_feature(repo: &mut TestRepo) -> String {+ repo.run_git(&[+ "remote",+ "set-url",+ "origin",+ "https://gitea.example.com/owner/test-repo.git",+ ]);+ let feature_wt = repo.add_worktree("feature");+ repo.commit_in_worktree(+ &feature_wt,+ "gitea-ci.txt",+ "gitea ci test",+ "feat: gitea feature",+ );+ setup_tracking_for_all_branches(repo, "origin");+ branch_sha(repo, "feature")+}++/// Run a Gitea CI status test with the given `tea api .../pulls` and+/// `tea api .../commits/{sha}/status` mock responses.+fn run_gitea_ci_status_test(+ repo: &mut TestRepo,+ snapshot_name: &str,+ head_sha: &str,+ pulls_json: &str,+ status_json: &str,+) {+ repo.setup_mock_tea_with_ci_data("owner", "test-repo", head_sha, pulls_json, status_json);++ let settings = setup_snapshot_settings(repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(repo, "list", &["--full"], None);+ repo.configure_mock_commands(&mut cmd);+ assert_cmd_snapshot!(snapshot_name, cmd);+ });+}++/// Build a one-PR `tea api .../pulls` response for the `feature` branch.+fn gitea_feature_pr_json(head_sha: &str, mergeable: bool) -> String {+ format!(+ r#"[{{+ "mergeable": {mergeable},+ "html_url": "https://gitea.example.com/owner/test-repo/pulls/7",+ "head": {{+ "ref": "feature",+ "sha": "{head_sha}",+ "repo": {{"owner": {{"login": "owner"}}}}+ }}+ }}]"#+ )+}++/// An open PR with `mergeable: false` surfaces as a Conflicts indicator+/// (exercises `detect_gitea_pr`).+#[rstest]+fn test_list_full_with_gitea_pr_conflicts(mut repo: TestRepo) {+ let head_sha = setup_gitea_repo_with_feature(&mut repo);+ run_gitea_ci_status_test(+ &mut repo,+ "gitea_pr_conflicts",+ &head_sha,+ &gitea_feature_pr_json(&head_sha, false),+ r#"{"state":"","total_count":0}"#,+ );+}++/// An open PR's CI state comes from the PR head commit's combined status, and+/// the indicator links to the PR.+#[rstest]+#[case::passed("success", "gitea_pr_passed")]+#[case::failed("failure", "gitea_pr_failed")]+#[case::running("pending", "gitea_pr_running")]+fn test_list_full_with_gitea_pr_status(+ mut repo: TestRepo,+ #[case] state: &str,+ #[case] snapshot_name: &str,+) {+ let head_sha = setup_gitea_repo_with_feature(&mut repo);+ let status_json = format!(r#"{{"state":"{state}","total_count":2}}"#);+ run_gitea_ci_status_test(+ &mut repo,+ snapshot_name,+ &head_sha,+ &gitea_feature_pr_json(&head_sha, true),+ &status_json,+ );+}++/// No PR for the branch falls back to the HEAD commit's combined status+/// (exercises `detect_gitea_commit_status` and the `failure` state mapping).+#[rstest]+fn test_list_full_with_gitea_commit_status(mut repo: TestRepo) {+ let head_sha = setup_gitea_repo_with_feature(&mut repo);+ run_gitea_ci_status_test(+ &mut repo,+ "gitea_commit_status",+ &head_sha,+ "[]",+ r#"{"state":"failure","total_count":1}"#,+ );+}++/// No PR and no commit statuses → no CI indicator.+#[rstest]+fn test_list_full_with_gitea_no_ci(mut repo: TestRepo) {+ let head_sha = setup_gitea_repo_with_feature(&mut repo);+ run_gitea_ci_status_test(+ &mut repo,+ "gitea_no_ci",+ &head_sha,+ "[]",+ r#"{"state":"","total_count":0}"#,+ );+}++/// A retriable error from `tea api .../pulls` surfaces as an error indicator+/// rather than NoCI (exercises the `is_retriable_error` branch in+/// `detect_gitea_pr`).+#[rstest]+fn test_list_full_with_gitea_retriable_error(mut repo: TestRepo) {+ setup_gitea_repo_with_feature(&mut repo);+ repo.setup_mock_tea_with_detection_error(+ "Error: GET .../api/v1/repos/owner/test-repo/pulls: 429 Too Many Requests",+ );++ let settings = setup_snapshot_settings(&repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(&repo, "list", &["--full"], None);+ repo.configure_mock_commands(&mut cmd);+ assert_cmd_snapshot!("gitea_retriable_error", cmd);+ });+}++/// A retriable error from the commit-status lookup (when no PR exists for the+/// branch) surfaces as an error indicator (exercises the `is_retriable_error`+/// branch in `fetch_combined_status`, reached via `detect_gitea_commit_status`).+#[rstest]+fn test_list_full_with_gitea_commit_status_retriable_error(mut repo: TestRepo) {+ let head_sha = setup_gitea_repo_with_feature(&mut repo);+ repo.setup_mock_tea_commit_status_error(+ &head_sha,+ "Error: GET .../api/v1/repos/owner/test-repo/commits/.../status: 429 Too Many Requests",+ );++ let settings = setup_snapshot_settings(&repo);+ settings.bind(|| {+ let mut cmd = make_snapshot_cmd(&repo, "list", &["--full"], None);+ repo.configure_mock_commands(&mut cmd);+ assert_cmd_snapshot!("gitea_commit_status_retriable_error", cmd);+ });+}diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rsindex 4c8e0f824..870863a35 100644--- a/tests/integration_tests/config_show.rs+++ b/tests/integration_tests/config_show.rs@@ -1388,6 +1388,47 @@ fn test_config_show_full_version_check_unavailable(mut repo: TestRepo, temp_home});}+/// `wt config show --full` against a Gitea remote reports the `tea` CLI row.+#[rstest]+fn test_config_show_full_gitea_remote(mut repo: TestRepo, temp_home: TempDir) {+ repo.setup_mock_ci_tools_unauthenticated();+ // The Gitea diagnostics row only depends on `tea`'s state; mock it as+ // installed (no login configured in the temp home).+ repo.setup_mock_tea_installed();++ // The fixture already has an `origin`; point it at a Gitea host.+ repo.run_git(&[+ "remote",+ "set-url",+ "origin",+ "https://gitea.example.com/example/repo.git",+ ]);++ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ fs::write(+ global_config_dir.join("config.toml"),+ "worktree-path = \"../{{ repo }}.{{ branch }}\"",+ )+ .unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.configure_wt_cmd(&mut cmd);+ repo.configure_mock_commands(&mut cmd);+ cmd.env("WORKTRUNK_TEST_LATEST_VERSION", env!("CARGO_PKG_VERSION"));+ cmd.arg("config")+ .arg("show")+ .arg("--full")+ .current_dir(repo.root_path());+ set_temp_home_env(&mut cmd, temp_home.path());+ set_xdg_config_path(&mut cmd, temp_home.path());++ assert_cmd_snapshot!(cmd);+ });+}+#[rstest]fn test_config_show_github_remote(mut repo: TestRepo, temp_home: TempDir) {// Setup mock gh/glab for deterministic BINARIES outputdiff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status.snapnew file mode 100644index 000000000..a2b7b7a6c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [31m●[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status_retriable_error.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status_retriable_error.snapnew file mode 100644index 000000000..514f65852--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_commit_status_retriable_error.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m⚠[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_no_ci.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_no_ci.snapnew file mode 100644index 000000000..69c9eaa1c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_no_ci.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_conflicts.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_conflicts.snapnew file mode 100644index 000000000..c955fa077--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_conflicts.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m●[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_failed.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_failed.snapnew file mode 100644index 000000000..a2b7b7a6c--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_failed.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [31m●[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_passed.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_passed.snapnew file mode 100644index 000000000..f702d3578--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_passed.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [32m●[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_running.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_running.snapnew file mode 100644index 000000000..277774e64--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_pr_running.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [34m●[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__gitea_retriable_error.snap b/tests/snapshots/integration__integration_tests__ci_status__gitea_retriable_error.snapnew file mode 100644index 000000000..51b7d328e--- /dev/null+++ b/tests/snapshots/integration__integration_tests__ci_status__gitea_retriable_error.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/ci_status.rs+info:+ program: wt+ args:+ - list+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+ [1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mPath[0m [1mCommit[0m [1mAge[0m [1mMessage+@ main [2m^[22m[2m|[22m [2m|[0m [33m⚠[0m . [2m05a4a45d[0m [2m16h[0m [2mInitial commit++ feature-a [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m⚠[0m ../repo.feature-a [2m1b87d473[0m [2m16h[0m [2mAdd feature-a file++ feature-b [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m⚠[0m ../repo.feature-b [2mf62940fc[0m [2m16h[0m [2mAdd feature-b file++ feature-c [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m⚠[0m ../repo.feature-c [2m345c7c93[0m [2m16h[0m [2mAdd feature-c file++ feature [2m↑[22m[2m|[22m [32m↑1[0m [32m+1[0m [2m|[0m [33m⚠[0m ../repo.feature [2m9c1e078b[0m [2m1d[0m [2mfeat: gitea feature++[2m○[22m [2mShowing 5 worktrees, 4 ahead++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__ci_status__list_full_with_invalid_configured_platform.snap b/tests/snapshots/integration__integration_tests__ci_status__list_full_with_invalid_configured_platform.snapindex 6e2f95c5e..a7e1a5b86 100644--- a/tests/snapshots/integration__integration_tests__ci_status__list_full_with_invalid_configured_platform.snap+++ b/tests/snapshots/integration__integration_tests__ci_status__list_full_with_invalid_configured_platform.snap@@ -63,4 +63,4 @@ exit_code: 0----- stderr -----[33m▲[39m [33mProject config: [1m[ci][22m is deprecated in favor of [1m[forge][22m[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[2m[W][22m Invalid CI platform in config: 'invalid_platform'. Expected 'github', 'gitlab', or 'azure-devops'.+[2m[W][22m Invalid CI platform in config: 'invalid_platform'. Expected 'github', 'gitlab', 'gitea', or 'azure-devops'.diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snapindex 9844c4263..f8e413829 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap@@ -69,7 +69,7 @@ exit_code: 0[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m[36mDIAGNOSTICS[39m-[2m↳[22m [2mCI status requires GitHub, GitLab, or Azure DevOps remote[22m+[2m↳[22m [2mCI status requires GitHub, GitLab, Gitea, or Azure DevOps remote[22m[32m✓[39m [32mUp to date ([1m[VERSION][22m)[39m[31m✗[39m [31mCommit generation failed ([1mnonexistent-llm-command-12345 -m test-model[22m)[39m[107m [0m [31m✗[39m [31mCommit generation command failed[39mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_gitea_remote.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_gitea_remote.snapnew file mode 100644index 000000000..5b74b59e8--- /dev/null+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_gitea_remote.snap@@ -0,0 +1,78 @@+---+source: tests/integration_tests/config_show.rs+info:+ program: wt+ args:+ - config+ - show+ - "--full"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_LATEST_VERSION: "[VERSION]"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+[36mUSER CONFIG[39m @ ~/.config/worktrunk/config.toml+[107m [0m [2mworktree-path = [0m[2m[32m"../{{ repo }}.{{ branch }}"+[2m↳[22m [2mOptional system config not found @ [2m/etc/xdg/worktrunk/config.toml[22m[22m++[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.toml+[2m↳[22m [2mNot found[22m++[36mSHELL INTEGRATION[39m+[33m▲[39m [33mShell integration not configured[39m+[2m↳[22m [2mTo configure, run [4mwt config shell install[24m[22m+[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m++[36mDIAGNOSTICS[39m+[33m▲[39m [33m[1mtea[22m installed but not authenticated; run [1mtea login add[22m[39m+[32m✓[39m [32mUp to date ([1m[VERSION][22m)[39m+[2m↳[22m [2mCommit generation not configured[22m++[36mOTHER[39m+[2m○[22m wt: [1m[VERSION][22m+[2m○[22m git: [1m[VERSION][22m+[2m○[22m Hyperlinks: [1minactive[22m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snapindex ca70da3be..0e118816f 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap@@ -66,7 +66,7 @@ exit_code: 0[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m[36mDIAGNOSTICS[39m-[2m↳[22m [2mCI status requires GitHub, GitLab, or Azure DevOps remote[22m+[2m↳[22m [2mCI status requires GitHub, GitLab, Gitea, or Azure DevOps remote[22m[32m✓[39m [32mUp to date ([1m[VERSION][22m)[39m[2m↳[22m [2mCommit generation not configured[22mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snapindex 168df7057..6dd90bbac 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap@@ -66,7 +66,7 @@ exit_code: 0[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m[36mDIAGNOSTICS[39m-[2m↳[22m [2mCI status requires GitHub, GitLab, or Azure DevOps remote[22m+[2m↳[22m [2mCI status requires GitHub, GitLab, Gitea, or Azure DevOps remote[22m[2m○[22m Update available: [1m99.0.0[22m (current: [VERSION])[2m↳[22m [2mCommit generation not configured[22mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snapindex 5cc720762..f66bff1ff 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap@@ -66,7 +66,7 @@ exit_code: 0[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m[36mDIAGNOSTICS[39m-[2m↳[22m [2mCI status requires GitHub, GitLab, or Azure DevOps remote[22m+[2m↳[22m [2mCI status requires GitHub, GitLab, Gitea, or Azure DevOps remote[22m[2m↳[22m [2mVersion check unavailable[22m[2m↳[22m [2mCommit generation not configured[22m