Skip to content

Commit

Permalink
[IDP-1624] Support numbers in jira project id (#19)
Browse files Browse the repository at this point in the history
* Support numbers in jira project id

* Apply suggestions from code review

---------

Co-authored-by: Gérald Barré <[email protected]>
  • Loading branch information
alexandre-caron-gsoft and meziantou authored Jun 5, 2024
1 parent 67d340c commit 8e47f05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reusable-jira-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
}
Set-JiraConfigServer -Server "${{ secrets.JIRA_URL }}"
if("${{ inputs.branch_name }}" -match "(?<=\/)[a-zA-Z]+[_-][0-9]+" -eq $False)
if("${{ inputs.branch_name }}" -match "(?<=\/)[a-zA-Z][a-zA-Z0-9]*[_-][0-9]+" -eq $False)
{
throw "Branch name ${{ inputs.branch_name }} doesn't respect the required pattern ([a-zA-Z]+[_-][0-9]+). A valid branch name example would be: feature/IDP-123"
throw "Branch name ${{ inputs.branch_name }} doesn't respect the required pattern ((?<=\/)[a-zA-Z][a-zA-Z0-9]*[_-][0-9]+). A valid branch name example would be: feature/IDP-123"
}
$JiraIssueKey = $Matches[0]
Expand Down

0 comments on commit 8e47f05

Please sign in to comment.