Files
angular-challenges/.github/workflows/label-issue.yml

30 lines
777 B
YAML

name: Add Labels
on:
pull_request_target:
types: [ opened, edited ]
jobs:
add_labels:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.pull_request.title, 'Answer') }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install dependencies
run: npm i @actions/core @actions/github
- name: Add labels
uses: ./.github/github-action/
with:
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