@@ -29,6 +29,9 @@ WORKSPACE_PATH = File.join(PROJECT_ROOT_FOLDER, 'WooCommerce.xcworkspace')
2929FIREBASE_APP_ID = '1:124902176124:ios:02259de1e7c42b291620f9'
3030FIREBASE_TESTERS_GROUP = 'woocommerce-ios---prototype-builds'
3131
32+ # Buildkite sets this env var to the PR number if on a PR, but to 'false' (and not nil) if not on a PR
33+ pull_request_number = ENV [ 'BUILDKITE_PULL_REQUEST' ] &.then { |n | n == 'false' ? nil : Integer ( n ) }
34+
3235BUILDKITE_RELEASE_PIPELINE = 'release-builds.yml'
3336IOS_LOCALES = %w[ ar-SA de-DE en-US es-ES fr-FR he id it ja ko nl-NL pt-BR ru sv tr zh-Hans zh-Hant ] . freeze
3437SIMULATOR_VERSION = '18.5' # For screenshots
@@ -777,10 +780,10 @@ platform :ios do
777780 build_for_prototype_build
778781
779782 release_notes = <<~NOTES
780- Pull Request: ##{ pull_request_number || 'N/A' }
781783 Branch: `#{ ENV . fetch ( 'BUILDKITE_BRANCH' , 'N/A' ) } `
782784 Commit: #{ ENV . fetch ( 'BUILDKITE_COMMIT' , 'N/A' ) [ 0 ...7 ] }
783785 NOTES
786+ release_notes += "Pull Request: ##{ pull_request_number } " unless pull_request_number . nil?
784787
785788 firebase_app_distribution (
786789 app : FIREBASE_APP_ID ,
@@ -1526,12 +1529,6 @@ TEST_ANALYTICS_ENVIRONMENT = %w[
15261529# Release Management Utils
15271530# -----------------------------------------------------------------------------------
15281531
1529- def pull_request_number
1530- # Buildkite sets this env var to the PR number if on a PR, but to 'false' (and not nil) if not on a PR
1531- pr_num = ENV . fetch ( 'BUILDKITE_PULL_REQUEST' , 'false' )
1532- pr_num == 'false' ? nil : Integer ( pr_num )
1533- end
1534-
15351532def create_backmerge_pr
15361533 version = release_version_current
15371534
0 commit comments