Skip to content

Add support for excluding keywords in repo search API #31229

Open
@ErlingHauan

Description

@ErlingHauan

Feature Description

Hello,
I am writing to request a new feature for the Gitea API that allows users to exclude certain keywords from search results.

Current behavior:
Currently, the Gitea API provides a way to search repositories using the /repos/search endpoint with the q parameter for specifying the search query. However, there is no built-in support for excluding results that contain specific keywords. This limitation requires users to fetch all search results and manually filter them on the client side, which can be inefficient and cumbersome.

Proposed enhancement:
I propose adding a new query parameter, such as not, which can be used to specify keywords that should be excluded from the search results. This would streamline the search process and reduce the need for additional client-side filtering.

Example API Request:

GET /repos/search?q=your_query&not=keyword_to_exclude

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/apiConcerns mainly the APItype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions