fix kserve url 404 #682
Workflow file for this run
This file contains hidden or 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
name: PR Title Validation | |
on: | |
pull_request: | |
types: [opened, edited, synchronize, reopened] | |
jobs: | |
validate-pr-title: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check PR Title Format | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
VALID_COMPONENTS="central-dashboard|katib|kserve|model-registry|notebooks|pipelines|spark-operator|trainer|gsoc|website|community" | |
if [[ ! "$PR_TITLE" =~ ^($VALID_COMPONENTS):\ .+ ]]; then | |
echo "❌ PR title does not follow the correct format: 'component_name: description'" | |
echo "Component value must be one of these central-dashboard|katib|kserve|model-registry|notebooks|pipelines|spark-operator|trainer|gsoc|website|community" | |
echo "Example: model-registry: Add model registry UI Installation instructions" | |
COMMENT_BODY="⚠️ **Invalid PR Title** ⚠️\n\nYour PR title \`$PR_TITLE\` does not match the required format: \`component_name: description\`.\n\n**Allowed components (case sensitive):** \`central-dashboard, katib, kserve, model-registry, notebooks, pipelines, spark-operator, trainer, gsoc, website, community\`\n\n✅ **Example:** \`model-registry: Add model registry UI Installation instructions\`\n\nPlease update your PR title accordingly by either using GITHUB GUI or by usinge \`/retitle component_name: description\` as stated above." | |
# Post the comment to the PR using GitHub API | |
curl -s -H "Authorization: token $GITHUB_TOKEN" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-X POST \ | |
https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments \ | |
-d "{\"body\": \"$COMMENT_BODY\"}" | |
exit 1 | |
fi | |
echo "✅ PR title format is correct." |