ListContents() only handles empty string specially. When path is ., it appends it to the URL.
Fix
Normalize . to "" before calling the API. In ListContents() or in fetchPatterns() before the call:
ifpath=="."{path=""}
Workaround
Use patterns-files: "" instead of patterns-files: "." in workflow configs.
## Problem
When `patterns-files` is set to `.`, the client passes it directly to the Gitea contents API:
```
GET /api/v1/repos/owner/repo/contents/.
```
Gitea rejects this with HTTP 500:
```
routers/api/v1/repo/file.go:835:getRepoContents() [E] InternalServerError: path contains a malformed path component [path: .]
```
## Root Cause
`ListContents()` only handles empty string specially. When path is `.`, it appends it to the URL.
## Fix
Normalize `.` to `""` before calling the API. In `ListContents()` or in `fetchPatterns()` before the call:
```go
if path == "." {
path = ""
}
```
## Workaround
Use `patterns-files: ""` instead of `patterns-files: "."` in workflow configs.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
When
patterns-filesis set to., the client passes it directly to the Gitea contents API:Gitea rejects this with HTTP 500:
Root Cause
ListContents()only handles empty string specially. When path is., it appends it to the URL.Fix
Normalize
.to""before calling the API. InListContents()or infetchPatterns()before the call:Workaround
Use
patterns-files: ""instead ofpatterns-files: "."in workflow configs.