feat: Multi-provider issue system for Forge (GitHub Issues + Linear)#41
Draft
dasirra wants to merge 11 commits into
Draft
feat: Multi-provider issue system for Forge (GitHub Issues + Linear)#41dasirra wants to merge 11 commits into
dasirra wants to merge 11 commits into
Conversation
merge: develop into main
fix: remove legacy .initialized cleanup from entrypoint
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
Adds a pluggable provider abstraction to Forge so each project can pull issues from the tracker where they already live. Implements Linear alongside the existing GitHub Issues source, with PRs continuing to go to GitHub regardless of provider.
Source
Closes #39
What Changed
Provider abstraction
agents/forge/providers/directory with a 3-function interface:provider_fetch_issues,provider_get_issue,provider_has_open_pragents/forge/providers/github.sh— wrapsghCLI (extracts current inline logic)agents/forge/providers/linear.sh— usescurl+ Linear GraphQL API; normalizes output to match GitHub format; handles HTTP errors and GraphQL-level errors; validatesLINEAR_API_KEYForge behavior (backwards-compatible)
agents/forge/AGENTS.md— issue selection now sources the correct provider script based onproviderconfig field (defaults to"github"); validateslinearProjectis set before fetching;provider_has_open_pralways checks GitHubagents/forge/SOUL.md— updated identity description and addedproviders/pathagents/forge/config.example.json— shows bothgithubandlinearproject examples withproviderandlinearProjectfieldsInstaller
installer/linear.sh— collects and validates Linear API key via GraphQLviewerqueryinstaller/manifest.json— addslinearas optional integration for Forgeinstall.sh— sources linear.sh, tracksINTG_STATUS_linear, adds optional Linear setup flow and summary line.env.example— addsLINEAR_API_KEYentryTests
tests/github-provider.bats— 10 tests covering all 3 provider functions with mockedghCLItests/linear-provider.bats— 8 tests covering fetch, normalization, error handling, and PR check delegationTasks
loginfield removalCode Review
Review found and fixed:
{"project": null}for invalid UUIDs — added Python guard with diagnostic error message{"errors":[...]}was silently treated as empty —_linear_graphqlnow checks and exits with messageopen('$body_file')in Python-cstring replaced with stdin (< "$body_file")loginis GitHub-specific; removed from Linear viewer query (was causing always-unverified validation)providers/path entry addedlinearProjectvalidation andprovider_get_issuereserved-use note addedBuilt autonomously by
/build