Introduce project-management backend abstractions beyond GitHub#337
Merged
nicobistolfi merged 1 commit intomainfrom Mar 29, 2026
Conversation
Add a backend abstraction layer that separates core orchestration from GitHub-specific APIs. The new internal/backend package defines four interfaces (IssueTracker, PullRequestManager, LabelManager, RateLimiter) with backend-neutral types. A GitHub implementation wraps existing ghcli functions to preserve current behavior. The App struct now holds interface fields instead of calling ghcli directly, and WatchTarget/Session carry backend identity fields (issue_backend, git_backend, pr_backend, project_ref) to support mixed-backend configurations like Linear issues + GitHub PRs. All existing GitHub behavior is preserved through type aliases and the GitHub backend implementation delegating to ghcli functions. Closes #334
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/backendpackage with four interfaces (IssueTracker,PullRequestManager,LabelManager,RateLimiter) and backend-neutral typesinternal/backend/github) wrapping existingghclifunctions for zero-behavior-change compatibilityAppstruct andrunner/session.goto use backend interfaces instead of directghclicallsissue_backend,git_backend,pr_backend,project_reffields toWatchTargetandSessionfor mixed-backend support (e.g., Linear issues + GitHub PRs)Test plan
go test ./...)gofmtandgo vetcleanCloses #334