Skip to content

툴 선 두께 변경 이벤트 구현 #5

툴 선 두께 변경 이벤트 구현

툴 선 두께 변경 이벤트 구현 #5

name: Apply Issue Template
on:
issues:
types: [opened]
jobs:
apply-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const issue = context.payload.issue;
const fullTemplate = fs.readFileSync('.github/ISSUE_TEMPLATE/feature-template.md', 'utf8');
const templateContent = fullTemplate.split('---').slice(2).join('---').trim();
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: templateContent
});