7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/abak-flow/commands/publish.rb', line 7
def run(args, options)
Checkup.new.process(Array.new, ::Commander::Command::Options.new)
head = Branch.new(Manager.git.current_branch)
base = Branch.new(options.base || head.)
title = options.title || head.
body = options.body || head.extract_body
pr = PullRequest.new(base: base, head: head, title: title, body: body)
validate_request(pr)
say white {
Manager.locale.word(self, "updating",
branch: bold { head },
upstream: bold { "#{Manager.repository.origin}" })
}
head.update
say white {
Manager.locale.word(self, "publicating",
branch: bold { "#{Manager.repository.origin.owner}:#{head}" },
upstream: bold { "#{Manager.repository.origin}" })
}
publicate_request(pr)
say green { pr.link }
end
|