Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrszacilowski authored Jul 27, 2024
2 parents a79751e + 0e6bd0c commit 8eb745b
Show file tree
Hide file tree
Showing 16 changed files with 11,437 additions and 37 deletions.
47 changes: 10 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@ jobs:
steps:
- name: Log PR Info
run: |
echo "PR Number: ${{ github.event.number }}"
echo "Action: ${{ github.event.action }}"
if [ "${{ github.event_name }}" == "pull_request_review" ]; then
echo "PR Number: ${{ github.event.pull_request.number }}"
echo "Action: ${{ github.event.review.state }}"
elif [ "${{ github.event_name }}" == "pull_request" ]; then
echo "PR Number: ${{ github.event.number }}"
echo "Action: ${{ github.event.action }}"
else
echo "Unhandled event type: ${{ github.event_name }}"
fi
validate_and_notify:
runs-on: ubuntu-latest
name: Validate JSON and Notify on Telegram
name: Validate JSON

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -55,37 +62,3 @@ jobs:
uses: GrantBirki/json-yaml-validate@v2.7.1
with:
comment: "true" # This will post a comment if the validation fails

- name: Prepare Notification Message
if: success() # This will proceed only if the previous validation step was successful
run: |
message=""
pr_link="${{ github.event.pull_request.html_url }}"
if [ "${{ github.event_name }}" == "pull_request" ]; then
if [ "${{ github.event.action }}" == "opened" ]; then
message="🚀 New PR created: #${{ github.event.pull_request.number }} by ${{ github.event.pull_request.user.login }} - $pr_link"
elif [ "${{ github.event.action }}" == "ready_for_review" ]; then
message="📝 PR is ready for review: #${{ github.event.pull_request.number }} - $pr_link"
elif [ "${{ github.event.action }}" == "reopened" ]; then
message="🔄 PR reopened: #${{ github.event.pull_request.number }} - $pr_link"
elif [ "${{ github.event.action }}" == "closed" ] && [ "${{ github.event.pull_request.merged }}" == "true" ]; then
message="✅ PR merged: #${{ github.event.pull_request.number }} - $pr_link"
elif [ "${{ github.event.action }}" == "closed" ] && [ "${{ github.event.pull_request.merged }}" == "false" ]; then
message="❌ PR closed without merging: #${{ github.event.pull_request.number }} - $pr_link"
fi
elif [ "${{ github.event_name }}" == "pull_request_review" ] && [ "${{ github.event.review.state }}" == "approved" ]; then
message="👍 PR approved by ${{ github.event.review.user.login }}: #${{ github.event.pull_request.number }} - $pr_link"
fi
if [ -z "$message" ]; then
echo "No relevant action taken, skipping notification."
exit 0
fi
echo "TG_SENDER_PAYLOAD_MESSAGE=$message" >> $GITHUB_ENV
- name: Send Notification to Telegram
if: env.TG_SENDER_PAYLOAD_MESSAGE != '' && success()
uses: BorisTestov/tg_sender_action@latest
env:
TG_SENDER_TG_CHAT_ID: ${{ secrets.CHATID }}
TG_SENDER_TG_BOT_TOKEN: ${{ secrets.BotToken }}
TG_SENDER_PAYLOAD_MESSAGE: ${{ env.TG_SENDER_PAYLOAD_MESSAGE }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "ZPF Token",
"symbol": "ZPF",
"type": "PSP22",
"contractAddress": "5ESKJbkpVa1ppUCmrkCmaZDHqm9SHihws9Uqqsoi4VrDCDLE",
"decimals": 12,
"description": "Utility Token for ZPF Ecosystem",
"website": "https://zapfi.org",
"sourceCode": "https://github.com/ZapFi/token/tree/966f67adb0dd2e3a55acf88af17d50340871bf91/sourcecode",
"links": [
{
"name": "X/Twitter",
"url": "https://x.com/zap_finance"
},
{
"name": "Telegram",
"url": "https://t.me/ZapFiOfficial"
},
{
"name": "Discord",
"url": ""
}
],
"customTags": [
"ZPF Contract Address"
],
"warnings": [],
"owner": "5G1cYC4E5MDs4F32RdaMynyr9Pk9DrsjbquA931UskvojVAg",
"minter": "5G1cYC4E5MDs4F32RdaMynyr9Pk9DrsjbquA931UskvojVAg"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8eb745b

Please sign in to comment.