qa-guru / allure-notifications

jar, that draws piechart from results and sends it with link to build to messenger
Apache License 2.0
486 stars 79 forks source link

telegram notification can be sent to topic inside chat and can be configured from command line #308

Open Ostryak opened 2 months ago

Ostryak commented 2 months ago

New optional parameter topic has been added to telegram configuration in order to send telegram notification to topic inside chat. How to get topic id ? The answer is: stackoverflow

Some telegram and base configuration can be modified by system properties: It is useful in parameterized pipelines:

    - java "-DconfigFile=notifications/config.json" "-Dbase.environment=${STAND}" "-Dbase.reportLink=${ALLURE_SERVICE_URL}" -Dbase.project=${PROJECT_ID} "-Dtelegram.token=${TG_BOT_TOKEN}" "-Dtelegram.chat=${TG_CHAT_ID}" "-Dtelegram.topic=${TG_CHAT_TOPIC_ID}" -jar allure-notifications.jar
base.environment
base.comment
base.allureFolder
base.project
base.reportLink
base.logo
telegram.token
telegram.chat
telegram.topic
telegram.replyTo
valfirst commented 2 months ago

@Ostryak thank you for your contribution! 1) please add unit tests for added/changed code 2) split the commit into 2 ones (preferably even 2 PRs):