Skip to content

Commit

Permalink
Array of labels
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Aug 12, 2022
1 parent dcf673b commit 92e2071
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.run(params)
Helper::RevenuecatInternalHelper.commmit_changes_and_push_current_branch("Version bump for #{new_version_number}")

pr_title = "Release/#{new_version_number}"
Helper::RevenuecatInternalHelper.create_pr_to_main(pr_title, changelog, repo_name, github_pr_token, "next_release")
Helper::RevenuecatInternalHelper.create_pr_to_main(pr_title, changelog, repo_name, github_pr_token, ["next_release"])
end

def self.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.run(params)

Helper::RevenuecatInternalHelper.commmit_changes_and_push_current_branch('Preparing for next version')

Helper::RevenuecatInternalHelper.create_pr_to_main("Prepare next version: #{next_version_snapshot}", nil, repo_name, github_pr_token, "next_release")
Helper::RevenuecatInternalHelper.create_pr_to_main("Prepare next version: #{next_version_snapshot}", nil, repo_name, github_pr_token, ["next_release"])
end

def self.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def self.commmit_changes_and_push_current_branch(commit_message)
Actions::PushToGitRemoteAction.run(remote: 'origin')
end

def self.create_pr_to_main(title, body, repo_name, github_pr_token, labels)
def self.create_pr_to_main(title, body, repo_name, github_pr_token, labels = [])
Actions::CreatePullRequestAction.run(
api_token: github_pr_token,
title: title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
let(:edited_changelog) { 'mock-edited-changelog' }
let(:current_version) { '1.12.0' }
let(:new_version) { '1.13.0' }
let(:labels) { 'next_release' }
let(:labels) { ['next_release'] }

it 'calls all the appropriate methods with appropriate parameters' do
allow(FastlaneCore::UI).to receive(:input).with('New version number: ').and_return(new_version)
Expand Down
2 changes: 1 addition & 1 deletion spec/actions/create_next_snapshot_version_action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:repo_name) { 'fake-repo-name' }
let(:current_version) { '1.12.0' }
let(:next_version) { '1.13.0-SNAPSHOT' }
let(:labels) { 'next_release' }
let(:labels) { ['next_release'] }

it 'calls all the appropriate methods with appropriate parameters' do
expect(Fastlane::Helper::RevenuecatInternalHelper).to receive(:validate_local_config_status_for_bump)
Expand Down
4 changes: 2 additions & 2 deletions spec/helper/revenuecat_internal_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ def setup_stubs
repo: 'RevenueCat/fake-repo-name',
head: 'fake-current-branch',
api_url: 'https://api.github.com',
labels: 'label_1, label_2'
labels: ['label_1', 'label_2']
).once
Fastlane::Helper::RevenuecatInternalHelper.create_pr_to_main('fake-title', 'fake-changelog', 'fake-repo-name', 'fake-github-pr-token', "label_1, label_2")
Fastlane::Helper::RevenuecatInternalHelper.create_pr_to_main('fake-title', 'fake-changelog', 'fake-repo-name', 'fake-github-pr-token', ['label_1', 'label_2'])
end
end

Expand Down

0 comments on commit 92e2071

Please sign in to comment.