diff --git a/.github/workflows/JirabotMerge.yml b/.github/workflows/JirabotMerge.yml index 1aab53288..2776e442a 100644 --- a/.github/workflows/JirabotMerge.yml +++ b/.github/workflows/JirabotMerge.yml @@ -106,14 +106,14 @@ jobs: releaseTagPattern = releaseTagPrefix if major is not None: - releaseTagPattern += str(major) + '\.' + releaseTagPattern += str(major) + '\\.' else: - releaseTagPattern += '[0-9]+\.' + releaseTagPattern += '[0-9]+\\.' if minor is not None: - releaseTagPattern += str(minor) + '\.' + releaseTagPattern += str(minor) + '\\.' else: - releaseTagPattern += '[0-9]+\.' + releaseTagPattern += '[0-9]+\\.' if point is not None: releaseTagPattern += str(point) + '(-[0-9]+)?' @@ -254,14 +254,17 @@ jobs: print('Error: PROJECT_CONFIG is missing required fields: tagPrefix and/or tagPostfix') sys.exit(1) - project_name = projectConfig.get('projectName') - if project_name is None: - print('Error: PROJECT_CONFIG is missing required field: projectName') + project_prefixes = projectConfig.get('projectPrefixes') + if project_prefixes is None: + print('Error: PROJECT_CONFIG is missing required field: projectPrefixes') sys.exit(1) + project_list_regex = '|'.join(project_prefixes) + result = '' - issuem = re.search("(" + project_name + ")-[0-9]+", title, re.IGNORECASE) + issuem = re.search("(" + project_list_regex + ")-[0-9]+", title, re.IGNORECASE) if issuem: + project_name = isuem.group(1) issue_name = issuem.group() jira = Jira(url=jira_url, username=jirabot_user, password=jirabot_pass, cloud=True)