Skip to content

Commit

Permalink
added tag support to cli
Browse files Browse the repository at this point in the history
partially addresss ticket #7
  • Loading branch information
masukomi committed Aug 9, 2016
1 parent d0bc51e commit 6679899
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changelog_entries/3f89da9c669a86550fa337302fa9ca48.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"Added","ticket":"7","url":"https://github.com/masukomi/changelog_manager/issues/7","description":"Added --with-tags=TAGS option enabling primary tag use-case","tags":[]}
5 changes: 4 additions & 1 deletion src/changelog_entry_generator.cr
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ class ChangelogEntryGenerator
end
description = ask_for_non_optional_input("Describe your change: ")
# TODO support tags
raw_tags = Readline.readline("Tags (Optional, comma separated): ")
tags = raw_tags.to_s.split(/,\s*/).select{|x| !x.nil? && x != ""}
# i don't trust them to follow instructions

changelog_entry = ChangelogEntry.new(change_type,
description,
ticket.to_s == "" ? nil : ticket.to_s,
url.to_s == "" ? nil : url.to_s,
[] of String)
tags)
# puts changelog_entry.to_json
new_entry_location = changelog_entry.export(cd)
success = false
Expand Down

0 comments on commit 6679899

Please sign in to comment.