Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

[WEAV-20] ✨ μ†Œμ…œ 둜그인 API λͺ¨μ˜ 응닡 κ΅¬ν˜„ #14

[WEAV-20] ✨ μ†Œμ…œ 둜그인 API λͺ¨μ˜ 응닡 κ΅¬ν˜„

[WEAV-20] ✨ μ†Œμ…œ 둜그인 API λͺ¨μ˜ 응닡 κ΅¬ν˜„ #14

name: PR title validation
on:
pull_request:
branches:
- main
permissions:
pull-requests: write
jobs:
pr-title-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: check pr title format
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_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 = /^\[WEAV-\d+\]/
if (!titlePattern.test(pull.title)) {
core.setFailed('PR 제λͺ©μ΄ `[WEAV-번호]` ν˜•μ‹μ„ λ”°λ₯΄μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.')
return
}
// PR 제λͺ©μ΄ ν˜•μ‹μ„ λ”°λ₯΄λ©΄ 아무 μ‘°μΉ˜λ„ μ·¨ν•˜μ§€ μ•ŠμŒ