Allow OAuth2 and basic auth for actions badge SVG endpoint#36830
Closed
silverwind wants to merge 5 commits intogo-gitea:mainfrom
Closed
Allow OAuth2 and basic auth for actions badge SVG endpoint#36830silverwind wants to merge 5 commits intogo-gitea:mainfrom
silverwind wants to merge 5 commits intogo-gitea:mainfrom
Conversation
Enable OAuth2 and basic auth token processing for the actions workflow badge path so that badges can be retrieved for private repositories. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lunny
reviewed
Mar 4, 2026
Member
Author
|
Renamed and also restricted to |
lunny
approved these changes
Mar 5, 2026
Contributor
|
I believe a proper fix should be like this: Refactor auth middleware #36848 Then this PR's purpose can be simply and clearly done like this:
|
Member
Author
|
If the fix is just a one-liner, you can include it in that PR. |
Contributor
Already included. Need to debug some "chi router" related problems. Just a moment. |
Contributor
CI passes |
wxiaoguang
added a commit
that referenced
this pull request
Mar 8, 2026
Principles: let the caller decide what it needs, but not let the framework (middleware) guess what it should do. Then a lot of hacky code can be removed. And some FIXMEs can be fixed. This PR introduces a new kind of middleware: "PreMiddleware", it will be executed before all other middlewares on the same routing level, then a route can declare its options for other middlewares. By the way, allow the workflow badge to be accessed by Basic or OAuth2 auth. Fixes: #36830 Fixes: #36859
silverwind
pushed a commit
to silverwind/gitea
that referenced
this pull request
Mar 8, 2026
Principles: let the caller decide what it needs, but not let the framework (middleware) guess what it should do. Then a lot of hacky code can be removed. And some FIXMEs can be fixed. This PR introduces a new kind of middleware: "PreMiddleware", it will be executed before all other middlewares on the same routing level, then a route can declare its options for other middlewares. By the way, allow the workflow badge to be accessed by Basic or OAuth2 auth. Fixes: go-gitea#36830 Fixes: go-gitea#36859
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.

Add OAuth2 and basic auth support to actions workflow badges. Previously, the only way to retrieve badges from private repos was cookies, which was inconvenient.