Skip to content

Commit

Permalink
added a simple regex to find jira issue in field by a given regex
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinvanbuskirk committed Jan 9, 2025
1 parent 1e9e7f3 commit 4f38fb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions incubating/jira-issue-manager/script/jira_issue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions incubating/jira-issue-manager/step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,6 +12,7 @@ metadata:
stage: incubating
maintainers:
- name: Brandon Phillips
- name: Dustin Van Buskirk
categories:
- build
official: true
Expand Down Expand Up @@ -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 ]]'
Expand Down

0 comments on commit 4f38fb7

Please sign in to comment.