WIP: Gitea/Forgejo bridge#1565
Draft
jyn514 wants to merge 51 commits into
Draft
Conversation
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.
these were divergences from upstream
This is the only reliable way to get labels, title edits, and open/close status, so we may as well do it now.
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.
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.