From 555553c641eefd7a80a82c3d8fb67c837ec4a092 Mon Sep 17 00:00:00 2001 From: vsoch Date: Sat, 7 Mar 2020 16:35:08 -0700 Subject: [PATCH] extra tags should be optional Signed-off-by: vsoch --- CHANGELOG.md | 2 +- scripts/generate-first-issues.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49d4013..75ccde9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Critical items to know are: - changed behaviour (recipe sections work differently) ## [master](https://github.com/rseng/good-first-issues/tree/master) - - add issue label and collection folder parameters (v1.0.2) + - add issue label and collection folder parameters, extra tags optional (v1.0.2) - ensure tags are sorted (v1.0.1) - first tagged released associated with blog post (v1.0.0) diff --git a/scripts/generate-first-issues.py b/scripts/generate-first-issues.py index d22ee4e..b7c8c2f 100755 --- a/scripts/generate-first-issues.py +++ b/scripts/generate-first-issues.py @@ -42,7 +42,14 @@ # Load repos for line in lines: - repo, extra_tags = line.strip().split(" ") + + # Extra tags are optional, separated by comma + extra_tags = "" + try: + repo, extra_tags = line.strip().split(" ") + except ValueError: + repo = line.strip() + extra_tags = extra_tags.split(",") repo = "/".join(repo.split("/")[-2:]) url = api_base.format(repo=repo)