feat(worker): detect company repos by origin remote pattern

This commit is contained in:
mika kuns
2026-10-01 10:28:54 +02:00
parent db3c7e69e5
commit faa91e0661
4 changed files with 61 additions and 0 deletions
+7
View File
@@ -414,6 +414,13 @@ public sealed class GitService
.ToList();
}
/// <summary>URL des Remotes <paramref name="remote"/>, oder null wenn es keins gibt.</summary>
public async Task<string?> GetRemoteUrlAsync(string repoDir, string remote = "origin", CancellationToken ct = default)
{
var (exitCode, stdout, _) = await RunGitAsync(repoDir, ["remote", "get-url", remote], ct);
return exitCode == 0 && !string.IsNullOrWhiteSpace(stdout) ? stdout.Trim() : null;
}
public async Task<bool> IsMidMergeAsync(string repoDir, CancellationToken ct = default)
{
var (exitCode, stdout, _) = await RunGitAsync(repoDir, ["rev-parse", "--git-dir"], ct);