Skip to content

Commit

Permalink
rollback: 9b8d592
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Jun 25, 2024
1 parent 9b8d592 commit ca85598
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: echo "event_type=${{ github.event_name }}" >> $GITHUB_ENV

- name: Cache Slack message timestamp
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')}}
if: ${{ env.event_type == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize') }}
id: cache_slack_ts
run: |
if [ -f slack_ts_${{ github.event.pull_request.number }}.txt ]; then
Expand All @@ -31,7 +31,7 @@ jobs:
fi
- name: Send notification for PR
if: ${{ github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize') }}
if: ${{ env.event_type == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize') }}
id: slack_pr
run: |
response=$(curl -X POST -H 'Content-type: application/json' --data '{
Expand All @@ -44,7 +44,7 @@ jobs:
SLACK_BOT_ACCESS_TOKEN: ${{ secrets.SLACK_BOT_ACCESS_TOKEN }}

- name: Send notification for review request
if: ${{ github.event_name == 'pull_request' && github.event.action == 'review_requested' }}
if: ${{ env.event_type == 'pull_request' && github.event.action == 'review_requested' }}
run: |
reviewer=${{ github.event.requested_reviewer.login }}
slack_username=$(cat .github/user-mapping.json | jq -r --arg reviewer "$reviewer" '.[$reviewer]')
Expand All @@ -69,7 +69,7 @@ jobs:
fi
- name: Send notification for comment
if: ${{ github.event_name == 'issue_comment' && env.SLACK_MESSAGE_TS == '' }}
if: ${{ env.event_type == 'issue_comment' && env.SLACK_MESSAGE_TS == '' }}
run: |
commenter=${{ github.event.comment.user.login }}
slack_username=$(cat .github/user-mapping.json | jq -r --arg commenter "$commenter" '.[$commenter]')
Expand All @@ -87,7 +87,7 @@ jobs:
SLACK_BOT_ACCESS_TOKEN: ${{ secrets.SLACK_BOT_ACCESS_TOKEN }}

- name: Send notification for comment in thread
if: ${{ github.event_name == 'issue_comment' && env.SLACK_MESSAGE_TS != '' }}
if: ${{ env.event_type == 'issue_comment' && env.SLACK_MESSAGE_TS != '' }}
run: |
commenter=${{ github.event.comment.user.login }}
slack_username=$(cat .github/user-mapping.json | jq -r --arg commenter "$commenter" '.[$commenter]')
Expand All @@ -103,7 +103,7 @@ jobs:
SLACK_BOT_ACCESS_TOKEN: ${{ secrets.SLACK_BOT_ACCESS_TOKEN }}

- name: Send notification for approval
if: ${{ github.event_name == 'pull_request_review' && github.event.review.state == 'approved' && env.SLACK_MESSAGE_TS != '' }}
if: ${{ env.event_type == 'pull_request_review' && github.event.review.state == 'approved' && env.SLACK_MESSAGE_TS != '' }}
run: |
reviewer=${{ github.event.review.user.login }}
slack_username=$(cat .github/user-mapping.json | jq -r --arg reviewer "$reviewer" '.[$reviewer]')
Expand Down

0 comments on commit ca85598

Please sign in to comment.