@@ -73,6 +73,12 @@ pub(super) async fn handle_command(
73
73
issue_comment. comment. author_association,
74
74
AuthorAssociation :: Member | AuthorAssociation :: Owner
75
75
) {
76
+ tracing:: info!(
77
+ "{}#{} tried to register a concern, but author association isn't right: {:?}" ,
78
+ issue_comment. repository. full_name,
79
+ issue. number,
80
+ issue_comment. comment. author_association,
81
+ ) ;
76
82
issue
77
83
. post_comment (
78
84
& ctx. github ,
@@ -84,7 +90,9 @@ pub(super) async fn handle_command(
84
90
85
91
let mut client = ctx. db . get ( ) . await ;
86
92
let mut edit: EditIssueBody < ' _ , ConcernData > =
87
- EditIssueBody :: load ( & mut client, & issue, CONCERN_ISSUE_KEY ) . await ?;
93
+ EditIssueBody :: load ( & mut client, & issue, CONCERN_ISSUE_KEY )
94
+ . await
95
+ . context ( "unable to fetch the concerns data" ) ?;
88
96
let concern_data = edit. data_mut ( ) ;
89
97
90
98
// Process the command by either adding a new concern or resolving the old one
@@ -97,6 +105,11 @@ pub(super) async fn handle_command(
97
105
status : ConcernStatus :: Active ,
98
106
comment_url : comment_url. to_string ( ) ,
99
107
} ) ;
108
+ } else {
109
+ tracing:: info!(
110
+ "concern with the same name ({title}) already exists ({:?})" ,
111
+ & concern_data. concerns
112
+ ) ;
100
113
}
101
114
}
102
115
ConcernCommand :: Resolve { title } => concern_data
@@ -137,11 +150,14 @@ pub(super) async fn handle_command(
137
150
issue. post_comment (
138
151
& ctx. github ,
139
152
& format ! ( "*Psst, I was unable to add the labels ({labels}), could someone do it for me.*" ) ,
140
- ) . await ?;
153
+ ) . await . context ( "unable to post the comment failure it-self" ) ?;
141
154
}
142
155
} else {
143
156
for l in & config. labels {
144
- issue. remove_label ( & ctx. github , & l) . await ?;
157
+ issue
158
+ . remove_label ( & ctx. github , & l)
159
+ . await
160
+ . context ( "unable to remove the concern labels" ) ?;
145
161
}
146
162
}
147
163
0 commit comments