{"id":23564574,"url":"https://github.com/parnic/jiraperforcesmartcommits","last_synced_at":"2025-11-01T21:30:22.413Z","repository":{"id":75525153,"uuid":"106192202","full_name":"parnic/JiraPerforceSmartCommits","owner":"parnic","description":"An implementation of Atlassian's Smart Commits for Perforce and JIRA","archived":false,"fork":false,"pushed_at":"2024-03-26T19:42:33.000Z","size":21,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-26T17:16:42.657Z","etag":null,"topics":["atlassian","atlassian-jira","jira","perforce","swarm"],"latest_commit_sha":null,"homepage":"https://swarm.workshop.perforce.com/projects/chris_pickett-jira-smart-commits","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parnic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-10-08T16:39:41.000Z","updated_at":"2023-06-15T22:44:08.000Z","dependencies_parsed_at":"2024-03-26T20:49:51.219Z","dependency_job_id":null,"html_url":"https://github.com/parnic/JiraPerforceSmartCommits","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2FJiraPerforceSmartCommits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2FJiraPerforceSmartCommits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2FJiraPerforceSmartCommits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parnic%2FJiraPerforceSmartCommits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parnic","download_url":"https://codeload.github.com/parnic/JiraPerforceSmartCommits/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239324061,"owners_count":19620124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atlassian","atlassian-jira","jira","perforce","swarm"],"created_at":"2024-12-26T17:16:47.831Z","updated_at":"2025-11-01T21:30:22.273Z","avatar_url":"https://github.com/parnic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Purpose\nThis 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.\n\n# Installation\n* Place the JiraPerforceSmartCommits directory into your Swarm installation's \"module\" directory.\n* Edit your Swarm's data/config.php to add the below configuration settings.\n* Add this module to your config/custom.modules.config.php file (create it if it doesn't exist). The file should look something like:\n```php\n\u003c?php\n\\Laminas\\Loader\\AutoloaderFactory::factory(\n    array(\n        'Laminas\\Loader\\StandardAutoloader' =\u003e array(\n            'namespaces' =\u003e array(\n                'JiraPerforceSmartCommits'       =\u003e BASE_PATH . '/module/JiraPerforceSmartCommits/src',\n            )\n        )\n    )\n);\nreturn [\n    'JiraPerforceSmartCommits',\n];\n```\n\n# Configuration\nThe following configurables are available for this module:\n```php\n    'jirasmartcommits' =\u003e array(\n        'host'      =\u003e 'https://your-studio.atlassian.net',\n        'user'      =\u003e 'username',\n        'password'  =\u003e 'password',\n        'cite_submitter_username' =\u003e true,\n        'link_changelist_comment_reference' =\u003e true,\n    ),\n```\n\nThis block should be a peer of `'p4'`.\n\n* `host` - URL for your installed JIRA web interface or cloud address (start with https:// or  http://)\n* `user` - Jira Cloud: the username used to connect to your Atlassian account, Jira on-premises: the username required for Jira API access\n* `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\n* `cite_submitter_username` - if Perforce and Jira have the same users, leave this option on to reference the submitter in any comment made.\n* `link_changelist_comment_reference` - whether to link the changelist number in a comment back to Swarm's change\n\nVote on https://jira.atlassian.com/browse/JRASERVER-35124 to allow comments to be made on behalf of the submitter for on-premises installations.\n\n# Usage\nOn a single line in your changelist description, reference one or more JIRA issues then enter one or more commands. Valid commands are:\n\n* The name of a transition (such as #done)\n  * This will perform the specified transition on the issue.\n  * Transitions match by name prefix, replacing spaces with -. So \"Done\" becomes #done, \"Start Progress\" becomes #start-progress (or just #start), etc.\n* #comment [text]\n  * This will leave a comment on the task (or worklog, if logging time). The text can be anything so long as it's on the same line.\n  * Comments must be followed by the text that you want to be part of the comment. #comment without anything after it will do nothing.\n  * You can put other commands after #comment [text] without issue, so \"#comment Increased size by 5 #done\" would transition the issue to \"Done\" and leave the comment \"Increased size by 5\"\n* #time [time spent]\n  * Time is a set of number-followed-by-letter representing the unit of time. So \"4h\" would be 4 hours. \"4h 30m\" would be 4 hours, 30 minutes. \"2d 2h\" would be 2 days, 2 hours. Etc. You can go all the way up to weeks (w).\n  * Note that the project/issue must be configured to support time tracking in order for this to work.\n\n# Notes\nCommands _must_ be on the **same line** as the JIRA issue key(s) they apply to. This is because multiple keys can have multiple actions taken on them in a single changelist description (see example below).\n\nCommands _must_ have a space before them. \"Removed problematic condition#done\" wouldn't work, for example.\n\n# Examples\nAnything between the JIRA issue key and commands (or before a JIRA key) is ignored. So, for example, this changelist description:\n\n\u003e [JRA-1234] - Enable Smart Commits for Perforce #done\n\nwould transition issue JRA-1234 to Done without any comment or time logging.\n\n\u003e Work done toward JRA-1234, PERFORCE-1000. #comment Got basic framework up and running. #time 1d\n\nThis would log 1 day of work with the comment \"Got basic framework up and running\" on both JRA-1234 and PERFORCE-1000. Multiple issues can be separated by any text, not just commas or whitespace.\nMultiple issues can be handled separately if you wish:\n\n\u003e JRA-1234 #done #comment Completed final outstanding work item.\n\u003e PERFORCE-1000 #comment Nearly done, just need to add handling for different types of transitions.\n\nBasically all you need to do is reference one or more JIRA issues followed by one or more commands. It tries to intelligently handle text so you can separate changelist descriptions from JIRA comments (perhaps you want to go into more detail in Perforce than is necessary on JIRA, for example).\n\n# Limitations\nUntil Atlassian provides a way for automation/service users to act on behalf of other users on JIRA server instances (https://jira.atlassian.com/browse/JRASERVER-35124), all commands will be performed by the user configured in the module. Comments will @reference the user that made the commit, if that option is enabled, but will still always come from the configured user.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparnic%2Fjiraperforcesmartcommits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparnic%2Fjiraperforcesmartcommits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparnic%2Fjiraperforcesmartcommits/lists"}