Skip to content

Commit 08b6070

Browse files
committed
Move create_release_management_pull_request to a new helper file
1 parent 8ebf981 commit 08b6070

3 files changed

Lines changed: 11 additions & 14 deletions

File tree

fastlane/Fastfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ REPOSITORY_NAME = 'WordPress-Android'
4848
########################################################################
4949
# Import domain-specific lanes
5050
########################################################################
51+
import 'helpers/github.rb'
5152
import 'lanes/build.rb'
5253
import 'lanes/localization.rb'
5354
import 'lanes/release.rb'

fastlane/helpers/github.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def create_release_management_pull_request(base_branch, title)
2+
create_pull_request(
3+
api_token: ENV['GITHUB_TOKEN'],
4+
repo: GHHELPER_REPO,
5+
title: title,
6+
head: Fastlane::Helper::GitHelper.current_git_branch,
7+
base: base_branch,
8+
labels: 'Releases'
9+
)
10+
end

fastlane/lanes/release_management_in_ci.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,4 @@
6262
environment: { RELEASE_VERSION: release_version, EDITORIAL_BRANCH: editorial_branch }
6363
)
6464
end
65-
66-
#####################################################################################
67-
# Release Management Utils
68-
#####################################################################################
69-
def create_release_management_pull_request(base_branch, title)
70-
create_pull_request(
71-
api_token: ENV['GITHUB_TOKEN'],
72-
repo: GHHELPER_REPO,
73-
title: title,
74-
head: Fastlane::Helper::GitHelper.current_git_branch,
75-
base: base_branch,
76-
labels: 'Releases'
77-
)
78-
end
7965
end

0 commit comments

Comments
 (0)