diff options
author | Giteabot <teabot@gitea.io> | 2024-05-26 12:53:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-26 12:53:42 +0800 |
commit | 1171b24d52f58a6f222f040936153222d32e03b4 (patch) | |
tree | 446c68b7cacc441c560277853d5bcf71d0206702 /modules | |
parent | 7d56ee3c0f7fae34131a82d44599a4caa09ad0ec (diff) | |
download | gitea-1171b24d52f58a6f222f040936153222d32e03b4.tar.gz gitea-1171b24d52f58a6f222f040936153222d32e03b4.zip |
Make gitea webhooks openproject compatible (#28435) (#31081)
Backport #28435 by Chief-Detektor
Co-authored-by: André Rosenhammer <andre.rosenhammer@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/structs/issue.go | 1 | ||||
-rw-r--r-- | modules/structs/pull.go | 6 | ||||
-rw-r--r-- | modules/structs/user.go | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/modules/structs/issue.go b/modules/structs/issue.go index 16242d18ad..3c06e38356 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -30,6 +30,7 @@ type PullRequestMeta struct { HasMerged bool `json:"merged"` Merged *time.Time `json:"merged_at"` IsWorkInProgress bool `json:"draft"` + HTMLURL string `json:"html_url"` } // RepositoryMeta basic repository information diff --git a/modules/structs/pull.go b/modules/structs/pull.go index b04def52b8..525d90c28e 100644 --- a/modules/structs/pull.go +++ b/modules/structs/pull.go @@ -21,8 +21,14 @@ type PullRequest struct { Assignees []*User `json:"assignees"` RequestedReviewers []*User `json:"requested_reviewers"` State StateType `json:"state"` + Draft bool `json:"draft"` IsLocked bool `json:"is_locked"` Comments int `json:"comments"` + // number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) + ReviewComments int `json:"review_comments"` + Additions int `json:"additions"` + Deletions int `json:"deletions"` + ChangedFiles int `json:"changed_files"` HTMLURL string `json:"html_url"` DiffURL string `json:"diff_url"` diff --git a/modules/structs/user.go b/modules/structs/user.go index ca6ab79944..5ed677f239 100644 --- a/modules/structs/user.go +++ b/modules/structs/user.go @@ -28,6 +28,8 @@ type User struct { Email string `json:"email"` // URL to the user's avatar AvatarURL string `json:"avatar_url"` + // URL to the user's gitea page + HTMLURL string `json:"html_url"` // User locale Language string `json:"language"` // Is the user an administrator |