-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
[Fix] Trigger 'unlabeled' event when label is Deleted from PR #34316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ts for label addition/removal scenarios
…nd add corresponding tests
…gitea into label_delete_event_fix
Co-authored-by: Lunny Xiao <[email protected]>
|
The change in method |
I made changes in the relevant methods, but I'm not sure how to test those changes. @lunny, can you help validate this? |
You could create an integration test for this, there are mock runners and you can find some examples. |
…to Sumit189-label_delete_event_fix
|
last call @go-gitea/technical-oversight-committee |
…ea#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 <[email protected]>
…ea#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 <[email protected]>
* commit '53dfbbb2eee5f9ae7b1a127b51fd9ab5accf5e89': Update issue.go with labels documentation (labels content, not ids) (go-gitea#35522) Fix markup init after issue comment editing (go-gitea#35536) [Fix] Trigger 'unlabeled' event when label is Deleted from PR (go-gitea#34316) [skip ci] Updated translations via Crowdin
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
IssuePayloadstructure to support this functionality.Enhancements to issue label event handling:
matchIssuesEventinmodules/actions/workflows.goto differentiate between "labeled" and "unlabeled" events based on whether labels were added or removed.RemovedLabels, to theIssuePayloadstruct inmodules/structs/hook.goto track labels that were removed during an issue event.Testing improvements:
TestMatchIssuesEventinmodules/actions/workflows_test.goto cover scenarios such as label addition, label deletion, and label clearing, ensuring the correct event type is triggered.