• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rwjdk / TrelloDotNet / 23503848039

24 Mar 2026 05:41PM UTC coverage: 79.11% (-1.3%) from 80.414%
23503848039

push

github

rwjdk
## 2.4.0 (24th of March 2026)
- Added support for the new Recurring Due System (Warning: This seems to not be part of the official API (do not use the api.trello.com endpoint) but can still be set, but Atlassian might not promise backward compatibility / that this endpoint stay available to us)
  - `SetRecurringDueDateAsync` + `RemoveRecurringDueDateAsync`

2634 of 3612 branches covered (72.92%)

Branch coverage included in aggregate %.

300 of 404 new or added lines in 62 files covered. (74.26%)

21 existing lines in 6 files now uncovered.

4671 of 5622 relevant lines covered (83.08%)

149.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.72
/src/TrelloDotNet/Control/Webhook/WebhookDataReceiverSmartEvents.cs
1
using System.Threading.Tasks;
2
using TrelloDotNet.Model;
3
using TrelloDotNet.Model.Webhook;
4

5
namespace TrelloDotNet.Control.Webhook
6
{
7
    /// <summary>
8
    /// The various Smart Events that can be subscribed to
9
    /// </summary>
10
    public class WebhookDataReceiverSmartEvents
11
    {
12
        /// <summary>
13
        /// Occur when you move a card from one column to another
14
        /// </summary>
15
        public event WebhookEventHandler<WebhookSmartEventCardMovedToNewList> OnCardMovedToNewList;
16

17
        /// <summary>
18
        /// Occur when a card with a due date mark it as complete
19
        /// </summary>
20
        public event WebhookEventHandler<WebhookSmartEventDueMarkedAsComplete> OnDueCardIsMarkedAsComplete;
21

22
        /// <summary>
23
        /// Occur when a final check-item on a checklist is marked as complete and the whole Checklist is now complete
24
        /// </summary>
25
        public event WebhookEventHandler<WebhookSmartEventChecklistComplete> OnChecklistComplete;
26

27
        /// <summary>
28
        /// Occur when a member is added to a card
29
        /// </summary>
30
        public event WebhookEventHandler<WebhookSmartEventMemberAdded> OnMemberAddedToCard;
31

32
        /// <summary>
33
        /// Occur when a member is removed from a card
34
        /// </summary>
35
        public event WebhookEventHandler<WebhookSmartEventMemberRemoved> OnMemberRemovedFromCard;
36

37
        /// <summary>
38
        /// Occur when a label is added to a card
39
        /// </summary>
40
        public event WebhookEventHandler<WebhookSmartEventLabelAdded> OnLabelAddedToCard;
41

42
        /// <summary>
43
        /// Occur when a label is removed from a card
44
        /// </summary>
45
        public event WebhookEventHandler<WebhookSmartEventLabelRemoved> OnLabelRemovedFromCard;
46

47
        internal async Task FireEvent(WebhookAction action, TrelloClient trelloClient)
48
        {
49
            switch (action.Type)
8!
50
            {
51
                case "updateCard":
52
                    if (action.Data != null)
3✔
53
                    {
54
                        //OnCardMovedToNewList
55
                        if (OnCardMovedToNewList != null && action.Data.ListBefore != null && action.Data.ListAfter != null)
3✔
56
                        {
57
                            OnCardMovedToNewList?.Invoke(new WebhookSmartEventCardMovedToNewList(action));
1!
58
                        }
59

60
                        //OnDueCardIsMarkedAsComplete
61
                        if (OnDueCardIsMarkedAsComplete != null && action.Data.Card != null && action.Display != null && action.Data.Card.DueComplete.HasValue && action.Display.TranslationKey == "action_marked_the_due_date_complete")
3✔
62
                        {
63
                            OnDueCardIsMarkedAsComplete?.Invoke(new WebhookSmartEventDueMarkedAsComplete(action));
1!
64
                        }
65
                    }
66

67
                    break;
1✔
68
                case "updateCheckItemStateOnCard":
69
                    //OnChecklistComplete
70
                    if (OnChecklistComplete != null && action.Data?.CheckItem != null && action.Data.CheckItem.State == ChecklistItemState.Complete)
×
71
                    {
72
                        //Check if all items of checklist is complete using the API
NEW
73
                        Checklist checklistAsync = await trelloClient.GetChecklistAsync(action.Data.Checklist.Id);
×
74
                        if (checklistAsync.Items.TrueForAll(x => x.State == ChecklistItemState.Complete))
×
75
                        {
76
                            OnChecklistComplete?.Invoke(new WebhookSmartEventChecklistComplete(action));
×
77
                        }
78
                    }
79

80
                    break;
×
81
                case "addMemberToCard":
82
                    if (OnMemberAddedToCard != null && action.Data.Member != null)
1✔
83
                    {
84
                        OnMemberAddedToCard?.Invoke(new WebhookSmartEventMemberAdded(action));
1!
85
                    }
86

87
                    break;
1✔
88
                case "removeMemberFromCard":
89
                    if (OnMemberRemovedFromCard != null && action.Data.Member != null)
1✔
90
                    {
91
                        OnMemberRemovedFromCard?.Invoke(new WebhookSmartEventMemberRemoved(action));
1!
92
                    }
93

94
                    break;
1✔
95
                case "addLabelToCard":
96
                    if (OnLabelAddedToCard != null && action.Data.Label != null)
1✔
97
                    {
98
                        OnLabelAddedToCard?.Invoke(new WebhookSmartEventLabelAdded(action));
1!
99
                    }
100

101
                    break;
1✔
102
                case "removeLabelFromCard":
103
                    if (OnLabelRemovedFromCard != null && action.Data.Label != null)
1✔
104
                    {
105
                        OnLabelRemovedFromCard?.Invoke(new WebhookSmartEventLabelRemoved(action));
1!
106
                    }
107

108
                    break;
109
            }
110
        }
8✔
111
    }
112
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc