Skip to content

TC-3 Update main.yml #29

TC-3 Update main.yml

TC-3 Update main.yml #29

Workflow file for this run

name: Validate Pull Request
on:
pull_request: # Trigger on pull request events
jobs:
validate:
runs-on: ubuntu-latest # Run the workflow on Ubuntu virtual machine
steps:
- uses: actions/checkout@v3 # Checkout the repository code
- name: Check PR Title format
run: |
title=${{ github.event.pull_request.title }}
if [[ ! $title =~ ^[A-Za-z0-9]+: .+ ]]; then
echo "❌ Pull Request title must follow the format '[A-Za-z0-9]+: Description'"
exit 1 # Exit with failure if format doesn't match
fi
shell: bash # Use bash shell for regular expressions
- name: Check PR Description
run: |
description=${{ github.event.pull_request.body }}
if [[ -z "$description" ]]; then
echo "❌ Pull Request description is missing. Please provide a description of your changes."
exit 1 # Exit with failure if description is empty
fi
shell: bash # Use bash shell for string checks