Skip to content
Snippets Groups Projects
Commit f82d177b authored by Zhang, Chen's avatar Zhang, Chen
Browse files

break down messages due to slack msg limit

parent 4e44887d
No related branches found
No related tags found
1 merge request!12break down messages due to slack msg limit
Pipeline #586917 passed
......@@ -251,9 +251,15 @@ app = App(token=os.environ["SLACK_BOT_TOKEN"], name="Amaterasu")
def greetings(ack, say):
ack()
say("Build status summary for Neutron projects:")
status_blocks = {"blocks": get_status_blocks()}
say(status_blocks)
# NOTE: Slack API has a limit of 50 blocks per message, so we need to break it down
# into smaller messages
# 0. Legend
say({"blocks": legend()})
# 1. Gitlab projects
say({"blocks": gitlab_status_blocks()})
# 2. Github projects
say({"blocks": github_status_blocks() + mantid_block()})
# Start your app
if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment