Skip to content

Commit

Permalink
fix: delete branch 활성화
Browse files Browse the repository at this point in the history
  • Loading branch information
hanagertrudeKim committed May 12, 2024
1 parent 7b1f452 commit 711ae05
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/CHECK_PR_MERGED.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,25 @@ jobs:
script: |
const prUrl = context.payload.pull_request.html_url ?? context.payload.pull_request._links.html.href;
core.setOutput('pullRequestLink', JSON.stringify(prUrl));
- name: Send Slack Trigger
run: |
curl -X POST https://api-slack.internal.bcsdlab.com/api/pr-merged/frontend \
-H 'Content-Type: application/json' \
-d '{
"pullRequestLink": ${{ steps.check_pr_merged.outputs.pullRequestLink }}
}'
}'
- name: Get branch names
id: get_branch_name
run: |
baseBranch=${{ github.event.pull_request.base.ref }}
headBranch=${{ github.event.pull_request.head.ref }}
echo "::set-output name=baseBranch::${baseBranch}"
echo "::set-output name=headBranch::${headBranch}"
- name: Delete Branch
if: ${{ steps.get_branch_name.outputs.headBranch != 'main' && steps.get_branch_name.outputs.headBranch != 'develop' }}
run: |
git checkout ${{ steps.get_branch_name.outputs.baseBranch }}
git push origin --delete ${{ steps.get_branch_name.outputs.headBranch }}

0 comments on commit 711ae05

Please sign in to comment.