Skip to content

Commit

Permalink
chore: 브랜치 이름을 context에서 바로 받아옴
Browse files Browse the repository at this point in the history
  • Loading branch information
Doosies committed Nov 14, 2023
1 parent 0593900 commit b4dd9d1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/close-issue-automatically.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,8 @@ jobs:
with:
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
script: |
// pr_num 으로 해당 pr 받아오기
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
const pr_data = pr.data;
const title = pr_data.title;
// 현재 pr 날린 브랜치 이름
const branch_name = pr_data.head.ref;
const branch_name = context.payload.pull_request.head;
// 브랜치 이름에 포함된 이슈 번호
const issue_num = branch_name.match(/#(\d+)/)[1];
Expand Down

0 comments on commit b4dd9d1

Please sign in to comment.