Class: GithubFlowCli::IssueCommands
- Inherits:
-
Thor
- Object
- Thor
- GithubFlowCli::IssueCommands
- Defined in:
- lib/commands/issue.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
14 15 16 17 |
# File 'lib/commands/issue.rb', line 14 def all list_issues(assignee: '*', show_assignee: true) list_issues(assignee: 'none', show_assignee: true) end |
#create(title) ⇒ Object
9 10 11 |
# File 'lib/commands/issue.rb', line 9 def create(title) puts API.create_issue(title).html_url end |
#mine ⇒ Object
20 21 22 |
# File 'lib/commands/issue.rb', line 20 def mine list_issues(assignee: Config.username) end |
#start(number) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/commands/issue.rb', line 30 def start(number) # TODO: before filer unless Local.repo puts "not valid outside of a github repo." exit(4) end issue = API.issue(Local.repo, number) # TODO: create branch based on RepoRules # TODO: abstarct tag from issue title branch_name = "i_#{number}_#{issue.title.gsub(/[^_\w\d ]/, '').snakecase}" Local.git.branch(branch_name).checkout Config.link_branch_to_issue(branch_name, issue) rescue Octokit::NotFound puts "issue not found!" end |
#unassigned ⇒ Object
25 26 27 |
# File 'lib/commands/issue.rb', line 25 def unassigned list_issues(assignee: 'none') end |