2024-08-24 22:03:30 +02:00
|
|
|
package common
|
|
|
|
|
2024-09-10 18:24:41 +02:00
|
|
|
/*
|
|
|
|
* This file is part of Autogits.
|
|
|
|
*
|
|
|
|
* Copyright © 2024 SUSE LLC
|
|
|
|
*
|
|
|
|
* Autogits is free software: you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU General Public License as published by the Free Software
|
|
|
|
* Foundation, either version 2 of the License, or (at your option) any later
|
|
|
|
* version.
|
|
|
|
*
|
|
|
|
* Autogits is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* Foobar. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2024-08-24 22:03:30 +02:00
|
|
|
type IssueDetail struct {
|
|
|
|
Id int
|
|
|
|
Number int
|
|
|
|
Html_url string
|
|
|
|
User *User
|
|
|
|
Title string
|
|
|
|
Body string
|
|
|
|
State string
|
2024-08-25 21:47:05 +02:00
|
|
|
|
|
|
|
Assignee *User
|
|
|
|
Assignees []*User
|
2024-08-24 22:03:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type IssueWebhookEvent struct {
|
|
|
|
Action string
|
|
|
|
|
|
|
|
Issue *IssueDetail
|
|
|
|
Repository *Repository
|
|
|
|
Sender *User
|
|
|
|
}
|
|
|
|
|
2024-08-25 21:57:54 +02:00
|
|
|
type CommentDetail struct {
|
|
|
|
Id int
|
|
|
|
Issue_Url string
|
|
|
|
Pull_Request_Url string
|
|
|
|
User *User
|
|
|
|
Body string
|
|
|
|
|
|
|
|
Created_At string
|
|
|
|
Updated_At string
|
|
|
|
}
|
|
|
|
|
|
|
|
type IssueCommentWebhookEvent struct {
|
|
|
|
Action string
|
|
|
|
|
|
|
|
Issue *IssueDetail
|
|
|
|
Comment *CommentDetail
|
|
|
|
Repository *Repository
|
|
|
|
Sender *User
|
|
|
|
}
|
2024-08-28 00:45:47 +02:00
|
|
|
|
|
|
|
func (i *IssueWebhookEvent) GetAction() string {
|
|
|
|
return i.Action
|
|
|
|
}
|
|
|
|
|
|
|
|
func (i *IssueCommentWebhookEvent) GetAction() string {
|
|
|
|
return i.Action
|
|
|
|
}
|