File tree Expand file tree Collapse file tree 4 files changed +29
-5
lines changed Expand file tree Collapse file tree 4 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ use tera::{Context, Tera};
9
9
use crate :: {
10
10
github:: { self , GithubClient , Repository } ,
11
11
http_client:: { CompilerMeeting , HttpClient } ,
12
- rfcbot,
13
12
} ;
14
13
15
14
#[ async_trait]
@@ -62,14 +61,20 @@ pub struct FCPConcernDetails {
62
61
pub concern_url : String ,
63
62
}
64
63
64
+ #[ derive( Serialize , Deserialize , Debug ) ]
65
+ pub struct FCPReviewerDetails {
66
+ pub github_login : String ,
67
+ pub zulip_id : Option < u64 > ,
68
+ }
69
+
65
70
#[ derive( Serialize , Deserialize , Debug ) ]
66
71
pub struct FCPDetails {
67
72
pub bot_tracking_comment_html_url : String ,
68
73
pub bot_tracking_comment_content : String ,
69
74
pub initiating_comment_html_url : String ,
70
75
pub initiating_comment_content : String ,
71
76
pub disposition : String ,
72
- pub pending_reviewers : Vec < rfcbot :: Reviewer > ,
77
+ pub pending_reviewers : Vec < FCPReviewerDetails > ,
73
78
pub concerns : Vec < FCPConcernDetails > ,
74
79
}
75
80
Original file line number Diff line number Diff line change @@ -1719,6 +1719,12 @@ impl<'q> IssuesQuery for Query<'q> {
1719
1719
HashMap :: new ( )
1720
1720
} ;
1721
1721
1722
+ let zulip_map = if include_fcp_details {
1723
+ Some ( crate :: team_data:: zulip_map ( client) . await ?)
1724
+ } else {
1725
+ None
1726
+ } ;
1727
+
1722
1728
let mut issues_decorator = Vec :: new ( ) ;
1723
1729
let re = regex:: Regex :: new ( "https://github.com/rust-lang/|/" ) . unwrap ( ) ;
1724
1730
let re_zulip_link = regex:: Regex :: new ( r"\[stream\]:\s" ) . unwrap ( ) ;
@@ -1761,7 +1767,20 @@ impl<'q> IssuesQuery for Query<'q> {
1761
1767
pending_reviewers : fcp
1762
1768
. reviews
1763
1769
. iter ( )
1764
- . filter_map ( |r| ( !r. approved ) . then ( || r. reviewer . clone ( ) ) )
1770
+ . filter_map ( |r| {
1771
+ ( !r. approved ) . then ( || crate :: actions:: FCPReviewerDetails {
1772
+ github_login : r. reviewer . login . clone ( ) ,
1773
+ zulip_id : zulip_map
1774
+ . as_ref ( )
1775
+ . map ( |map| {
1776
+ map. users
1777
+ . iter ( )
1778
+ . find ( |& ( _, & github) | github == r. reviewer . id )
1779
+ . map ( |v| * v. 0 )
1780
+ } )
1781
+ . flatten ( ) ,
1782
+ } )
1783
+ } )
1765
1784
. collect ( ) ,
1766
1785
concerns : fcp
1767
1786
. concerns
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub struct FCP {
15
15
}
16
16
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
17
17
pub struct Reviewer {
18
- pub id : u32 ,
18
+ pub id : u64 ,
19
19
pub login : String ,
20
20
}
21
21
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
Original file line number Diff line number Diff line change 4
4
{%- for issue in issues %}
5
5
{%- if issue.fcp_details is object %}
6
6
{{indent}}- {{issue.fcp_details.disposition}}: [{{issue.title}} ({{issue.repo_name}}#{{issue.number}})]({{issue.fcp_details.bot_tracking_comment_html_url}})
7
- {{indent}}{{indent}}-{% for reviewer in issue.fcp_details.pending_reviewers %} @**{{reviewer.login }}**{%else%} no pending checkboxs{% endfor %}
7
+ {{indent}}{{indent}}-{% for reviewer in issue.fcp_details.pending_reviewers %} @**| {{reviewer.zulip_id }}**{%else%} no pending checkboxs{% endfor %}
8
8
{{indent}}{{indent}}-{% for concern in issue.fcp_details.concerns %} [{{concern.name}} (by {{concern.reviewer_login}})]({{concern.concern_url}}){%else%} no pending concerns{% endfor -%}
9
9
{% else %}
10
10
{{indent}}- "{{issue.title}}" {{issue.repo_name}}#{{issue.number}}
You can’t perform that action at this time.
0 commit comments