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

Merge branch 'fix_api_msg_len_limit_issue' into 'main'

break down messages due to slack msg limit

See merge request !12
parents 4e44887d f82d177b
No related branches found
No related tags found
1 merge request!12break down messages due to slack msg limit
Pipeline #610494 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