class Dude::Commands::PR::Create
Attributes
id[R]
Public Instance Methods
call(id:)
click to toggle source
# File lib/dude/commands/pr/create.rb, line 13 def call(id:) @id = id client = CodeManagement::Github::Client.new client.create_pull_request(issue: issue, owner: owner, repo: repo, params: params) end
Private Instance Methods
issue()
click to toggle source
# File lib/dude/commands/pr/create.rb, line 27 def issue client = ProjectManagement::Client.new client.fetch_current_task(id) end
owner()
click to toggle source
# File lib/dude/commands/pr/create.rb, line 23 def owner repository_name.split('/')[0] end
params()
click to toggle source
# File lib/dude/commands/pr/create.rb, line 36 def params { head: Git::CurrentBranchName.new.call, base: BASE_BRANCH } end
repo()
click to toggle source
# File lib/dude/commands/pr/create.rb, line 32 def repo repository_name.split('/')[1] end
repository_name()
click to toggle source
# File lib/dude/commands/pr/create.rb, line 43 def repository_name @repository_name ||= Git::RemoteName.new.call end