Skip to content

Commit

Permalink
Rename s/GHHELPER_REPO/GITHUB_REPO/ constant
Browse files Browse the repository at this point in the history
For consistency with our other repos
  • Loading branch information
AliSoftware committed Dec 13, 2024
1 parent 465c1f7 commit b46110e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ CODE_SIGNING_STORAGE_OPTIONS = {
s3_region: 'us-east-2'
}.freeze

GHHELPER_REPO = 'Automattic/pocket-casts-ios'
GITHUB_URL = "https://github.com/#{GHHELPER_REPO}".freeze
GITHUB_REPO = 'Automattic/pocket-casts-ios'
GITHUB_URL = "https://github.com/#{GITHUB_REPO}".freeze
DEFAULT_BRANCH = 'trunk'

SCHEME = 'pocketcasts'
Expand Down Expand Up @@ -331,7 +331,7 @@ platform :ios do
# We cannot use the `copy_branch_protection` action here yet, as it would create a branch protection rule with the same
# restrictions we have in `trunk`, and the release managers wouldn't be able to push due to permissions.
# This should be changed only when we have PCiOS releases done on CI, when the CI bot is the one running `git push`.
set_branch_protection(repository: GHHELPER_REPO, branch: release_branch_name)
set_branch_protection(repository: GITHUB_REPO, branch: release_branch_name)

# Move still-open PRs to next milestone, then add frozen marker to milestone title
update_milestone
Expand Down Expand Up @@ -425,9 +425,9 @@ platform :ios do
UI.success "Done! New Build Code: #{build_code_current}"

# Wrap up
remove_branch_protection(repository: GHHELPER_REPO, branch: release_branch_name)
set_milestone_frozen_marker(repository: GHHELPER_REPO, milestone: release_version_current, freeze: false)
close_milestone(repository: GHHELPER_REPO, milestone: release_version_current)
remove_branch_protection(repository: GITHUB_REPO, branch: release_branch_name)
set_milestone_frozen_marker(repository: GITHUB_REPO, milestone: release_version_current, freeze: false)
close_milestone(repository: GITHUB_REPO, milestone: release_version_current)

# Start the build

Expand Down Expand Up @@ -461,7 +461,7 @@ platform :ios do
UI.important "Publishing release #{version_number} on GitHub"

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

Expand Down Expand Up @@ -734,7 +734,7 @@ platform :ios do

UI.message("Creating #{version} release on GitHub...")
set_github_release(
repository_name: GHHELPER_REPO,
repository_name: GITHUB_REPO,
api_token: get_required_env!('GITHUB_TOKEN'),
name: version,
tag_name: version,
Expand Down Expand Up @@ -1193,15 +1193,15 @@ platform :ios do
begin
# Move PRs to next milestone
moved_prs = update_assigned_milestone(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
from_milestone: new_version,
to_milestone: next_version,
comment: "Version `#{new_version}` has now entered code-freeze, so the milestone of this PR has been updated to `#{next_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 @@ -1225,7 +1225,7 @@ platform :ios do
"👍 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_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
end
Expand All @@ -1234,7 +1234,7 @@ platform :ios do
#
def create_backmerge_pr
create_release_backmerge_pull_request(
repository: GHHELPER_REPO,
repository: GITHUB_REPO,
source_branch: release_branch_name,
default_branch: DEFAULT_BRANCH,
labels: ['Releases'],
Expand Down Expand Up @@ -1320,7 +1320,7 @@ platform :ios do
)

comment_on_pr(
project: GHHELPER_REPO,
project: GITHUB_REPO,
pr_number: Integer(ENV.fetch('BUILDKITE_PULL_REQUEST', nil)),
reuse_identifier: 'prototype-build-link-pocket-casts',
body: comment_body
Expand Down

0 comments on commit b46110e

Please sign in to comment.