Generic Ticketing
Generic ticketing integration
If you use a ticketing system on your project, sfdx-hardis can use it to enrich its integrations
Sfdx-hardis will automatically analyze commits and PR/MR descriptions to collect tickets and build their urls !
Configuration
You need to define 2 properties in .sfdx-hardis.yml, or 2 environment variables in your CI/CD configuration.
It is recommended to use .sfdx-hardis.yml to store these properties, so the VsCode extension will be able to use them for UI features.
Regular Expression to identify a Ticket
- .sfdx-hardis.yml property: genericTicketingProviderRegex
- ENV variable: GENERIC_TICKETING_PROVIDER_REGEX
Regular expression allowing to detect your ticketing system identifiers in the commits / PR texts.
You can use https://regex101.com/ to check your Regular Expression.
Example: ([R|I][0-9]+-[0-9]+) to detect EasyVista references, that can look like I240103-0133 or
R230904-0026
URL Builder for Ticket Hyperlinks
- .sfdx-hardis.yml property: genericTicketingProviderUrlBuilder
- ENV variable: GENERIC_TICKETING_PROVIDER_URL_BUILDER
Template string allowing to build a hyperlink from a ticket identifier.
Must contain a {REF} segment that will be replaced by the ticket identifier.
Example: https://instance.easyvista.com/index.php?ticket={REF}
Gitlab configuration
If you are using Gitlab, you need to update the Merge Request Settings
Go to Project -> Settings -> Merge Requests
Update Merge Commit Message Template with the following value
%{title} Merge branch '%{source_branch}' into '%{target_branch}'
%{issues}
See merge request %{reference}
%{description}
%{all_commits}
Update Squash Commit Message Template with the following value
%{title} Merge branch '%{source_branch}' into '%{target_branch}'
%{issues}
See merge request %{reference}
%{description}
%{all_commits}
Technical notes
This integration use the following variables, that must be available from the pipelines or in .sfdx-hardis.yml:
- genericTicketingProviderRegex or GENERIC_TICKETING_PROVIDER_REGEX
- genericTicketingProviderUrlBuilder or GENERIC_TICKETING_PROVIDER_URL_BUILDER
