mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-14 21:15:18 +08:00
This pull request updates the handling of issue label events in workflows to distinguish between label additions and deletions, introduces corresponding test cases, and extends the `IssuePayload` structure to support this functionality. ### Enhancements to issue label event handling: * Updated `matchIssuesEvent` in `modules/actions/workflows.go` to differentiate between "labeled" and "unlabeled" events based on whether labels were added or removed. * Added a new field, `RemovedLabels`, to the `IssuePayload` struct in `modules/structs/hook.go` to track labels that were removed during an issue event. ### Testing improvements: * Added `TestMatchIssuesEvent` in `modules/actions/workflows_test.go` to cover scenarios such as label addition, label deletion, and label clearing, ensuring the correct event type is triggered. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> |
||
|---|---|---|
| .. | ||
| auth_test.go | ||
| auth.go | ||
| cleanup.go | ||
| clear_tasks.go | ||
| commit_status.go | ||
| context_test.go | ||
| context.go | ||
| init_test.go | ||
| init.go | ||
| interface.go | ||
| job_emitter_test.go | ||
| job_emitter.go | ||
| notifier_helper.go | ||
| notifier.go | ||
| rerun_test.go | ||
| rerun.go | ||
| schedule_tasks.go | ||
| task.go | ||
| variables.go | ||
| workflow.go | ||