mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix package webhook (#27839)
Fix #23742 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
		@@ -296,6 +296,20 @@ func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
 | 
			
		||||
	), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MSTeamsPayload) Package(p *api.PackagePayload) (api.Payloader, error) {
 | 
			
		||||
	title, color := getPackagePayloadInfo(p, noneLinkFormatter, false)
 | 
			
		||||
 | 
			
		||||
	return createMSTeamsPayload(
 | 
			
		||||
		p.Repository,
 | 
			
		||||
		p.Sender,
 | 
			
		||||
		title,
 | 
			
		||||
		"",
 | 
			
		||||
		p.Package.HTMLURL,
 | 
			
		||||
		color,
 | 
			
		||||
		&MSTeamsFact{"Package:", p.Package.Name},
 | 
			
		||||
	), nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetMSTeamsPayload converts a MSTeams webhook into a MSTeamsPayload
 | 
			
		||||
func GetMSTeamsPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) {
 | 
			
		||||
	return convertPayloader(new(MSTeamsPayload), p, event)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user