Forgejo’s built-in commit API does not support full-text search. The proxy adds a search endpoint that queries commit messages, author names, and SHAs.
Method Endpoint Description GET/api/v1/repos/{owner}/{repo}/git/commits/searchSearch commits in a repository
Parameter Description ownerRepository owner (user or organisation name) repoRepository name
Parameter Type Default Description qstring(required) Search term — matched against commit messages, author names, and SHAs pageinteger1Page number for pagination limitinteger20Number of results per page
# Search for commits mentioning "fix authentication"
curl -H ' Authorization: token YOUR_TOKEN ' \
' https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/git/commits/search?q=fix+authentication '
# Search by author name, page 2
curl -H ' Authorization: token YOUR_TOKEN ' \
' https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/git/commits/search?q=tobias&page=2&limit=10 '
curl -H ' Authorization: token YOUR_TOKEN ' \
' https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/git/commits/search?q=a3f9c2 '
Returns an array of commit objects compatible with Forgejo’s commit schema:
"sha" : " a3f9c2d1e4b5... " ,
"message" : " fix: correct authentication token handling " ,
"name" : " Tobias Hochgürtel " ,
"email" : " tobias@example.com " ,
"date" : " 2024-11-01T10:30:00Z "
"html_url" : " https://forgejo.example.com/myorg/myrepo/commit/a3f9c2d1e4b5... "