Skip to content

feat: recognize Forgejo and Gitea provider configuration#266

Merged
mariusvniekerk merged 2 commits into
mainfrom
forgejo-gitea-provider-config
May 8, 2026
Merged

feat: recognize Forgejo and Gitea provider configuration#266
mariusvniekerk merged 2 commits into
mainfrom
forgejo-gitea-provider-config

Conversation

@mariusvniekerk
Copy link
Copy Markdown
Collaborator

Adds Forgejo and Gitea metadata and config parsing so Codeberg, Gitea.com, and self-hosted repos can be represented before provider sync is implemented.

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (a518da0)

High-risk issue found: fallback Forgejo/Gitea token env vars may be used for auth without being included in session environment sanitization.

High

  • internal/config/config.go:1046
    TokenEnvNames only includes implicit Forgejo/Gitea default env vars when a repo has no token_env, but TokenForPlatformHost can still fall back to MIDDLEMAN_FORGEJO_TOKEN or MIDDLEMAN_GITEA_TOKEN when a repo-specific env var is configured but empty. Those default token env vars can therefore be used for auth while remaining unsanitized in launched session environments.

    Fix: Include possible fallback provider/default token env names independently of whether r.TokenEnv is set, while still adding the repo-specific env name.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (aa08bfb)

No Medium, High, or Critical issues were reported.

All review agents either found no issues or returned no findings.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (5487890)

No Medium, High, or Critical findings were reported.

All review agents that provided findings indicate the code is clean.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 5487890 to 0f40d24 Compare May 7, 2026 20:50
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (0f40d24)

Runtime support is incomplete for the newly accepted Forgejo/Gitea platforms.

High

  • internal/config/config.go:297
    Codeberg and Gitea URLs now normalize to forgejo/gitea, and those platforms are accepted as built-ins, but startup still only has provider factories for GitHub and GitLab. Repos using the newly recognized platforms can pass config validation and then fail at startup with unsupported platform "forgejo" or "gitea".
    Fix: Add Forgejo/Gitea provider factories or compatible provider mappings before accepting/infering these platforms, or reject them until runtime support exists.

Medium

  • internal/config/config_test.go:775
    Coverage only verifies parsing and token lookup. This is a user-visible provider/data-flow change plus a token-sanitizer fix, but there is no end-to-end coverage proving startup, provider registration, SQLite/API flow, and environment sanitization work together.
    Fix: Add e2e coverage that starts the app with Forgejo/Gitea-style config and verifies runtime behavior, including stripping implicit provider token env vars from launched session environments.

Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk changed the base branch from forgejo-provider-impl to register-forge-provider-startup May 7, 2026 22:12
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 0f40d24 to 1d79f4f Compare May 7, 2026 22:12
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (1d79f4f)

No Medium, High, or Critical issues were reported.

All review agents found the code clean or reported no findings.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the register-forge-provider-startup branch from 6adcc34 to bd49b2f Compare May 7, 2026 22:36
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 1d79f4f to 535775a Compare May 7, 2026 22:37
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 7, 2026

roborev: Combined Review (535775a)

No Medium, High, or Critical findings were reported.

All review agents found the code clean for reportable issues.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the register-forge-provider-startup branch from bd49b2f to df23946 Compare May 8, 2026 00:30
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 535775a to 3b4fa7d Compare May 8, 2026 00:30
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 8, 2026

roborev: Combined Review (3b4fa7d)

All reported findings are below medium severity, so there are no actionable PR comments to include.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the register-forge-provider-startup branch from df23946 to 075d13d Compare May 8, 2026 00:38
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 3b4fa7d to f978956 Compare May 8, 2026 00:38
@mariusvniekerk mariusvniekerk force-pushed the register-forge-provider-startup branch from 075d13d to db7ad6b Compare May 8, 2026 00:41
@roborev-ci
Copy link
Copy Markdown

roborev-ci Bot commented May 8, 2026

roborev: Combined Review (f978956)

Code review verdict: no Medium, High, or Critical findings to report.

The only reported finding was Low severity, so it is omitted per the review rules.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from f978956 to 0141271 Compare May 8, 2026 00:42
@mariusvniekerk mariusvniekerk force-pushed the register-forge-provider-startup branch from db7ad6b to 9c77d8e Compare May 8, 2026 00:44
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 0141271 to 2d74966 Compare May 8, 2026 00:44
Base automatically changed from register-forge-provider-startup to main May 8, 2026 00:46
Adds Forgejo and Gitea metadata and config parsing so Codeberg, Gitea.com, and self-hosted repos can be represented before provider sync is implemented.
Include provider default token env vars in the runtime sanitizer even when a repo-specific token_env is configured, because token resolution can still fall back to public Forgejo/Gitea defaults when the repo env var is empty.
@mariusvniekerk mariusvniekerk force-pushed the forgejo-gitea-provider-config branch from 2d74966 to 7a25f7d Compare May 8, 2026 00:47
@mariusvniekerk mariusvniekerk merged commit 833d7f4 into main May 8, 2026
7 of 9 checks passed
@mariusvniekerk mariusvniekerk deleted the forgejo-gitea-provider-config branch May 8, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant