Skip to content

Commit

Permalink
Update check-pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kdivya153 authored Oct 21, 2024
1 parent 05f16b2 commit f53a930
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ jobs:
fi
done
notify-slack-on-failure:
needs: wait-for-repo2
if: failure()
runs-on: ubuntu-latest
steps:
- name: Send Slack notification
env:
EVENT_NAME: ${{ github.event_name }}
run: |
# Determine the branch name based on the event type
if [ "$EVENT_NAME" == "repository_dispatch" ]; then
BRANCH_NAME=$OPENRPC_PR_BRANCH
elif [ "$EVENT_NAME" == "pull_request" ]; then
BRANCH_NAME=${{ github.event.pull_request.head.ref }}
elif [ "$EVENT_NAME" == "push" ]; then
BRANCH_NAME=${GITHUB_REF#refs/heads/} # Extract branch name from GITHUB_REF for push events
else
BRANCH_NAME="unknown"
fi
# notify-slack-on-failure:
# needs: wait-for-repo2
# if: failure()
# runs-on: ubuntu-latest
# steps:
# - name: Send Slack notification
# env:
# EVENT_NAME: ${{ github.event_name }}
# run: |
# # Determine the branch name based on the event type
# if [ "$EVENT_NAME" == "repository_dispatch" ]; then
# BRANCH_NAME=$OPENRPC_PR_BRANCH
# elif [ "$EVENT_NAME" == "pull_request" ]; then
# BRANCH_NAME=${{ github.event.pull_request.head.ref }}
# elif [ "$EVENT_NAME" == "push" ]; then
# BRANCH_NAME=${GITHUB_REF#refs/heads/} # Extract branch name from GITHUB_REF for push events
# else
# BRANCH_NAME="unknown"
# fi

# Send the Slack notification with the branch name
curl -X POST -H 'Content-type: application/json' \
--data '{"text": "Failed to generate SDK artifact with the latest changes in the Branch: '$BRANCH_NAME'."}' \
${{ secrets.SLACK_WEBHOOK_URL }}
# # Send the Slack notification with the branch name
# curl -X POST -H 'Content-type: application/json' \
# --data '{"text": "Failed to generate SDK artifact with the latest changes in the Branch: '$BRANCH_NAME'."}' \
# ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit f53a930

Please sign in to comment.