Skip to content

Be/bugfix/#612 공유 라이브러리 내에서 사용하는 패키지 못 찾음 #38

Be/bugfix/#612 공유 라이브러리 내에서 사용하는 패키지 못 찾음

Be/bugfix/#612 공유 라이브러리 내에서 사용하는 패키지 못 찾음 #38

Workflow file for this run

name: Close Issue When PR Closed
on:
pull_request:
types:
- closed
jobs:
close-issue:
name: Close Issue
if: github.event.pull_request.base.ref != 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
script: |
const branchName = context.payload.pull_request.head.ref;
const issueNumbers = branchName.match(/#(\d+)/g);
for(const num of issueNumbers) {
const issueNumber = num.replace('#', '');
const res = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
const subIssues = res?.data.body
?.match(/#(\d+)/g)
?.forEach((issue) => issueNumbers.push(issue.replace('#', '')));
}
issueNumbers?.forEach((num) => {
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: num.replace('#', ''),
state: 'closed',
});
});