aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authortilpner2020-05-29 11:36:29 +0200
committertilpner2020-05-29 11:36:29 +0200
commit23e93564ca7de185aacab4c494312d8b732922dd (patch)
tree1644046fe27dc48be07aa15a1d35a416eb95b6ba /src/main.rs
parent32139f8f178a40e3aff155a5bc035157f2cfca42 (diff)
downloadgithub-label-feed-23e93564ca7de185aacab4c494312d8b732922dd.tar.gz
github-label-feed-23e93564ca7de185aacab4c494312d8b732922dd.tar.xz
github-label-feed-23e93564ca7de185aacab4c494312d8b732922dd.zip
atom: add option to only include open issues
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 196e587..e544da1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,7 +31,9 @@ enum OptMode {
Atom {
repo: String,
out_path: PathBuf,
- labels: Vec<String>
+ labels: Vec<String>,
+ #[structopt(long)]
+ only_open: bool
}
}
@@ -127,9 +129,9 @@ fn main() -> Result<()> {
tx.commit().await?;
Ok(())
},
- OptMode::Atom { repo, out_path, labels } => {
+ OptMode::Atom { repo, out_path, labels, only_open } => {
let repo = parse_repo(&repo)?;
- atom::generate(&mut *pool.acquire().await?, repo, out_path, labels).await
+ atom::generate(&mut *pool.acquire().await?, repo, out_path, labels, only_open).await
.context("Failed to generate Atom feed")?;
Ok(())
}