This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
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.
Changes
With go-gitea/gitea#24887 and go-gitea/gitea#25033 being merged, the two major issues with the Gitea backend can finally be resolved:
Authorization: Up until now, Gitea didn't support PKCE auth. As Netlify doesn't support Gitea, users were required to setup an external OAuth provider (e. g. https://github.com/denyskon/teabag). With Allow for PKCE flow without client secret + add docs go-gitea/gitea#25033, Gitea now supports PKCE auth, which allows for simple and secure client-side authorization without using an OAuth provider.
-> refactor authentication to use PKCE
Multiple-file commits: As above, modifying or creating multiple files wasn't possible using Gitea's API. With API endpoint for changing/creating/deleting multiple files go-gitea/gitea#24887, a new API endpoint was added which provides this functionality. The original behavior caused a lot of problems (too many commits for multiple files -> too many CI runs -> high server load, entries appearing before the included media....)
-> refactor file saving/deletion to use new API endpoint
These changes are a big quality improvement for the backend and a step towards bringing it out of beta.
Consequences
This refactoring counts as breaking for two reasons:
API endpoints: some of the endpoints used by the backend starting from now will only be available since Gitea 1.20, which is expected to be released around the 1st of July 2023. Older Gitea versions won't work.
Config: the backend config slightly changes because of the switch to PKCE auth. Users will need to update their config accordingly to the docs.
To Do
The breaking changes need to be documented in a migration guide for Static CMS v3.0 or the release notes.
Other
With this change, the Gitea backend no longer depends on third-party infrastructure beside the Gitea instance, allowing for testing using the official test instance provided by the Gitea project.