Skip to content

Commit

Permalink
Merge pull request #502 from anstadnik/dev
Browse files Browse the repository at this point in the history
Remove notify
  • Loading branch information
anstadnik authored May 4, 2024
2 parents e04378f + 9376f75 commit 9551f66
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 49 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,44 +71,44 @@ jobs:
table.csv
first_aid_bot
notify:
runs-on: ubuntu-latest
needs: deploy
if: github.base_ref == 'main'

steps:
- uses: dawidd6/action-download-artifact@v2
with:
pr: ${{github.event.pull_request.number}}
workflow: CI.yml
name: apk

- name: send telegram message on push
uses: appleboy/telegram-action@master
if: always() && github.base_ref == 'main' && !contains(needs.*.result, 'failure')
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
document: app-release.apk
message: |
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}
See changes: https://github.com/${{ github.repository }}/actions/runs/${{github.sha}}
See error: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
Successfully deployed! 🙆
- name: send telegram message on push
uses: appleboy/telegram-action@master
if: always() && github.base_ref == 'main' && contains(needs.*.result, 'failure')
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
document: table.csv
message: |
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}
See changes: https://github.com/${{ github.repository }}/actions/runs/${{github.sha}}
See error: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
The commit fails to build or tests have failed! 💣
# notify:
# runs-on: ubuntu-latest
# needs: deploy
# if: github.base_ref == 'main'
#
# steps:
# - uses: dawidd6/action-download-artifact@v2
# with:
# pr: ${{github.event.pull_request.number}}
# workflow: CI.yml
# name: apk
#
# - name: send telegram message on push
# uses: appleboy/telegram-action@master
# if: always() && github.base_ref == 'main' && !contains(needs.*.result, 'failure')
# with:
# to: ${{ secrets.TELEGRAM_TO }}
# token: ${{ secrets.TELEGRAM_TOKEN }}
# document: app-release.apk
# message: |
# ${{ github.actor }} created commit:
# Commit message: ${{ github.event.commits[0].message }}
#
# See changes: https://github.com/${{ github.repository }}/actions/runs/${{github.sha}}
# See error: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
# Successfully deployed! 🙆
#
# - name: send telegram message on push
# uses: appleboy/telegram-action@master
# if: always() && github.base_ref == 'main' && contains(needs.*.result, 'failure')
# with:
# to: ${{ secrets.TELEGRAM_TO }}
# token: ${{ secrets.TELEGRAM_TOKEN }}
# document: table.csv
# message: |
# ${{ github.actor }} created commit:
# Commit message: ${{ github.event.commits[0].message }}
#
# See changes: https://github.com/${{ github.repository }}/actions/runs/${{github.sha}}
# See error: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
# The commit fails to build or tests have failed! 💣
12 changes: 4 additions & 8 deletions bot/src/bot/dialogue/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::bot::{FABot, FADialogue};
use crate::{DataGetState, DATA, REDIS_CONN, REDIS_USERS_SET_KEY};
use anyhow::{anyhow, Context, Error};
use first_aid_bot_core::prelude::*;
use redis::{aio::MultiplexedConnection, AsyncCommands};
use redis::AsyncCommands;
use teloxide::dispatching::DpHandlerDescription;
use teloxide::prelude::*;
use teloxide::types::ParseMode::Html;
Expand Down Expand Up @@ -109,11 +109,7 @@ pub fn get_commands_branch() -> FAHandler {
}

pub fn get_maintainer_commands_branch() -> FAHandler {
dptree::filter(
|msg: Message, _bot: FABot, _data: &'static Data, _conn: MultiplexedConnection| {
cfg!(debug_assertions) || is_admin(&msg)
},
)
.filter_command::<MaintainerCommands>()
.endpoint(maintainer_commands_handler)
dptree::filter(|msg: Message, _bot: FABot| cfg!(debug_assertions) || is_admin(&msg))
.filter_command::<MaintainerCommands>()
.endpoint(maintainer_commands_handler)
}

0 comments on commit 9551f66

Please sign in to comment.