Skip to content

Commit 9ffe1a9

Browse files
committed
Forward GITHUB_USERNAME to the lanes
1 parent 247ebc5 commit 9ffe1a9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.buildkite/release-pipelines/code-freeze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ steps:
1818
install_gems
1919
2020
echo "--- :snowflake: Execute Code Freeze"
21-
bundle exec fastlane code_freeze version:"${RELEASE_VERSION}" skip_confirm:true
21+
bundle exec fastlane code_freeze version:"${RELEASE_VERSION}" github_username:"${GITHUB_USERNAME}" skip_confirm:true
2222
artifact_paths:
2323
- i18n/bundle-strings.pot
2424
agents:

.buildkite/release-pipelines/download-translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ steps:
1717
install_gems
1818
1919
echo "--- :earth_asia: Download Translations"
20-
bundle exec fastlane download_translations skip_confirm:true
20+
bundle exec fastlane download_translations github_username:"${GITHUB_USERNAME}" skip_confirm:true
2121
agents:
2222
queue: mac
2323
retry:

.buildkite/release-pipelines/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ steps:
1414
install_gems
1515
1616
echo "--- :shipit: Publish Release"
17-
bundle exec fastlane publish_release version:"${RELEASE_VERSION}" skip_confirm:true
17+
bundle exec fastlane publish_release version:"${RELEASE_VERSION}" github_username:"${GITHUB_USERNAME}" skip_confirm:true
1818
agents:
1919
queue: mac
2020
retry:

fastlane/Fastfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ end
128128
# @param version [String] The version to freeze (e.g., '1.7.4')
129129
# @param skip_confirm [Boolean] Skip interactive confirmation prompts (default: false)
130130
#
131-
lane :code_freeze do |version:, skip_confirm: false|
131+
lane :code_freeze do |version:, skip_confirm: false, github_username: nil|
132132
branch_name = "release/#{version}"
133133

134134
UI.important <<~PROMPT
@@ -173,7 +173,7 @@ lane :code_freeze do |version:, skip_confirm: false|
173173
push_to_git_remote(set_upstream: true)
174174

175175
# Create backmerge PR from the release branch to MAIN_BRANCH so that the strings bundle is uploaded to GlotPress
176-
create_backmerge_pr(source_branch: branch_name)
176+
create_backmerge_pr(source_branch: branch_name, github_username: github_username)
177177

178178
# Create the first beta (bumps version, commits, pushes, tags, triggers build)
179179
new_beta_release(version: "#{version}-beta1", skip_confirm: skip_confirm)
@@ -291,7 +291,7 @@ end
291291
# @param version [String] The version to publish (e.g., '1.7.4')
292292
# @param skip_confirm [Boolean] Skip interactive confirmation prompts (default: false)
293293
#
294-
lane :publish_release do |version:, skip_confirm: false|
294+
lane :publish_release do |version:, skip_confirm: false, github_username: nil|
295295
release_branch = "release/#{version}"
296296

297297
UI.important <<~PROMPT
@@ -309,7 +309,7 @@ lane :publish_release do |version:, skip_confirm: false|
309309
)
310310

311311
# Create backmerge PR with intermediate branch to handle conflicts
312-
create_backmerge_pr(source_branch: release_branch)
312+
create_backmerge_pr(source_branch: release_branch, github_username: github_username)
313313

314314
Fastlane::Helper::GitHelper.delete_remote_branch_if_exists!(release_branch)
315315
Fastlane::Helper::GitHelper.checkout_and_pull(MAIN_BRANCH)
@@ -371,7 +371,7 @@ end
371371
#
372372
# @param skip_confirm [Boolean] Skip interactive confirmation prompts (default: false)
373373
#
374-
lane :download_translations do |skip_confirm: false|
374+
lane :download_translations do |skip_confirm: false, github_username: nil|
375375
current_branch = Fastlane::Helper::GitHelper.current_branch_name
376376

377377
UI.important <<~PROMPT
@@ -419,7 +419,7 @@ lane :download_translations do |skip_confirm: false|
419419
labels: 'Releases',
420420
base: current_branch,
421421
head: translations_branch,
422-
reviewers: Array(ENV.fetch('GITHUB_USERNAME', nil))
422+
reviewers: Array(github_username)
423423
)
424424

425425
if is_ci? && pr_url
@@ -693,13 +693,13 @@ end
693693

694694
# Create a backmerge PR from the given source branch into the main branch
695695
# and post a Buildkite annotation with links to the created PRs.
696-
def create_backmerge_pr(source_branch:)
696+
def create_backmerge_pr(source_branch:, github_username: nil)
697697
created_prs = create_release_backmerge_pull_request(
698698
repository: GITHUB_REPO,
699699
source_branch: source_branch,
700700
default_branch: MAIN_BRANCH,
701701
labels: ['Releases'],
702-
reviewers: Array(ENV.fetch('GITHUB_USERNAME', nil))
702+
reviewers: Array(github_username)
703703
)
704704

705705
return unless is_ci? && created_prs && !created_prs.empty?

0 commit comments

Comments
 (0)