MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / post_message

Function post_message

scripts/gh_scripts/issue_comment_bot.py:223–231  ·  view source on GitHub ↗
(payload: dict[str, str])

Source from the content-addressed store, hash-verified

221 """
222
223 def post_message(payload: dict[str, str]):
224 return requests.post(
225 "https://slack.com/api/chat.postMessage",
226 headers={
227 "Authorization": f"Bearer {os.environ.get('SLACK_TOKEN', '')}",
228 "Content-Type": "application/json; charset=utf-8",
229 },
230 json=payload,
231 )
232
233 # Create the parent message
234 parent_thread_msg = f"{len(issues)} new GitHub comment(s) since {hours_passed} hour(s) ago"

Callers 1

publish_digestFunction · 0.85

Calls 2

postMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected