Skip to content

Commit

Permalink
fix: issue comment를 위한 default branch 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJeongHooo committed Jun 24, 2024
1 parent 7d06ea8 commit e0cadea
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/slack-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ jobs:
name: Send Slack Notification
runs-on: ubuntu-latest
steps:
- name: fetch branch
id: fetch-branch
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
try {
const pr = await github.rest.pulls.get({
owner : context.repo.owner,
repo : context.repo.repo,
pull_number : context.issue.pull_number
})
return pr.data
}
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ fromJson(steps.fetch-branch.outputs.result).head.sha }}
fetch-depth: 0
- name: Send Slack Notification for PR creation
if: github.event_name == 'pull_request'
uses: 8398a7/action-slack@v3
Expand Down

0 comments on commit e0cadea

Please sign in to comment.