Issue filing, part A: Integrations settings and tracker adapters #94
Loading…
Reference in a new issue
No description provided.
Delete branch "issues-52a-integrations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #52 (PR A of two, D9; PR B, filing with strike + stamp, stacks on this and closes #52).
What
/settings/integrations): a card each for Forgejo (or Gitea), GitHub and Linear. Each has its own credentials, an on/off switch (off by default, even when env vars set the credentials), and a connection test that shows who the token is for and where issues can be filed.RmAnalyzer.Issuescontext (separate from todo sync, D8) withissue_integrations(one per tracker per user, token encrypted, never rendered, logged or inspected).ISSUES_FORGEJO_URL,ISSUES_FORGEJO_TOKEN,ISSUES_GITHUB_TOKEN,ISSUES_LINEAR_API_KEY. They win over the user's settings and show read-only. A Forgejo token without its URL fails boot.Issues.Tracker: check, list_targets, list_labels, create_issue), Req only:/api/v1withtokenauth: repos the token can push to with issues on; repo and org labels as ids.X-GitHub-Api-Version: 2026-03-10: repos without push access are marked, since GitHub drops their labels; labels by name.errorschecked on every answer, 200 included.{:rate_limited, seconds}. A create with no answer gives{:maybe_filed, _}and is never retried.Backups.Network.resolve/4and is pinned, with no redirects. A saved token only goes to the host it was entered for.Issues.Content.title/1strips control characters, caps titles at 255, and neutralises@name,#12andGH-12.docs/issue-filing.md.Tests
mix precommit: 1509 passed. The new tests use stubbed Req per tracker: create, labels, picker paging, 401/403/404/410/422, 429 + retry-after, the GitHub reset header, Linear 200-with-errors, and transport errors. There are also context tests (env precedence, token kept or refused on a host move, SSRF refusal, test results kept) and LiveView tests.Screenshots
Example data: a Forgejo with 5 repos (
jfro/rm-analyzer,lodge/homelab,lodge/kuiper-forge;jfro/dotfileshas issues off andupstream/mirroris pull-only, so both are filtered out).The URL in the shots is a local stand-in Forgejo (127.0.0.1, allowed via BACKUP_S3_ALLOWED_NETWORKS for the shots).
Screenshots
connected-390.png
connected-desktop.png
empty-390.png