Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .github/workflows/Abc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: build and test Backend

on: [push]

on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:

compliance:
Expand All @@ -14,9 +15,19 @@ jobs:
produce-artifacts:
runs-on: ubuntu-latest


steps:

- name: GitHub-Kontext anzeigen
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Show the PR Title
run: echo "The title is ${{ github.event.pull_request.title }}"
- name: Check title prefix
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
# The regex checks for line start (^), followed by keywords, and an optional description format
if [[ "$PR_TITLE" =~ ^(feat|fix|docs)(\(.*\))?: ]]; then
echo "Success: PR title starts with a valid prefix."
else
echo "Error: PR title must start with 'feat:', 'fix:', or 'docs:'."
echo "Current title: $PR_TITLE"
exit 1
fi
Loading