gitea/modules/structs
Sumit f09bea7af1
[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
..
activity.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
activitypub.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
admin_user.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
attachment.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
cron.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
doc.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fork.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
git_blob.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
git_hook.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
hook.go [Fix] Trigger 'unlabeled' event when label is Deleted from PR (#34316) 2025-09-24 09:45:38 -07:00
issue.go Exposing TimeEstimate field in the API (#35475) 2025-09-16 04:32:03 +00:00
issue_comment.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
issue_label.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
issue_milestone.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
issue_reaction.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
issue_stopwatch.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
issue_test.go Support issue template assignees (#31083) 2024-08-12 16:00:40 +08:00
issue_tracked_time.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
lfs_lock.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
mirror.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
miscellaneous.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
nodeinfo.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
notifications.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
org.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
org_member.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
org_team.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
package.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
pull.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
pull_review.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
release.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo.go Fix various typos in codebase (#35480) 2025-09-13 10:34:43 -04:00
repo_actions.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_branch.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_collaborator.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_commit.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_compare.go feat(api): implement branch/commit comparison API (#30349) 2024-04-16 11:45:04 +08:00
repo_file.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_key.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_note.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_refs.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_tag.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_topic.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_tree.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_watch.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
repo_wiki.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
secret.go Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
settings.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
status.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
task.go Make repo migration cancelable and fix various bugs (#24605) 2023-05-11 08:25:46 +00:00
user.go Fix various typos in codebase (#35480) 2025-09-13 10:34:43 -04:00
user_app.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
user_email.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
user_gpgkey.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
user_key.go Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
variable.go Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
visible_type.go change org_type.go to visible_type.go and fix the notes (#22752) 2023-02-09 06:40:34 +00:00