File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Close Issues on Dev Merge
2+
3+ on :
4+ pull_request :
5+ types : [closed]
6+ branches :
7+ - dev
8+
9+ jobs :
10+ close-issues :
11+ if : github.event.pull_request.merged == true
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Extract issue numbers from PR body
16+ id : extract
17+ run : |
18+ echo "PR Body:"
19+ echo "${{ github.event.pull_request.body }}"
20+
21+ # extract "#숫자" 패턴만 추출
22+ ISSUES=$(echo "${{ github.event.pull_request.body }}" | grep -oE '#[0-9]+' | tr -d '#')
23+
24+ echo "ISSUES=$ISSUES" >> $GITHUB_ENV
25+
26+ - name : Close issues
27+ uses : peter-evans/close-issue@v4
28+ if : env.ISSUES != ''
29+ with :
30+ issue-number : ${{ env.ISSUES }}
31+ comment : " Automatically closed because the related PR was merged into dev."
32+ state : closed
33+ token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments