Skip to content

feat: update github action config --story=119540612 #19

feat: update github action config --story=119540612

feat: update github action config --story=119540612 #19

Workflow file for this run

name: "Label PR based on title"
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
label-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Label PR
env:
GH_TOKEN: ${{ secrets.MY_GITHUB_SECRET }}
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ "$PR_TITLE" == "fix:"* ]]; then
GH_TOKEN="${{ secrets.MY_GITHUB_SECRET }}" gh pr edit ${{ github.event.pull_request.number }} --add-label bugfix
elif [[ "$PR_TITLE" == "feat:"* ]]; then
GH_TOKEN="${{ secrets.MY_GITHUB_SECRET }}" gh pr edit ${{ github.event.pull_request.number }} --add-label feature
else
echo "No label with this title: $PR_TITLE"
fi