|
1 | 1 | # Purpose |
2 | 2 | This is an implementation of Atlassian's Smart Commits concept for Perforce Swarm. Atlassian's documentation is [here](https://confluence.atlassian.com/bitbucket/processing-jira-software-issues-with-smart-commit-messages-298979931.html). This implementation is nearly identical to their spec. The general idea is that you can use commands in your changelist description to carry out actions on JIRA issues. |
3 | 3 |
|
| 4 | +# Installation |
| 5 | +* Place the JiraPerforceSmartCommits directory into your Swarm installation's "module" directory. |
| 6 | +* Edit your Swarm's data/config.php to add the below configuration settings. |
| 7 | +* Add this module to your config/custom.modules.config.php file (create it if it doesn't exist). The file should look something like: |
| 8 | +```php |
| 9 | +<?php |
| 10 | +\Laminas\Loader\AutoloaderFactory::factory( |
| 11 | + array( |
| 12 | + 'Laminas\Loader\StandardAutoloader' => array( |
| 13 | + 'namespaces' => array( |
| 14 | + 'JiraPerforceSmartCommits' => BASE_PATH . '/module/JiraPerforceSmartCommits/src', |
| 15 | + ) |
| 16 | + ) |
| 17 | + ) |
| 18 | +); |
| 19 | +return [ |
| 20 | + 'JiraPerforceSmartCommits', |
| 21 | +]; |
| 22 | +``` |
| 23 | + |
| 24 | +# Configuration |
| 25 | +The following configurables are available for this module: |
| 26 | +```php |
| 27 | + 'jirasmartcommits' => array( |
| 28 | + 'host' => 'https://your-studio.atlassian.net', |
| 29 | + 'user' => 'username', |
| 30 | + 'password' => 'password', |
| 31 | + 'cite_submitter_username' => true, |
| 32 | + 'link_changelist_comment_reference' => true, |
| 33 | + ), |
| 34 | +``` |
| 35 | + |
| 36 | +This block should be a peer of `'p4'`. |
| 37 | + |
| 38 | +* `host` - URL for your installed JIRA web interface or cloud address (start with https:// or http://) |
| 39 | +* `user` - Jira Cloud: the username used to connect to your Atlassian account, Jira on-premises: the username required for Jira API access |
| 40 | +* `password` - Jira Cloud: a special API token obtained from https://id.atlassian.com/manage/api-tokens, Jira on-premises: the password required for Jira API access |
| 41 | +* `cite_submitter_username` - if Perforce and Jira have the same users, leave this option on to reference the submitter in any comment made. |
| 42 | +* `link_changelist_comment_reference` - whether to link the changelist number in a comment back to Swarm's change |
| 43 | + |
| 44 | +Vote on https://jira.atlassian.com/browse/JRASERVER-35124 to allow comments to be made on behalf of the submitter for on-premises installations. |
| 45 | + |
4 | 46 | # Usage |
5 | 47 | On a single line in your changelist description, reference one or more JIRA issues then enter one or more commands. Valid commands are: |
6 | 48 |
|
|
0 commit comments