Skip to content

API UX: internal IDs shouldn't leak #14012

Open
@noerw

Description

@noerw

Working with the gitea API in tea, I noticed some shortcomings:

  • Labels are referenced by ID when attaching to issues / pulls. Users don't know this ID, and don't need to know; the label name is the user facing ID. Also, there is no way to look up a label ID by label name.
  • Similar problem exists with issue milestones: To assign a milestone, I need to know the internal ID, which is not how users identify milestones.

I propose to resolve these name <-> ID mappings internally and not leak this internal data model detail. Changes would be breaking, but IMO they're worth it.
This increases both usability as well as performance, as no more extra roundtrip to resolve IDs would be needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtopic/ui-interactionChange the process how users use Gitea instead of the visual appearancetype/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