Bump clap from 4.5.27 to 4.5.28 #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==----------------------------------------------------------------== # | |
# SPDX-FileCopyrightText: © 2024-2025 Nayan Patil <nayantsg@proton.me> | |
# | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
# ==----------------------------------------------------------------== # | |
# Do not modify! | |
# This file was generated from a template using the necronux internal pkl package. | |
# Any changes should be made to the template, not this file. | |
name: Branch Protection | |
'on': | |
pull_request: {} | |
jobs: | |
protect-stable-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Ensure PRs are only from allowed branches | |
run: |- | |
# Check if the target branch is 'stable' | |
if [[ "${GITHUB_BASE_REF}" == "stable" ]]; then | |
# If targeting 'stable', ensure source branch is 'release/*' only | |
if ! [[ ${GITHUB_HEAD_REF} =~ ^release/.+ ]]; then | |
echo "Error: Pull requests to stable can only be from 'release/*' branches." | |
exit 1 | |
else | |
echo "Pull request to stable from allowed branch '${GITHUB_HEAD_REF}'." | |
fi | |
else | |
# If not targeting 'stable', skip the check and pass | |
echo "Pull request is not targeting 'stable'; no protection checks required." | |
fi |