mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 04:43:03 -05:00
fix(): github action
This commit is contained in:
24
.github/workflows/label-issue.yml
vendored
24
.github/workflows/label-issue.yml
vendored
@@ -5,6 +5,22 @@ on:
|
|||||||
types: [ opened, edited ]
|
types: [ opened, edited ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-title:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check PR title
|
||||||
|
env:
|
||||||
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||||
|
run: |
|
||||||
|
echo "Checking PR Title: '$PR_TITLE'"
|
||||||
|
if [[ ! "$PR_TITLE" =~ ^Answer: ]]; then
|
||||||
|
echo "❌ PR title should start with 'Answer:[#challenge number]'"
|
||||||
|
echo "### ❌ PR title should start with 'Answer:[#challenge number]'" >> $GITHUB_STEP_SUMMARY
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "✅ PR title format is correct."
|
||||||
|
echo "### ✅ PR title format is correct." >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
add_labels:
|
add_labels:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ startsWith(github.event.pull_request.title, 'Answer') }}
|
if: ${{ startsWith(github.event.pull_request.title, 'Answer') }}
|
||||||
@@ -19,11 +35,3 @@ jobs:
|
|||||||
uses: ./.github/github-action/
|
uses: ./.github/github-action/
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
wrong_labels:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ !startsWith(github.event.pull_request.title, 'Answer') }}
|
|
||||||
steps:
|
|
||||||
- name: Set the value in bash
|
|
||||||
id: step_one
|
|
||||||
run: |
|
|
||||||
echo "::error PR title should start with Answer:[number of challenge]" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|||||||
Reference in New Issue
Block a user