mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Show github pull request status against branch
This commit is contained in:
parent
26c3e0d333
commit
bcb70119bb
81 changed files with 2837 additions and 453 deletions
24
pkg/commands/models/github.go
Normal file
24
pkg/commands/models/github.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package models
|
||||
|
||||
// TODO: see if I need to store the head repo name in case it differs from the base repo
|
||||
type GithubPullRequest struct {
|
||||
HeadRefName string `json:"headRefName"`
|
||||
Number int `json:"number"`
|
||||
State string `json:"state"` // "MERGED", "OPEN", "CLOSED"
|
||||
Url string `json:"url"`
|
||||
HeadRepositoryOwner GithubRepositoryOwner `json:"headRepositoryOwner"`
|
||||
}
|
||||
|
||||
func (pr *GithubPullRequest) UserName() string {
|
||||
// e.g. 'jesseduffield'
|
||||
return pr.HeadRepositoryOwner.Login
|
||||
}
|
||||
|
||||
func (pr *GithubPullRequest) BranchName() string {
|
||||
// e.g. 'feature/my-feature'
|
||||
return pr.HeadRefName
|
||||
}
|
||||
|
||||
type GithubRepositoryOwner struct {
|
||||
Login string `json:"login"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue