Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 612d2b2

Browse files
committed
the easter egg is a lie
1 parent dd3593d commit 612d2b2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

homu/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import subprocess
1919
from .git_helper import SSH_KEY_FILE
2020
import shlex
21+
import random
2122

2223
STATUS_TO_PRIORITY = {
2324
'success': 0,
@@ -278,6 +279,10 @@ def verify_auth(username, repo_cfg, state, auth, realtime):
278279
return False
279280

280281

282+
PORTAL_TURRET_DIALOG = ["Target acquired", "Activated", "Who's there?", "There you are"]
283+
PORTAL_TURRET_IMAGE = "https://cloud.githubusercontent.com/assets/1617736/22222924/c07b2a1c-e16d-11e6-91b3-ac659550585c.png"
284+
285+
281286
def parse_commands(body, username, repo_cfg, state, my_username, db, states, *, realtime=False, sha=''):
282287
# Skip parsing notifications that we created
283288
if username == my_username:
@@ -286,6 +291,8 @@ def parse_commands(body, username, repo_cfg, state, my_username, db, states, *,
286291
state_changed = False
287292

288293
words = list(chain.from_iterable(re.findall(r'\S+', x) for x in body.splitlines() if '@' + my_username in x))
294+
if words[1:] == ["are", "you", "still", "there?"]:
295+
state.add_comment(":cake: {}\n\n![]({})".format(random.choice(PORTAL_TURRET_DIALOG), PORTAL_TURRET_IMAGE))
289296
for i, word in reversed(list(enumerate(words))):
290297
found = True
291298

0 commit comments

Comments
 (0)