Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 3e1e3b7

Browse files
withoutboatsanp
authored andcommitted
Add 'proposed-final-coment-period' label. (rust-lang#154)
* Add 'entering-final-coment-period' label. * Add comment type to RfcBotComment * Type error. * Fix ref business. Former-commit-id: e717688
1 parent db85350 commit 3e1e3b7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/github/nag.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ impl<'a> RfcBotCommand<'a> {
776776
struct RfcBotComment<'a> {
777777
issue: &'a Issue,
778778
body: String,
779+
comment_type: CommentType<'a>,
779780
}
780781

781782
enum CommentType<'a> {
@@ -800,6 +801,7 @@ impl<'a> RfcBotComment<'a> {
800801
RfcBotComment {
801802
issue: issue,
802803
body: body,
804+
comment_type: comment_type,
803805
}
804806
}
805807

@@ -901,12 +903,18 @@ impl<'a> RfcBotComment<'a> {
901903
if CONFIG.post_comments {
902904

903905
if self.issue.open {
904-
Ok(match existing_comment {
906+
match existing_comment {
905907
Some(comment_id) => {
906908
GH.edit_comment(&self.issue.repository, comment_id, &self.body)
907909
}
908-
None => GH.new_comment(&self.issue.repository, self.issue.number, &self.body),
909-
}?)
910+
None => {
911+
if let CommentType::FcpProposed(..) = self.comment_type {
912+
let _ = GH.add_label(&self.issue.repository, self.issue.number,
913+
"proposed-final-comment-period");
914+
}
915+
GH.new_comment(&self.issue.repository, self.issue.number, &self.body)
916+
}
917+
}
910918
} else {
911919
info!("Skipping comment to {}#{}, the issue is no longer open",
912920
self.issue.repository,

0 commit comments

Comments
 (0)