Skip to content

API for getting PullRequest/Issue timeline data. #13250

Closed
@chriseaton

Description

@chriseaton
  • Gitea version (or commit ref): 1.12.5
  • Git version:
  • Operating system: CentOS 8.1, via systemd, binary release.
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io: N/A

Description

Proposed API route: GET ​/repos​/{owner}​/{repo}​/issues​/{index}/timeline

Currently, there is no way to get a timeline of issue events (differing comment types in the database) via the API. I am proposing a new API route on repo issues that gets the same data as-is displayed on the GUI below the issue description (see screenshot), similar to the content rendered by the comments template (comments.tmpl).

The returned result could be an array of objects with the essential information from the timeline object.
For example:

[
    {
        "id": "2",
        "type": "7",
        "original_author": "NULL",
        "original_author_id": "0",
        "issue_id": "2",
        "label_id": "20",
        "old_milestone_id": "0",
        "milestone_id": "0",
        "assignee_id": "0",
        "removed_assignee": "False",
        "old_title": "NULL",
        "new_title": "NULL",
        "old_ref": "NULL",
        "new_ref": "NULL",
        "dependent_issue_id": "0",
        "date_created": "",
        "date_updated": ""
    },
  // ...
]

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/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