MCPcopy
hub / github.com/certbot/certbot / get_content

Function get_content

tools/notify_mattermost.py:66–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 return headers
65
66def get_content():
67 build_url = f'https://dev.azure.com/{repo_name}/_build/results?buildId={build_id}&view=results'
68
69 # We use github author here because it's what we have access to. If the name sometimes
70 # changes, add any name it might be. Check the git log.
71 requested_for = sys.argv[1].rstrip()
72 # This is a map of team member github author names to opensource mattermost username
73 usernames_map = {
74 'Will Greenberg': 'willg',
75 'Erica Portnoy': 'erica',
76 'Brad Warren': 'brad',
77 'ohemorange': 'erica',
78 }
79
80 if requested_for in usernames_map:
81 text_body = f'{get_greeting()} @{usernames_map[requested_for]}, {get_message()}\n{build_url}'
82 else:
83 text_body = (f"{get_greeting()} {requested_for}, {get_message()}\nIf you'd like to get @ mentioned for "
84 "releases you do in the future, please modify tools/notify_mattermost.py with your "
85 f"git author name.\n{build_url}")
86
87 content = {
88 'text': text_body,
89 }
90 return content
91
92response = requests.request(
93 method='POST',

Callers 1

Calls 2

get_greetingFunction · 0.85
get_messageFunction · 0.85

Tested by

no test coverage detected