Class: Tenma::Prepare::ReleasePullreqs
- Inherits:
-
Object
- Object
- Tenma::Prepare::ReleasePullreqs
- Defined in:
- lib/tenma/prepare/release_pullreqs.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(context) ⇒ ReleasePullreqs
constructor
A new instance of ReleasePullreqs.
Constructor Details
#initialize(context) ⇒ ReleasePullreqs
Returns a new instance of ReleasePullreqs.
5 6 7 |
# File 'lib/tenma/prepare/release_pullreqs.rb', line 5 def initialize(context) @context = context end |
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/tenma/prepare/release_pullreqs.rb', line 9 def create @context.config.raw.release_pullreq.bases.each do |base_branch| pullreq = @context.client.create_pull_request( @context.config.github_reponame, base_branch, release_branch, formatted_title(base_branch), formatted_body(base_branch), ) @context.client.update_issue( @context.config.github_reponame, pullreq.number, labels: @context.config.raw.release_pullreq.labels, assignee: @context.release_manager.login, milestone: @context.milestone.number, ) end end |