mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Update status check for all supported on.pull_request.types in Gitea (#33117)
Thanks @Zettat123 Follow #33116 Fix #33051 on.pull_request.types doc: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request on.pull_request.types added in this PR: ``` assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled ``` unsupported types in Gitea: ``` // Unsupported activity types: // converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued ``` TODO: - [x] add test
This commit is contained in:
		@@ -154,7 +154,7 @@ func (run *ActionRun) GetPushEventPayload() (*api.PushPayload, error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (run *ActionRun) GetPullRequestEventPayload() (*api.PullRequestPayload, error) {
 | 
			
		||||
	if run.Event == webhook_module.HookEventPullRequest || run.Event == webhook_module.HookEventPullRequestSync {
 | 
			
		||||
	if run.Event.IsPullRequest() {
 | 
			
		||||
		var payload api.PullRequestPayload
 | 
			
		||||
		if err := json.Unmarshal([]byte(run.EventPayload), &payload); err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user