gitea/modules/actions
Sumit f09bea7af1
Some checks failed
release-nightly / nightly-docker-rootless (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
[Fix] Trigger 'unlabeled' event when label is Deleted from PR (#34316)
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>
2025-09-24 09:45:38 -07:00
..
artifacts.go Redirect to a presigned URL of HEAD for HEAD requests (#35088) 2025-07-16 11:22:45 +00:00
github_test.go Improve the issue_comment workflow trigger event (#29277) 2024-02-22 22:47:35 +08:00
github.go Improve the issue_comment workflow trigger event (#29277) 2024-02-22 22:47:35 +08:00
log.go Support compression for Actions logs (#31761) 2024-08-09 10:10:30 +08:00
task_state_test.go Fix wrong status of Set up Job when first step is skipped (#32120) 2024-09-24 18:34:08 +00:00
task_state.go Fix wrong status of Set up Job when first step is skipped (#32120) 2024-09-24 18:34:08 +00:00
workflows_test.go [Fix] Trigger 'unlabeled' event when label is Deleted from PR (#34316) 2025-09-24 09:45:38 -07:00
workflows.go [Fix] Trigger 'unlabeled' event when label is Deleted from PR (#34316) 2025-09-24 09:45:38 -07:00