We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8536956 + 01830e4 commit d2f19cfCopy full SHA for d2f19cf
src/handlers/ping.rs
@@ -65,12 +65,24 @@ pub(super) async fn handle_command(
65
}
66
};
67
68
- if let Some(label) = config.label.clone() {
69
- event
+ if let Some(label) = &config.label {
+ if let Err(err) = event
70
.issue()
71
.unwrap()
72
- .add_labels(&ctx.github, vec![github::Label { name: label }])
73
- .await?;
+ .add_labels(
+ &ctx.github,
74
+ vec![github::Label {
75
+ name: label.clone(),
76
+ }],
77
+ )
78
+ .await
79
+ {
80
+ let cmnt = ErrorComment::new(
81
+ &event.issue().unwrap(),
82
+ format!("Error adding team label (`{}`): {:?}.", label, err),
83
+ );
84
+ cmnt.post(&ctx.github).await?;
85
+ }
86
87
88
let mut users = Vec::new();
0 commit comments