mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 20:36:07 +01:00 
			
		
		
		
	Update vendor of code.gitea.io/sdk/gitea
This commit is contained in:
		
							
								
								
									
										29
									
								
								vendor/code.gitea.io/sdk/gitea/hook.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								vendor/code.gitea.io/sdk/gitea/hook.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,4 +1,5 @@
 | 
			
		||||
// Copyright 2014 The Gogs Authors. All rights reserved.
 | 
			
		||||
// Copyright 2017 The Gitea Authors. All rights reserved.
 | 
			
		||||
// Use of this source code is governed by a MIT-style
 | 
			
		||||
// license that can be found in the LICENSE file.
 | 
			
		||||
 | 
			
		||||
@@ -147,6 +148,7 @@ type PayloadCommit struct {
 | 
			
		||||
var (
 | 
			
		||||
	_ Payloader = &CreatePayload{}
 | 
			
		||||
	_ Payloader = &PushPayload{}
 | 
			
		||||
	_ Payloader = &IssuePayload{}
 | 
			
		||||
	_ Payloader = &PullRequestPayload{}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -277,8 +279,33 @@ const (
 | 
			
		||||
	HookIssueLabelCleared HookIssueAction = "label_cleared"
 | 
			
		||||
	// HookIssueSynchronized synchronized
 | 
			
		||||
	HookIssueSynchronized HookIssueAction = "synchronized"
 | 
			
		||||
	// HookIssueMilestoned is an issue action for when a milestone is set on an issue.
 | 
			
		||||
	HookIssueMilestoned HookIssueAction = "milestoned"
 | 
			
		||||
	// HookIssueDemilestoned is an issue action for when a milestone is cleared on an issue.
 | 
			
		||||
	HookIssueDemilestoned HookIssueAction = "demilestoned"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// IssuePayload represents the payload information that is sent along with an issue event.
 | 
			
		||||
type IssuePayload struct {
 | 
			
		||||
	Secret     string          `json:"secret"`
 | 
			
		||||
	Action     HookIssueAction `json:"action"`
 | 
			
		||||
	Index      int64           `json:"number"`
 | 
			
		||||
	Changes    *ChangesPayload `json:"changes,omitempty"`
 | 
			
		||||
	Issue      *Issue          `json:"issue"`
 | 
			
		||||
	Repository *Repository     `json:"repository"`
 | 
			
		||||
	Sender     *User           `json:"sender"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetSecret modifies the secret of the IssuePayload.
 | 
			
		||||
func (p *IssuePayload) SetSecret(secret string) {
 | 
			
		||||
	p.Secret = secret
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// JSONPayload encodes the IssuePayload to JSON, with an indentation of two spaces.
 | 
			
		||||
func (p *IssuePayload) JSONPayload() ([]byte, error) {
 | 
			
		||||
	return json.MarshalIndent(p, "", "  ")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ChangesFromPayload FIXME
 | 
			
		||||
type ChangesFromPayload struct {
 | 
			
		||||
	From string `json:"from"`
 | 
			
		||||
@@ -308,7 +335,7 @@ type PullRequestPayload struct {
 | 
			
		||||
	Sender      *User           `json:"sender"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetSecret FIXME
 | 
			
		||||
// SetSecret modifies the secret of the PullRequestPayload.
 | 
			
		||||
func (p *PullRequestPayload) SetSecret(secret string) {
 | 
			
		||||
	p.Secret = secret
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user