Problem
DAG workflows (e.g. archon-fix-github-issue) use gh CLI commands directly in bash nodes:
- id: fetch-issue
bash: |
gh issue view "$ISSUE_NUM" --json title,body,labels,comments,state,url,author
gh issue view --json uses GitHub's GraphQL API internally. When the same workflow runs against a Gitea repository, it fails:
HTTP 405: 405 Method Not Allowed (https://gitea.jtpa.net/api/graphql)
This blocks ALL DAG workflows on Gitea repos. The same problem will occur for Bitbucket and Jira when those adapters are built.
Current State
- The Gitea adapter (
packages/adapters/src/community/forge/gitea/) handles webhooks and comments correctly via REST API
- The
tea CLI is the Gitea equivalent of gh and is already used by the adapter
- But DAG workflow YAML files hardcode
gh commands — there's no abstraction layer
- The workflows don't know what forge they're running against
Proposed Solution
Forge CLI Abstraction Layer
Introduce a thin abstraction that workflows use instead of gh/tea/bb directly.
Option A: Environment variable + wrapper script
The isolation/runner layer sets FORGE_CLI based on the repo's forge type (GitHub → gh, Gitea → tea, Bitbucket → bb) with a wrapper script that normalizes output.
Option B: Forge-agnostic helper command
A single archon-forge binary/script that detects forge type from git remote URL or env var, dispatches to the right CLI, and normalizes JSON output to a common schema.
Option C: API-first (no CLI dependency)
Skip CLIs entirely — use curl against the forge's REST API. The runner injects FORGE_API_URL, FORGE_TOKEN, REPO_OWNER, REPO_NAME as env vars.
Operations That Need Abstraction
| Operation |
gh command |
tea equivalent |
| View issue |
gh issue view N --json ... |
tea issue view N or REST API |
| List issues |
gh issue list --json ... |
tea issue list or REST API |
| Create PR |
gh pr create --draft |
tea pr create or REST API |
| View PR |
gh pr view --json ... |
tea pr view or REST API |
| Add comment |
gh issue comment N |
tea comment create or REST API |
Affected Workflows
All default DAG workflows with gh commands in bash nodes:
archon-fix-github-issue.yaml — fetch-issue node
archon-issue-review-full.yaml
archon-pr-review-scope.yaml
- Any workflow with
gh issue, gh pr, gh api
Reproduction
- Create an issue on a Gitea repo connected to Archon
- Comment
@raca archon-fix-github-issue-dag
- Observe:
fetch-issue node fails with HTTP 405
We're happy to take this on and submit a PR. The Gitea adapter was contributed by us (PR #653).
— Fitzy 🐾
Problem
DAG workflows (e.g.
archon-fix-github-issue) useghCLI commands directly in bash nodes:gh issue view --jsonuses GitHub's GraphQL API internally. When the same workflow runs against a Gitea repository, it fails:This blocks ALL DAG workflows on Gitea repos. The same problem will occur for Bitbucket and Jira when those adapters are built.
Current State
packages/adapters/src/community/forge/gitea/) handles webhooks and comments correctly via REST APIteaCLI is the Gitea equivalent ofghand is already used by the adapterghcommands — there's no abstraction layerProposed Solution
Forge CLI Abstraction Layer
Introduce a thin abstraction that workflows use instead of
gh/tea/bbdirectly.Option A: Environment variable + wrapper script
The isolation/runner layer sets
FORGE_CLIbased on the repo's forge type (GitHub →gh, Gitea →tea, Bitbucket →bb) with a wrapper script that normalizes output.Option B: Forge-agnostic helper command
A single
archon-forgebinary/script that detects forge type from git remote URL or env var, dispatches to the right CLI, and normalizes JSON output to a common schema.Option C: API-first (no CLI dependency)
Skip CLIs entirely — use curl against the forge's REST API. The runner injects
FORGE_API_URL,FORGE_TOKEN,REPO_OWNER,REPO_NAMEas env vars.Operations That Need Abstraction
ghcommandteaequivalentgh issue view N --json ...tea issue view Nor REST APIgh issue list --json ...tea issue listor REST APIgh pr create --drafttea pr createor REST APIgh pr view --json ...tea pr viewor REST APIgh issue comment Ntea comment createor REST APIAffected Workflows
All default DAG workflows with
ghcommands in bash nodes:archon-fix-github-issue.yaml—fetch-issuenodearchon-issue-review-full.yamlarchon-pr-review-scope.yamlgh issue,gh pr,gh apiReproduction
@raca archon-fix-github-issue-dagfetch-issuenode fails withHTTP 405We're happy to take this on and submit a PR. The Gitea adapter was contributed by us (PR #653).
— Fitzy 🐾