Skip to content
This repository was archived by the owner on Dec 2, 2022. It is now read-only.

Commit 35bf094

Browse files
author
Adam Warner
committed
ulong all the ints.
Overkill, but Github IDs on `status` events are already more than a 32bit signed int can handle.
1 parent 2315e6b commit 35bf094

File tree

7 files changed

+138
-138
lines changed

7 files changed

+138
-138
lines changed

Matterhook.NET/Webhooks/Discourse/Post.cs

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@ namespace Matterhook.NET.Webhooks.Discourse
44
{
55
public class Post
66
{
7-
public int id { get; set; }
7+
public ulong id { get; set; }
88
public string name { get; set; }
99
public string username { get; set; }
1010
public string avatar_template { get; set; }
1111
public DateTime created_at { get; set; }
1212
public string cooked { get; set; }
13-
public int post_number { get; set; }
14-
public int post_type { get; set; }
13+
public ulong post_number { get; set; }
14+
public ulong post_type { get; set; }
1515
public DateTime updated_at { get; set; }
16-
public int reply_count { get; set; }
17-
public int? reply_to_post_number { get; set; }
18-
public int quote_count { get; set; }
16+
public ulong reply_count { get; set; }
17+
public ulong? reply_to_post_number { get; set; }
18+
public ulong quote_count { get; set; }
1919
public object avg_time { get; set; }
20-
public int incoming_link_count { get; set; }
21-
public int reads { get; set; }
20+
public ulong incoming_link_count { get; set; }
21+
public ulong reads { get; set; }
2222
public float score { get; set; }
2323
public bool yours { get; set; }
24-
public int topic_id { get; set; }
24+
public ulong topic_id { get; set; }
2525
public string topic_slug { get; set; }
2626
public string topic_title { get; set; }
2727
public string display_username { get; set; }
2828
public object primary_group_name { get; set; }
2929
public object primary_group_flair_url { get; set; }
3030
public object primary_group_flair_bg_color { get; set; }
3131
public object primary_group_flair_color { get; set; }
32-
public int version { get; set; }
32+
public ulong version { get; set; }
3333
public object user_title { get; set; }
3434
public Reply_To_User reply_to_user { get; set; }
3535
public Actions_Summary[] actions_summary { get; set; }
3636
public bool moderator { get; set; }
3737
public bool admin { get; set; }
3838
public bool staff { get; set; }
39-
public int user_id { get; set; }
39+
public ulong user_id { get; set; }
4040
public bool hidden { get; set; }
4141
public object hidden_reason_id { get; set; }
42-
public int trust_level { get; set; }
42+
public ulong trust_level { get; set; }
4343
public object deleted_at { get; set; }
4444
public bool user_deleted { get; set; }
4545
public object edit_reason { get; set; }

Matterhook.NET/Webhooks/Discourse/Shared.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
public class Actions_Summary
44
{
5-
public int id { get; set; }
6-
public int count { get; set; }
5+
public ulong id { get; set; }
6+
public ulong count { get; set; }
77
public bool hidden { get; set; }
88
public bool can_act { get; set; }
99
}

Matterhook.NET/Webhooks/Discourse/Topic.cs

+31-31
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ namespace Matterhook.NET.Webhooks.Discourse
44
{
55
public class Topic
66
{
7-
public int id { get; set; }
7+
public ulong id { get; set; }
88
public string title { get; set; }
99
public string fancy_title { get; set; }
10-
public int posts_count { get; set; }
10+
public ulong posts_count { get; set; }
1111
public DateTime created_at { get; set; }
12-
public int views { get; set; }
13-
public int reply_count { get; set; }
14-
public int participant_count { get; set; }
15-
public int like_count { get; set; }
12+
public ulong views { get; set; }
13+
public ulong reply_count { get; set; }
14+
public ulong participant_count { get; set; }
15+
public ulong like_count { get; set; }
1616
public DateTime last_posted_at { get; set; }
1717
public bool visible { get; set; }
1818
public bool closed { get; set; }
@@ -21,32 +21,32 @@ public class Topic
2121
public string archetype { get; set; }
2222
public string slug { get; set; }
2323
public object category_id { get; set; }
24-
public int word_count { get; set; }
24+
public ulong word_count { get; set; }
2525
public object deleted_at { get; set; }
26-
public int pending_posts_count { get; set; }
27-
public int user_id { get; set; }
26+
public ulong pending_posts_count { get; set; }
27+
public ulong user_id { get; set; }
2828
public bool pm_with_non_human_user { get; set; }
2929
public object draft { get; set; }
3030
public string draft_key { get; set; }
31-
public int draft_sequence { get; set; }
31+
public ulong draft_sequence { get; set; }
3232
public object unpinned { get; set; }
3333
public bool pinned_globally { get; set; }
3434
public bool pinned { get; set; }
3535
public object pinned_at { get; set; }
3636
public object pinned_until { get; set; }
3737
public Details details { get; set; }
38-
public int highest_post_number { get; set; }
38+
public ulong highest_post_number { get; set; }
3939
public object deleted_by { get; set; }
4040
public bool has_deleted { get; set; }
4141
public Actions_Summary[] actions_summary { get; set; }
42-
public int chunk_size { get; set; }
42+
public ulong chunk_size { get; set; }
4343
public object bookmarked { get; set; }
4444
public bool message_archived { get; set; }
4545
public object[] tags { get; set; }
4646
public object featured_link { get; set; }
4747
public object topic_timer { get; set; }
4848
public string unicode_title { get; set; }
49-
public int message_bus_last_id { get; set; }
49+
public ulong message_bus_last_id { get; set; }
5050
public bool can_vote { get; set; }
5151
public object vote_count { get; set; }
5252
public bool user_voted { get; set; }
@@ -61,7 +61,7 @@ public class Details
6161
public Participant[] participants { get; set; }
6262
public Suggested_Topics[] suggested_topics { get; set; }
6363
public Link[] links { get; set; }
64-
public int notification_level { get; set; }
64+
public ulong notification_level { get; set; }
6565
public bool can_move_posts { get; set; }
6666
public bool can_edit { get; set; }
6767
public bool can_delete { get; set; }
@@ -75,31 +75,31 @@ public class Details
7575

7676
public class Created_By
7777
{
78-
public int id { get; set; }
78+
public ulong id { get; set; }
7979
public string username { get; set; }
8080
public string avatar_template { get; set; }
8181
}
8282

8383
public class Last_Poster
8484
{
85-
public int id { get; set; }
85+
public ulong id { get; set; }
8686
public string username { get; set; }
8787
public string avatar_template { get; set; }
8888
}
8989

9090
public class Allowed_Users
9191
{
92-
public int id { get; set; }
92+
public ulong id { get; set; }
9393
public string username { get; set; }
9494
public string avatar_template { get; set; }
9595
}
9696

9797
public class Participant
9898
{
99-
public int id { get; set; }
99+
public ulong id { get; set; }
100100
public string username { get; set; }
101101
public string avatar_template { get; set; }
102-
public int post_count { get; set; }
102+
public ulong post_count { get; set; }
103103
public object primary_group_name { get; set; }
104104
public object primary_group_flair_url { get; set; }
105105
public object primary_group_flair_color { get; set; }
@@ -108,33 +108,33 @@ public class Participant
108108

109109
public class Suggested_Topics
110110
{
111-
public int id { get; set; }
111+
public ulong id { get; set; }
112112
public string title { get; set; }
113113
public string fancy_title { get; set; }
114114
public string slug { get; set; }
115-
public int posts_count { get; set; }
116-
public int reply_count { get; set; }
117-
public int highest_post_number { get; set; }
115+
public ulong posts_count { get; set; }
116+
public ulong reply_count { get; set; }
117+
public ulong highest_post_number { get; set; }
118118
public object image_url { get; set; }
119119
public DateTime created_at { get; set; }
120120
public DateTime last_posted_at { get; set; }
121121
public bool bumped { get; set; }
122122
public DateTime bumped_at { get; set; }
123123
public bool unseen { get; set; }
124-
public int last_read_post_number { get; set; }
125-
public int unread { get; set; }
126-
public int new_posts { get; set; }
124+
public ulong last_read_post_number { get; set; }
125+
public ulong unread { get; set; }
126+
public ulong new_posts { get; set; }
127127
public bool pinned { get; set; }
128128
public object unpinned { get; set; }
129129
public bool visible { get; set; }
130130
public bool closed { get; set; }
131131
public bool archived { get; set; }
132-
public int notification_level { get; set; }
132+
public ulong notification_level { get; set; }
133133
public bool bookmarked { get; set; }
134134
public bool liked { get; set; }
135135
public string archetype { get; set; }
136-
public int like_count { get; set; }
137-
public int views { get; set; }
136+
public ulong like_count { get; set; }
137+
public ulong views { get; set; }
138138
public object category_id { get; set; }
139139
public object[] tags { get; set; }
140140
public object featured_link { get; set; }
@@ -156,8 +156,8 @@ public class Link
156156
public bool _internal { get; set; }
157157
public bool attachment { get; set; }
158158
public bool reflection { get; set; }
159-
public int clicks { get; set; }
160-
public int user_id { get; set; }
159+
public ulong clicks { get; set; }
160+
public ulong user_id { get; set; }
161161
public string domain { get; set; }
162162
}
163163

Matterhook.NET/Webhooks/Discourse/User.cs

+26-26
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Matterhook.NET.Webhooks.Discourse
55

66
public class User
77
{
8-
public int id { get; set; }
8+
public ulong id { get; set; }
99
public string username { get; set; }
1010
public string avatar_template { get; set; }
1111
public string name { get; set; }
@@ -20,21 +20,21 @@ public class User
2020
public object[] stats { get; set; }
2121
public bool can_send_private_messages { get; set; }
2222
public bool can_send_private_message_to_user { get; set; }
23-
public int trust_level { get; set; }
23+
public ulong trust_level { get; set; }
2424
public bool moderator { get; set; }
2525
public bool admin { get; set; }
2626
public object title { get; set; }
2727
public object uploaded_avatar_id { get; set; }
28-
public int badge_count { get; set; }
28+
public ulong badge_count { get; set; }
2929
public bool has_title_badges { get; set; }
3030
public object custom_fields { get; set; }
31-
public int pending_count { get; set; }
32-
public int profile_view_count { get; set; }
31+
public ulong pending_count { get; set; }
32+
public ulong profile_view_count { get; set; }
3333
public object primary_group_name { get; set; }
3434
public object primary_group_flair_url { get; set; }
3535
public object primary_group_flair_bg_color { get; set; }
3636
public object primary_group_flair_color { get; set; }
37-
public int post_count { get; set; }
37+
public ulong post_count { get; set; }
3838
public bool can_be_deleted { get; set; }
3939
public bool can_delete_all_posts { get; set; }
4040
public string locale { get; set; }
@@ -54,7 +54,7 @@ public class User
5454
public object custom_avatar_upload_id { get; set; }
5555
public object custom_avatar_template { get; set; }
5656
public object[] muted_usernames { get; set; }
57-
public int mailing_list_posts_per_day { get; set; }
57+
public ulong mailing_list_posts_per_day { get; set; }
5858
public bool can_change_bio { get; set; }
5959
public object user_api_keys { get; set; }
6060
public object invited_by { get; set; }
@@ -67,17 +67,17 @@ public class User
6767

6868
public class Private_Messages_Stats
6969
{
70-
public int all { get; set; }
71-
public int mine { get; set; }
72-
public int unread { get; set; }
70+
public ulong all { get; set; }
71+
public ulong mine { get; set; }
72+
public ulong unread { get; set; }
7373
}
7474

7575
public class User_Option
7676
{
77-
public int user_id { get; set; }
77+
public ulong user_id { get; set; }
7878
public bool email_always { get; set; }
7979
public bool mailing_list_mode { get; set; }
80-
public int mailing_list_mode_frequency { get; set; }
80+
public ulong mailing_list_mode_frequency { get; set; }
8181
public bool email_digests { get; set; }
8282
public bool email_private_messages { get; set; }
8383
public bool email_direct { get; set; }
@@ -87,26 +87,26 @@ public class User_Option
8787
public bool disable_jump_reply { get; set; }
8888
public object digest_after_minutes { get; set; }
8989
public bool automatically_unpin_topics { get; set; }
90-
public int auto_track_topics_after_msecs { get; set; }
91-
public int notification_level_when_replying { get; set; }
92-
public int new_topic_duration_minutes { get; set; }
93-
public int email_previous_replies { get; set; }
90+
public ulong auto_track_topics_after_msecs { get; set; }
91+
public ulong notification_level_when_replying { get; set; }
92+
public ulong new_topic_duration_minutes { get; set; }
93+
public ulong email_previous_replies { get; set; }
9494
public bool email_in_reply_to { get; set; }
95-
public int like_notification_frequency { get; set; }
95+
public ulong like_notification_frequency { get; set; }
9696
public bool include_tl0_in_digests { get; set; }
9797
public string theme_key { get; set; }
98-
public int theme_key_seq { get; set; }
98+
public ulong theme_key_seq { get; set; }
9999
}
100100

101101
public class Group
102102
{
103-
public int id { get; set; }
103+
public ulong id { get; set; }
104104
public bool automatic { get; set; }
105105
public string name { get; set; }
106106
public string display_name { get; set; }
107-
public int user_count { get; set; }
108-
public int alias_level { get; set; }
109-
public int visibility_level { get; set; }
107+
public ulong user_count { get; set; }
108+
public ulong alias_level { get; set; }
109+
public ulong visibility_level { get; set; }
110110
public object automatic_membership_email_domains { get; set; }
111111
public bool automatic_membership_retroactive { get; set; }
112112
public bool primary_group { get; set; }
@@ -123,15 +123,15 @@ public class Group
123123
public bool public_exit { get; set; }
124124
public bool allow_membership_requests { get; set; }
125125
public object full_name { get; set; }
126-
public int default_notification_level { get; set; }
126+
public ulong default_notification_level { get; set; }
127127
public object membership_request_template { get; set; }
128128
}
129129

130130
public class Group_Users
131131
{
132-
public int group_id { get; set; }
133-
public int user_id { get; set; }
134-
public int notification_level { get; set; }
132+
public ulong group_id { get; set; }
133+
public ulong user_id { get; set; }
134+
public ulong notification_level { get; set; }
135135
}
136136

137137
}

Matterhook.NET/Webhooks/DockerHub/Payload.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public class Repository
6666
public string Namespace { get; set; }
6767

6868
[JsonProperty(PropertyName = "star_count")]
69-
public int StarCount { get; set; }
69+
public ulong StarCount { get; set; }
7070

7171
[JsonProperty(PropertyName = "comment_count")]
72-
public int CommentCount { get; set; }
72+
public ulong CommentCount { get; set; }
7373

7474
[JsonConverter(typeof(UnixDateTimeConverter))]
7575
[JsonProperty(PropertyName = "date_created")]

0 commit comments

Comments
 (0)