Skip to content

Commit 178ca79

Browse files
authored
Merge pull request #1622 from apiraino/fix/show-human-date-last-review
WG-prioritization: Show human readable last review date
2 parents c59b16a + 6fabf07 commit 178ca79

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/actions.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ pub struct IssueDecorator {
4343
pub repo_name: String,
4444
pub labels: String,
4545
pub assignees: String,
46-
pub updated_at: String,
46+
// Human (readable) timestamp
47+
pub updated_at_hts: String,
4748

4849
pub fcp_details: Option<FCPDetails>,
4950
}

src/github.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ impl<'q> IssuesQuery for Query<'q> {
11511151
.map(|u| u.login.as_ref())
11521152
.collect::<Vec<_>>()
11531153
.join(", "),
1154-
updated_at: crate::actions::to_human(issue.updated_at),
1154+
updated_at_hts: crate::actions::to_human(issue.updated_at),
11551155
fcp_details,
11561156
});
11571157
}

src/github/graphql.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl super::IssuesQuery for LeastRecentlyReviewedPullRequests {
308308
.take(50)
309309
.map(
310310
|(updated_at, number, title, html_url, repo_name, labels, assignees)| {
311-
let updated_at = crate::actions::to_human(updated_at);
311+
let updated_at_hts = crate::actions::to_human(updated_at);
312312

313313
crate::actions::IssueDecorator {
314314
number,
@@ -317,7 +317,7 @@ impl super::IssuesQuery for LeastRecentlyReviewedPullRequests {
317317
repo_name,
318318
labels,
319319
assignees,
320-
updated_at,
320+
updated_at_hts,
321321
fcp_details: None,
322322
}
323323
},

templates/_issue.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% macro render(issue, with_age="") %}"{{issue.title}}" [{{issue.repo_name}}#{{issue.number}}]({{issue.html_url}}) {% if with_age %}(last review activity: {{issue.updated_at}}){% endif %}{% endmacro %}
1+
{% macro render(issue, with_age="") %}"{{issue.title}}" [{{issue.repo_name}}#{{issue.number}}]({{issue.html_url}}) {% if with_age %}(last review activity: {{issue.updated_at_hts}}){% endif %}{% endmacro %}

0 commit comments

Comments
 (0)