pull.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package gogs
  5. import (
  6. "time"
  7. )
  8. // PullRequest represents a pull reqesut API object.
  9. type PullRequest struct {
  10. // Copied from issue.go
  11. ID int64 `json:"id"`
  12. Index int64 `json:"number"`
  13. Poster *User `json:"user"`
  14. Title string `json:"title"`
  15. Body string `json:"body"`
  16. Labels []*Label `json:"labels"`
  17. Milestone *Milestone `json:"milestone"`
  18. Assignee *User `json:"assignee"`
  19. State StateType `json:"state"`
  20. Comments int `json:"comments"`
  21. HeadBranch string `json:"head_branch"`
  22. HeadRepo *Repository `json:"head_repo"`
  23. BaseBranch string `json:"base_branch"`
  24. BaseRepo *Repository `json:"base_repo"`
  25. HTMLURL string `json:"html_url"`
  26. Mergeable *bool `json:"mergeable"`
  27. HasMerged bool `json:"merged"`
  28. Merged *time.Time `json:"merged_at"`
  29. MergedCommitID *string `json:"merge_commit_sha"`
  30. MergedBy *User `json:"merged_by"`
  31. }