Skip to content

Commit

Permalink
[Tooling] Rename GHHELPER_REPO to the standard GITHUB_REPO (#21636)
Browse files Browse the repository at this point in the history
* Rename `GHHELPER_REPO` to the standard `GITHUB_REPO`

* Rename remaining `GHHELPER_REPO` to `GITHUB_REPO` after merge from trunk

---------

Co-authored-by: Olivier Halligon <[email protected]>
  • Loading branch information
iangmaia and AliSoftware authored Jan 29, 2025
1 parent 5e4f07a commit f723fd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fastlane_require 'dotenv'
USER_ENV_FILE_PATH = File.join(Dir.home, '.wpandroid-env.default')
Dotenv.load(USER_ENV_FILE_PATH)

GHHELPER_REPO = 'wordpress-mobile/WordPress-Android'
GITHUB_REPO = 'wordpress-mobile/WordPress-Android'
DEFAULT_BRANCH = 'trunk'
REPOSITORY_NAME = 'WordPress-Android'

Expand Down
2 changes: 1 addition & 1 deletion fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def upload_prototype_build(product:, version_name:)
)

comment_on_pr(
project: GHHELPER_REPO,
project: GITHUB_REPO,
pr_number: Integer(ENV.fetch('BUILDKITE_PULL_REQUEST', nil)),
reuse_identifier: "#{product.downcase}-prototype-build-link",
body: comment_body
Expand Down
24 changes: 12 additions & 12 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,23 @@
push_to_git_remote(tags: false)

copy_branch_protection(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
from_branch: DEFAULT_BRANCH,
to_branch: "release/#{new_version}"
)

begin
# Move PRs to next milestone
moved_prs = update_assigned_milestone(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
from_milestone: new_version,
to_milestone: next_release_version,
comment: "Version `#{new_version}` has now entered code-freeze, so the milestone of this PR has been updated to `#{next_release_version}`."
)

# Add ❄️ marker to milestone title to indicate we entered code-freeze
set_milestone_frozen_marker(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
milestone: new_version
)
rescue StandardError => e
Expand All @@ -102,7 +102,7 @@
"👍 No open PR were targeting `#{new_version}` at the time of code-freeze"
else
"#{moved_prs.count} PRs targeting `#{new_version}` were still open and thus moved to `#{next_release_version}`:\n" \
+ moved_prs.map { |pr_num| "[##{pr_num}](https://github.com/#{GHHELPER_REPO}/pull/#{pr_num})" }.join(', ')
+ moved_prs.map { |pr_num| "[##{pr_num}](https://github.com/#{GITHUB_REPO}/pull/#{pr_num})" }.join(', ')
end

buildkite_annotate(style: moved_prs.empty? ? 'success' : 'warning', context: 'start-code-freeze', message: moved_prs_info) if is_ci
Expand Down Expand Up @@ -266,7 +266,7 @@
# Close hotfix milestone
begin
close_milestone(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
milestone: current_release_version
)
rescue StandardError => e
Expand Down Expand Up @@ -313,17 +313,17 @@

create_backmerge_pr

remove_branch_protection(repository: GHHELPER_REPO, branch: release_branch)
remove_branch_protection(repository: GITHUB_REPO, branch: release_branch)

# Close milestone
begin
set_milestone_frozen_marker(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
milestone: version_name,
freeze: false
)
close_milestone(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
milestone: version_name
)
rescue StandardError => e
Expand Down Expand Up @@ -362,7 +362,7 @@
UI.important "Publishing release #{version_number} on GitHub"

publish_github_release(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
name: version_number
)

Expand Down Expand Up @@ -475,7 +475,7 @@
File.write(tmp_file, unified_notes)

create_github_release(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
version: release_title,
release_notes_file_path: tmp_file,
prerelease: set_prerelease_flag,
Expand Down Expand Up @@ -575,7 +575,7 @@ def trigger_buildkite_release_build(branch:, beta:)

def create_backmerge_pr(source_branch: "release/#{current_release_version}", target_branch: nil)
pr_url = create_release_backmerge_pull_request(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
source_branch: source_branch,
target_branches: Array(target_branch),
labels: ['Releases'],
Expand Down Expand Up @@ -612,7 +612,7 @@ def ensure_branch_does_not_exist!(branch_name)
# Delete a branch remotely, after having removed any GitHub branch protection
#
def delete_remote_git_branch!(branch_name)
remove_branch_protection(repository: GHHELPER_REPO, branch: branch_name)
remove_branch_protection(repository: GITHUB_REPO, branch: branch_name)

Git.open(Dir.pwd).push('origin', branch_name, delete: true)
end
Expand Down

0 comments on commit f723fd8

Please sign in to comment.