CircleCI-Public / jira-connect-orb

Display the status of CircleCI workflows and deployments in Jira!
https://circleci.com/orbs/registry/orb/circleci/jira
MIT License
25 stars 27 forks source link

Expanded regex for issue scanning [semver:minor] #21

Closed KyleTryon closed 4 years ago

KyleTryon commented 4 years ago

User expressed failure matching jira issues that begin with letters+numbers like so: MG01-115 The user also provided this suggested regex: [A-Z0-9]{2,30}-[0-9]

eddiewebb commented 4 years ago

@KyleTryon / @nullcode - the original regex was based on Jira's default project key rules.

By default, the JIRA project key configuration requires two or more uppercase alphabetical characters — based on the regular expression ([A-Z][A-Z]+).

It seems admins can customize to allow #s or other changes. - https://confluence.atlassian.com/adminjiraserver073/changing-the-project-key-format-861253229.html

Rather than hardcoding it here, we should move the regexp to a parameter and set a reasonable default.

nullcode commented 4 years ago

@eddiewebb right, we are actually using Jira Cloud and the regex is not even given there, they just describe it like this in the docs: Your project's key must be at least 2 characters long and contain only uppercase letters. Despite the description, we can enter numbers in the key too and it allows it. The parameter option would be a nice solution.

KyleTryon commented 4 years ago

Will submit an update to include parameter with the original default value.

cpe-bot commented 4 years ago

Dev version of orb available for testing - circleci/jira@dev:KyleTryon-Expanded-regex-for-issue-scanning-dd69c2a1af0807b8fcb06655a925318a0a07df1d

cpe-bot commented 4 years ago

Dev version of orb available for testing - circleci/jira@dev:KyleTryon-Expanded-regex-for-issue-scanning-1d879f27f1eddb15baedd25b2c4ccd0bbd3e9ea0

cpe-bot commented 4 years ago

Dev version of orb available for testing - circleci/jira@dev:KyleTryon-Expanded-regex-for-issue-scanning-6b451994e00a9eb9c24300468aebc487c84ae462

eddiewebb commented 4 years ago

Testing against dev version looks good, merging this.

eddiewebb commented 4 years ago

This is available as circleci/jira@1.1.0