diff --git a/incubating/jira-issue-manager/script/jira_issue_manager.py b/incubating/jira-issue-manager/script/jira_issue_manager.py index f5ad163df..0bd8a9f3f 100644 --- a/incubating/jira-issue-manager/script/jira_issue_manager.py +++ b/incubating/jira-issue-manager/script/jira_issue_manager.py @@ -66,8 +66,11 @@ def environment_setup(): # Logic here to use the regex to grab the jira issue key and assign it to issue jira_issue_source_field = StepUtility.getEnvironmentVariable('JIRA_ISSUE_SOURCE_FIELD', env) jira_issue_source_field_regex = StepUtility.getEnvironmentVariable('JIRA_ISSUE_SOURCE_FIELD_REGEX', env) - ## TODO - Brandon - need to do regex work here - issue = jira_issue_source_field + + if jira_issue_source_field_regex: + issue = re.match(jira_issue_source_field_regex, jira_issue_source_field).group(0) + else: + issue = jira_issue_source_field # Issue fields below # Retrieve the project environment variable and add the project to a dict representation diff --git a/incubating/jira-issue-manager/step.yaml b/incubating/jira-issue-manager/step.yaml index 2c5249404..7ffc71a0b 100644 --- a/incubating/jira-issue-manager/step.yaml +++ b/incubating/jira-issue-manager/step.yaml @@ -2,7 +2,7 @@ kind: step-type version: '1.0' metadata: name: jira-issue-manager - version: 1.0.11 + version: 1.0.12 title: Jira Issue Manager isPublic: true description: Create, Update, & Validate Jira Issues @@ -12,6 +12,7 @@ metadata: stage: incubating maintainers: - name: Brandon Phillips + - name: Dustin Van Buskirk categories: - build official: true @@ -245,7 +246,7 @@ spec: stepsTemplate: |- main: name: jira-issue-manager - image: quay.io/codefreshplugins/jira-issue-manager:1.0.11 + image: quay.io/codefreshplugins/jira-issue-manager:1.0.12 environment: [[ range $key, $val := .Arguments ]] - '[[ $key ]]=[[ $val ]]'