Skip to content

Commit 94879de

Browse files
authored
Disable branch protection bypass when creating the release branch (#22517)
1 parent f0551b4 commit 94879de

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fastlane/lanes/release.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,18 @@
7373

7474
push_to_git_remote(tags: false)
7575

76+
# Copy the branch protection settings from the default branch to the new release branch
7677
copy_branch_protection(
7778
repository: GITHUB_REPO,
7879
from_branch: DEFAULT_BRANCH,
7980
to_branch: release_branch_name
8081
)
82+
# But allow admins to bypass restrictions, so that wpmobilebot can push to the release branch directly
83+
set_branch_protection(
84+
repository: GITHUB_REPO,
85+
branch: release_branch_name,
86+
enforce_admins: false
87+
)
8188

8289
begin
8390
# Move PRs to next milestone

0 commit comments

Comments
 (0)