Skip to content

Import course notes for initial chapters, add structure for other cha… #2

Import course notes for initial chapters, add structure for other cha…

Import course notes for initial chapters, add structure for other cha… #2

name: Enforce Handbook Naming Conventions
on:
create:
pull_request:
branches-ignore:
- 'dependabot/**'
jobs:
check-repo-name-conventions:
runs-on: ubuntu-latest
steps:
- name: Check repository name
run: |
REPO_NAME=${GITHUB_REPOSITORY##*/}
if [[ ! "$REPO_NAME" =~ ^([A-Z][A-Za-z0-9]*)(-[A-Z0-9][A-Za-z0-9]*)*$ ]]; then
echo "Repository name '$REPO_NAME' does not follow the naming convention established in the RSE Agile Method Handbook."
exit 1
fi
check-branch-name-conventions:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check branch name
run: |
if [[ ! "$GITHUB_HEAD_REF" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
echo "Branch name '$GITHUB_HEAD_REF' does not follow the naming convention established in the RSE Agile Method Handbook."
exit 1
fi