@@ -780,7 +780,7 @@ platform :ios do
780780 Branch: `#{ ENV . fetch ( 'BUILDKITE_BRANCH' , 'N/A' ) } `
781781 Commit: #{ ENV . fetch ( 'BUILDKITE_COMMIT' , 'N/A' ) [ 0 ...7 ] }
782782 NOTES
783- release_notes += "Pull Request: ##{ pull_request_number } " unless pull_request_number . nil?
783+ release_notes += "Pull Request: ##{ PULL_REQUEST_NUMBER } " unless PULL_REQUEST_NUMBER . nil?
784784
785785 firebase_app_distribution (
786786 app : FIREBASE_APP_ID ,
@@ -796,13 +796,13 @@ platform :ios do
796796 dsym_path : './build/WooCommerce.app.dSYM.zip'
797797 )
798798
799- next if pull_request_number . nil?
799+ next if PULL_REQUEST_NUMBER . nil?
800800
801801 # PR Comment
802802 comment_body = prototype_build_details_comment ( app_display_name : 'WooCommerce iOS Prototype' )
803803 comment_on_pr (
804804 project : GITHUB_REPO ,
805- pr_number : pull_request_number ,
805+ pr_number : PULL_REQUEST_NUMBER ,
806806 reuse_identifier : 'prototype-build-link' ,
807807 body : comment_body
808808 )
@@ -812,7 +812,7 @@ platform :ios do
812812 lane :build_for_prototype_build do |fetch_code_signing : true |
813813 update_certs_and_profiles_enterprise if fetch_code_signing
814814
815- pr_prefix = pull_request_number &.then { |num | "pr#{ num } " }
815+ pr_prefix = PULL_REQUEST_NUMBER &.then { |num | "pr#{ num } " }
816816 commit_short_hash = ENV . fetch ( 'BUILDKITE_COMMIT' , '0' ) [ 0 ...7 ]
817817 build_number = [ pr_prefix , commit_short_hash ] . compact . join ( '-' )
818818
@@ -1526,11 +1526,8 @@ TEST_ANALYTICS_ENVIRONMENT = %w[
15261526# Release Management Utils
15271527# -----------------------------------------------------------------------------------
15281528
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
1529+ # Buildkite sets this env var to the PR number if on a PR, but to 'false' (and not nil) if not on a PR
1530+ PULL_REQUEST_NUMBER = ENV [ 'BUILDKITE_PULL_REQUEST' ] &.then { |n | n == 'false' ? nil : Integer ( n ) }
15341531
15351532def create_backmerge_pr
15361533 version = release_version_current
0 commit comments