From 6e78e069c274281d50dcb71b98b9f485afb012fc Mon Sep 17 00:00:00 2001 From: Kyle Holmberg Date: Wed, 25 Sep 2019 12:31:02 -0700 Subject: [PATCH 1/2] Update README for Hacktoberfest --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73511e2..511fe5c 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,19 @@ Operation Code Hacktoberfest Banner

+# 🎃 Hacktoberfest 🎃 + +[All the details you need](https://github.com/OperationCode/START_HERE/blob/master/README.md#-hacktoberfest-) before participating with us. + +
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Twitter Follow](https://img.shields.io/twitter/follow/operation_code.svg?style=social&label=Follow&style=social)](https://twitter.com/operation_code) [![Code-style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) From 1b923fa3cf6906ed976af1abb0765048302390c0 Mon Sep 17 00:00:00 2001 From: Aaron Suarez Date: Mon, 21 Oct 2019 09:31:33 -0500 Subject: [PATCH 2/2] Keep message in details form --- pybot/endpoints/slack/actions/mentor_request.py | 4 +++- pybot/endpoints/slack/utils/action_messages.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pybot/endpoints/slack/actions/mentor_request.py b/pybot/endpoints/slack/actions/mentor_request.py index 1e51c66..b44cd56 100644 --- a/pybot/endpoints/slack/actions/mentor_request.py +++ b/pybot/endpoints/slack/actions/mentor_request.py @@ -53,8 +53,10 @@ async def mentor_details_submit(action: Action, app: SirBot): async def open_details_dialog(action: Action, app: SirBot): + request = MentorRequest(action) + cur_details = request.details trigger_id = action["trigger_id"] - response = {"trigger_id": trigger_id, "dialog": mentor_details_dialog(action)} + response = {"trigger_id": trigger_id, "dialog": mentor_details_dialog(action, cur_details)} await app.plugins["slack"].api.query(methods.DIALOG_OPEN, response) diff --git a/pybot/endpoints/slack/utils/action_messages.py b/pybot/endpoints/slack/utils/action_messages.py index 3a1e4c5..f1c97a3 100644 --- a/pybot/endpoints/slack/utils/action_messages.py +++ b/pybot/endpoints/slack/utils/action_messages.py @@ -252,7 +252,7 @@ def build_report_message(slack_id, details, message_details): return {"text": message, "channel": MODERATOR_CHANNEL, "attachments": attachment} -def mentor_details_dialog(action): +def mentor_details_dialog(action, cur_details): trigger_id = action["trigger_id"] ts = action["message"]["ts"] @@ -269,6 +269,7 @@ def mentor_details_dialog(action): "name": "details", "placeholder": "", "required": False, + "value": cur_details } ], }