Sha256: 26a97ea31faf94a4fea42a44ffd33c38cc2e9e777f24780da92b029cc755567c
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
module Cp8Cli class Story def start checkout_branch create_empty_commit push_branch create_wip_pull_request assign Command.title "Created WIP PR, run `cp8 open` to view." end private def checkout_branch branch.checkout end def create_empty_commit Command.run "git commit --allow-empty -m\"#{commit_message}\"", title: "Creating initial commit" end def commit_message escaped_title end def escaped_title title.gsub('"', '\"') end def push_branch branch.push end def create_wip_pull_request Github::PullRequest.create( from: branch.name, title: PullRequestTitle.new(title, prefixes: :wip).run, body: PullRequestBody.new(self).run ) end def branch @_branch ||= Branch.new(branch_name) end def branch_name BranchName.new(user: user, story: self).to_s end def user @_user ||= CurrentUser.new end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cp8_cli-8.2.0 | lib/cp8_cli/story.rb |