Skip to content

Commit

Permalink
Merge pull request #21397 from wordpress-mobile/iangmaia/fix-update-a…
Browse files Browse the repository at this point in the history
…ppstore-strings

[Tooling] Fix `update_appstore_strings` backmerge PR creation
  • Loading branch information
iangmaia authored Nov 6, 2024
2 parents 236ee0d + a0f00a1 commit d252c35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fastlane/lanes/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

push_to_git_remote(tags: false)

create_backmerge_pr
create_backmerge_pr(source_branch: git_branch, target_branch: "release/#{version}")
end

# Updates the metadata in the Play Store (Main store listing) from the content of `fastlane/{metadata|jetpack_metadata}/android/*/*.txt` files
Expand Down
11 changes: 5 additions & 6 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,11 @@ def trigger_buildkite_release_build(branch:, beta:)
buildkite_annotate(style: 'info', context: 'trigger-release-build', message: message) if is_ci
end

def create_backmerge_pr
version = current_release_version

def create_backmerge_pr(source_branch: "release/#{current_release_version}", target_branch: nil)
pr_url = create_release_backmerge_pull_request(
repository: GHHELPER_REPO,
source_branch: "release/#{version}",
source_branch: source_branch,
target_branches: Array(target_branch),
labels: ['Releases'],
milestone_title: next_release_version
)
Expand All @@ -578,8 +577,8 @@ def create_backmerge_pr
#{e.message}
If this is not the first time you are running the release task, the backmerge PR for the version `#{version}` might have already been previously created.
Please close any previous backmerge PR for `#{version}`, delete the previous merge branch, then run the release task again.
If this is not the first time you are running the automation that creates a backmerge, the backmerge PR for the `#{source_branch}` branch might have already been previously created.
Please close any previous backmerge PR for the `#{source_branch}` branch, delete the previous merge branch, then run the release task again.
MESSAGE

buildkite_annotate(style: 'error', context: 'error-creating-backmerge', message: error_message) if is_ci
Expand Down

0 comments on commit d252c35

Please sign in to comment.