mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
fix: correct assignee trigger test to handle different assignee properly (#178)
* fix: use direct assignee field * fix: correct assignee trigger test to handle different assignee properly The test was failing because the mockIssueAssignedContext was missing the top-level assignee field that the trigger validation logic checks. Added the missing assignee field to the mock context and updated the test to properly override both the top-level assignee and issue.assignee fields when testing assignment to a different user. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Adjust IssuesAssignedEvent import position (#2) --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,11 @@ describe("checkContainsTrigger", () => {
|
||||
...mockIssueAssignedContext,
|
||||
payload: {
|
||||
...mockIssueAssignedContext.payload,
|
||||
assignee: {
|
||||
...(mockIssueAssignedContext.payload as IssuesAssignedEvent)
|
||||
.assignee,
|
||||
login: "otherUser",
|
||||
},
|
||||
issue: {
|
||||
...(mockIssueAssignedContext.payload as IssuesAssignedEvent).issue,
|
||||
assignee: {
|
||||
|
||||
Reference in New Issue
Block a user