aboutsummaryrefslogtreecommitdiff
path: root/src/query/issues.rs
diff options
context:
space:
mode:
authortilpner2020-05-28 19:34:05 +0200
committertilpner2020-05-28 19:34:05 +0200
commit6f0beed9c2219268807b9a7302ec374431624043 (patch)
tree8822151aa7ad77e42e71de6c514a03e1caa1af92 /src/query/issues.rs
parentda07a2ca3a8c5ee97eac179b28dc3d4a064fd026 (diff)
downloadgithub-label-feed-6f0beed9c2219268807b9a7302ec374431624043.tar.gz
github-label-feed-6f0beed9c2219268807b9a7302ec374431624043.tar.xz
github-label-feed-6f0beed9c2219268807b9a7302ec374431624043.zip
atom: add state, other labels, update time, author
Diffstat (limited to 'src/query/issues.rs')
-rw-r--r--src/query/issues.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/query/issues.rs b/src/query/issues.rs
index c829a22..b9473d3 100644
--- a/src/query/issues.rs
+++ b/src/query/issues.rs
@@ -30,6 +30,14 @@ fn state_to_integer(state: issues_query::IssueState) -> i64 {
}
}
+pub fn integer_to_state_desc(state: i64) -> Option<String> {
+ match state {
+ 0 => Some("open"),
+ 1 => Some("closed"),
+ _ => None
+ }.map(str::to_owned)
+}
+
pub async fn update(mut conn: &mut Conn, github_api_token: &str, (ref owner, ref name): (String, String)) -> anyhow::Result<()> {
let repo = repo_id(conn, owner, name).await?;