refactor the code

This commit is contained in:
Yuki Osaki 2021-10-31 22:18:03 +09:00
parent c1f3fd6b3f
commit 515e2d2fa9
3 changed files with 12 additions and 4 deletions

View file

@ -8,6 +8,14 @@ type GithubPullRequest struct {
HeadRepositoryOwner GithubRepositoryOwner `json:"headRepositoryOwner"`
}
func (pr *GithubPullRequest) UserName() string {
return pr.HeadRepositoryOwner.Login
}
func (pr *GithubPullRequest) BranchName() string {
return pr.HeadRefName
}
type GithubRepositoryOwner struct {
ID string `json:"id"`
Name string `json:"name"`