1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-22 00:17:37 +02:00

WIP Add draft state, iterate on UI design

This commit is contained in:
Stefan Haller
2025-10-18 18:06:14 +02:00
parent 3d879bf94a
commit 335cbf7fe6
4 changed files with 61 additions and 16 deletions

View File

@@ -69,6 +69,7 @@ type PullRequestNode struct {
Url string `json:"url"`
HeadRepositoryOwner GithubRepositoryOwner `json:"headRepositoryOwner"`
State string `json:"state"`
IsDraft bool `json:"isDraft"`
}
type GithubRepositoryOwner struct {
@@ -90,6 +91,7 @@ func fetchPullRequestsQuery(branches []string, owner string, repo string) string
state
number
url
isDraft
headRepositoryOwner {
login
}
@@ -212,7 +214,7 @@ func (self *GitHubCommands) FetchRecentPRsAux(repoOwner string, repoName string,
HeadRefName: node.HeadRefName,
Number: node.Number,
Title: node.Title,
State: node.State,
State: lo.Ternary(node.IsDraft && node.State != "CLOSED", "DRAFT", node.State),
Url: node.Url,
HeadRepositoryOwner: models.GithubRepositoryOwner{
Login: node.HeadRepositoryOwner.Login,