Skip to content

Commit

Permalink
rename maybe_delink to maybe_remove_mention
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Apr 11, 2023
1 parent f470c29 commit c37e728
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/publish_toolstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def gh_url():
return os.environ['TOOLSTATE_ISSUES_API_URL']


def maybe_unlink(message):
def maybe_remove_mention(message):
# type: (str) -> str
if os.environ.get('TOOLSTATE_SKIP_MENTIONS') is not None:
return message.replace("@", "")
Expand All @@ -109,7 +109,7 @@ def issue(
else:
status_description = 'no longer builds'
request = json.dumps({
'body': maybe_unlink(textwrap.dedent('''\
'body': maybe_remove_mention(textwrap.dedent('''\
Hello, this is your friendly neighborhood mergebot.
After merging PR {}, I observed that the tool {} {}.
A follow-up PR to the repository {} is needed to fix the fallout.
Expand Down Expand Up @@ -285,7 +285,7 @@ def update_latest(
issue_url = gh_url() + '/{}/comments'.format(number)
response = urllib2.urlopen(urllib2.Request(
issue_url,
json.dumps({'body': maybe_unlink(message)}).encode(),
json.dumps({'body': maybe_remove_mention(message)}).encode(),
{
'Authorization': 'token ' + github_token,
'Content-Type': 'application/json',
Expand Down

0 comments on commit c37e728

Please sign in to comment.