Skip to content

API: Getting issue index from times data #8513

Closed
@bobemoe

Description

@bobemoe

Gitea Version: 1.10.0+dev-409-g46a12f196

I'm using the /repos​/{owner}​/{repo}​/times​ endpoint that returns like this:

[
  {
    "id": 2,
    "created": "2019-10-14T10:36:03+01:00",
    "time": 900,
    "user_id": 1,
    "issue_id": 1397
  }
]

The above only gives the issue ID, and I cant find any way to then get the issue as the /repos/{owner}/{repo}/issues/{index} endpoint is wanting a issue number rather than the id.

Is there any way to get an issue by its ID rather than its Number?

Or to convert an ID to a Number?

Maybe the times endpoint should return the number as well as id?

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies them

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions