Skip to content

Commit 3b1878c

Browse files
committed
Avoid adding 2 empty lines when no custom additionnal PR body provided
Also fix the create_pr_with_updates command. Missing comma
1 parent 3ca2324 commit 3b1878c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Rakefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,15 @@ BASE_BRANCH_MAJOR_VERSION = if BASE_BRANCH == 'master'
221221
end
222222

223223
def create_pull_request(project_name, branch, custom_pr_comment, base=BASE_BRANCH)
224+
body = [
225+
"These are some updates, generated from rspec-dev's rake tasks.",
226+
custom_pr_comment
227+
].join("\n\n").strip
228+
224229
github_client.create_pull_request(
225230
"rspec/#{project_name}", base, branch,
226231
"Updates from rspec-dev (#{Date.today.iso8601})",
227-
["These are some updates, generated from rspec-dev's rake tasks.", custom_pr_comment].join("\n\n")
232+
body
228233
)
229234
end
230235

@@ -372,7 +377,7 @@ namespace :common_plaintext_files do
372377
end
373378

374379
desc "Updates the common plaintext files files and creates a PR"
375-
task :create_pr_with_updates :custom_pr_comment do |_t, args|
380+
task :create_pr_with_updates, :custom_pr_comment do |_t, args|
376381
force_update(update_common_plaintext_files_in_repos, args[:custom_pr_comment])
377382
end
378383
end

0 commit comments

Comments
 (0)