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

added a simple regex to find jira issue in field by a given regex #714

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading