X Tutup
Skip to content

Viewing issues and PRs in CLI should show the state (open, closed, merged) #652

@doi-t

Description

@doi-t

Describe the feature or problem you’d like to solve

Currently, issue view --preview shows who created an issue regardless of its state.

Screenshot 2020-03-14 at 5 35 27

However, I think that what we actually want to see is the last event state such as Opened, Closed and Reopened (I guess Locked, Unlocked and Transferred could be included) and who made the last event.

Proposed solution

IssueTimelineItemsItemType provides various issue events and we can extract the last event.

Ref. https://github.community/t5/GitHub-API-Development-and/GraphQL-repo-issues-has-no-closedBy-field/m-p/26858/highlight/true#M2173

I gave a shot with 58f6be...doi-t:cf6e746 and it seems it is possible to do like below. These captures show the last state and its actor instead of the author of the issue.

Screenshot 2020-03-14 at 5 33 32
Screenshot 2020-03-14 at 5 33 02
Screenshot 2020-03-14 at 5 34 06

If it makes sense to everyone and is fine with contributing guide, I'd happy to work on it with unit tests for each event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLI

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup