Closed guibranco closed 1 month ago
Hello @guibranco, you have reached your request limit of 5, your cycle will refresh on 2024-09-21 10:07:38+00:00. Consider subscribing if you want more requests. If you have any questions or concerns, please contact us at info@gitauto.ai.
@guibranco Pull request completed! Check it out here https://github.com/guibranco/dotnet-aicommitmessage/pull/64 π Should you have any questions or wish to change settings or limits, please feel free to contact info@gitauto.ai or invite us to Slack Connect.
Description:
We need to implement a method to extract JIRA ticket numbers from Git branch names. The JIRA ticket number follows the format
PROJECTKEY-1234
(case-insensitive) and may or may not contain a hyphen between the project key and the number. The implementation should handle various branch name formats and ensure consistency in the output.Acceptance Criteria:
XPTO1234
orXPTO-1234
).feature/
,bugfix/
, etc.), and should correctly handle branch names with double hyphens or special characters.Branch Name Examples:
The feature should correctly extract the JIRA ticket number from the following branch names:
feature/XPTO-1234-some-branch-name_with_description
βXPTO-1234
feature/XPTO-1234-some-branch-name_with_description
βXPTO-1234
feature/XPTO-1234-some-branch-name_with_description
βXPTO-1234
feature/XPTO1234-some-branch-name_with_description
βXPTO-1234
XPTO1234-some-branch-name_with_description
βXPTO-1234
XPTO-1234-some-branch-name_with_description
βXPTO-1234
bugfix/XPTO-1234--some-branch-name_with_description
βXPTO-1234
Proposed Solution:
(?i)([A-Z]+)-?(\d+)
Technical Details:
Regex.Match
).