anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: vmware-tanzu/graph-framework-for-microservices
Issue: [Bug]:  Create JIRA issue from Github and add priority to the JIRA created

### Contact Details

rjanakiraman@vmware.com

### Tell us the project / group you are associated with

Project ServiceMesh

### What happened?

Currently when we create JIRA from GitHub CI if a new issue is created we are not populating the issue with priority in JIRA created


### Describe the expected behavior

When i select priority as blocker in the bug/feature request it should be reflected in JIRA Created from Github Automation

### What version are you running?

NexusCli: v0.0.146
NexusCompiler: v0.0.59
NexusAppTemplates: v0.0.10
NexusDatamodelTemplates: v0.0.22
NexusRuntimeManifets: v0.2.56

### How critical is this bug to you?

Critical - solution is severely limited in value

### How can we recreate the bug?

Create a new Github Issue with type bug / feature and add any bug type

### Any debug data that you are able to share?

_No response_

### What is your operating system?

MacOS

### Any additional / relevant info

_No response_

Changed files:
create_jira.py

diff --git a/create_jira.py b/create_jira.py
index 3c7c35f3c..5473a19e8 100755
--- a/create_jira.py
+++ b/create_jira.py
@@ -2,6 +2,29 @@ from jira import ( JIRA,JIRAError )
 import json
 import requests
 import os, sys
+import re
+
+patterns = {
+    "Bug":"How critical is this bug to you([\\n\\s\\d\\w\\-?]*)-",
+    "Task": "How critical is this feature to you([\\n\\s\\d\\w\\-?]*)-",
+}
+
+IssuePriorityMap = {
+    "Blocker": "Blocker - P0",
+    "Critical": "Critical - P1",
+    "Major": "Major - P2",
+    "Minor": "Minor - P3"
+}
+
+def get_issue_priority(issue_body, issue_type):
+    '''
+    currently issue body has a segment which user can provide the bug/task priority'''
+    priorityKey = re.findall(patterns[issue_type], issue_body)[0].replace('?','').replace('\\n','').strip()
+    for k, v in IssuePriorityMap.items():
+        if k == priorityKey:
+           return v
+    return "None"
+
 
 issue_types = [{"Bug":"bug"},{"Task":"feature request"}]
 def parse_event_context():
@@ -46,12 +69,15 @@ def run_create_issue(issue_body, issue_type, issue_title, issue_url):
     except Exception as e:
         print("Could not connect to JIRA due to : {}".format(e))
         sys.exit(1)
+    issue_priority = get_issue_priority(issue_body, issue_type)
+
     Body = "Github Issue: "+issue_url + "\\n" + issue_body
     Issue = {
         'project': {'key': 'NPT'},
         'summary': issue_title ,
         'description': Body,
         'issuetype': {'name': issue_type },
+        'priority': {'name': issue_priority},
     }
     try:
         new_issue = jira.create_issue(fields=Issue)