Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR adds Jira as an option #61

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
updated actions, jira. Working with bot
  • Loading branch information
mattdough committed Nov 28, 2021
commit 1920af2f621f058d75382ab48c6bfc6f42acd4d9
5 changes: 3 additions & 2 deletions actions/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from rasa_sdk.executor import CollectingDispatcher, Action
from rasa_sdk.forms import FormValidationAction
from rasa_sdk.events import AllSlotsReset, SlotSet
from snow import SnowAPI
from jira_actions import JiraPy
from actions.snow import SnowAPI
from actions.jira_actions import JiraPy
import random
import ruamel.yaml
import pathlib
Expand Down Expand Up @@ -185,6 +185,7 @@ def run(
)
# TODO Need to test. Might need a try catch around this. If the email returns an error, the response won't be an object with id function.
incident_number = response.id
print(incident_number)
if incident_number:
message = (
f"Successfully opened up incident {incident_number} "
Expand Down
2 changes: 1 addition & 1 deletion actions/jira_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ def create_incident(
@staticmethod
def priority_db() -> Dict[str, int]:
"""Database of supported priorities"""
priorities = {"low": 4, "medium": 3, "high": 2}
priorities = {"low": "4", "medium": "3", "high": "2"}
return priorities