Skip to content

Release v2.0.1

Release v2.0.1 #14

name: Pull Request Checks
on:
pull_request:
branches:
- main
- release-please--branches--main
jobs:
check_pr_closure:
runs-on: ubuntu-latest
steps:
- name: Check if PR title contains 'release'
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
# if: github.event.pull_request.merged == true
id: check_title
run: |
title=$(jq -r .pull_request.title $GITHUB_EVENT_PATH)
if [[ "$title" == *"release"* ]]; then
echo "PR title contains 'release'."
approved_users=("username1") # List of approved GitHub usernames
user=$(jq -r .pull_request.user.login $GITHUB_EVENT_PATH)
if [[ ! " ${approved_users[@]} " =~ " $user " ]]; then
echo "Not authorized to close PR with 'release' title."
exit 1
fi
fi