[IDLE-000] 크롤링 시, 대상 사이트에서 알림창이 뜨는 경우에 대한 처리 #366
Workflow file for this run
This file contains 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: Pull Request Validator | |
on: | |
pull_request: | |
branches: | |
- develop | |
permissions: | |
pull-requests: write | |
jobs: | |
pr-validation: | |
runs-on: ubuntu-latest | |
name: Validate PR format | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check PR title format | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{secrets.GIT_TOKEN}} | |
script: | | |
const pull_number = context.issue.number | |
const owner = context.repo.owner | |
const repo = context.repo.repo | |
const { data: pull } = await github.rest.pulls.get({ | |
owner, | |
repo, | |
pull_number, | |
}) | |
const titlePattern = /^\[IDLE-\d+\]/ | |
if (!titlePattern.test(pull.title)) { | |
core.setFailed(`PR 제목이 [IDLE-번호] 형식을 따르지 않습니다.\nPR Title: ${pull.title}`) | |
return | |
} |