Skip to content

WIP: Gitea/Forgejo bridge#1565

Draft
jyn514 wants to merge 51 commits into
git-bug:trunkfrom
jyn514:forgejo-bridge
Draft

WIP: Gitea/Forgejo bridge#1565
jyn514 wants to merge 51 commits into
git-bug:trunkfrom
jyn514:forgejo-bridge

Conversation

@jyn514

@jyn514 jyn514 commented Jun 3, 2026

Copy link
Copy Markdown

Currently, this is just a rebase of #1077 with no other changes. I'm not looking for a review, just wanted to put the rebased code up.

Tian Yuanhao and others added 30 commits June 3, 2026 23:44
This a just a preview. Not all features are expected to work.
The features aren't yet filled out, and are represented ❓, but are at
least present and aligned for readability.
Co-authored-by: Michael Muré <batolettre@gmail.com>
This is necessary to get timeline API support.
This avoids needing real production tokens in order to run the tests,
or needing to reach out to the network.

It also deletes several tests.
- Unnormalized username (non-canonical lowercasing).
  We don't depend on this anywhere in the implementation, we only check
  whether the server says the username is valid or not.
  No point in mocking it.
- Organization username.
  We never call `validateUsername` for a project *owner*, only when
  validating access configuration. Organizations don't have access
  tokens, users do.
- Project validation with different scopes.
  We don't actually care here which scope the token needs -- that's
  something that goes in our docs, not in the code. If the prod API
  returns 404, that's good enough. Note that since Forgejo 15, all
  unauthorized endpoints return 404, not 403, so we don't even need to
  handle this case specially in the implementation.
Using `testing.T` messes up shrinking and filtering.
Add a small helper that allows using either `testing.T` or `rapid.T` so
that we get better coverage and errors.
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.

3 participants