A Flarum extension. Issue tracking in Flarum.
Install with composer:
composer require foskym/flarum-issue-tracking:"*"
composer update foskym/flarum-issue-tracking:"*"
php flarum migrate
php flarum cache:clear
Install this, and then install the platform provider.
Enable them and set the configs.
"require": {
"flarum/core": "^1.8.0",
"foskym/flarum-issue-tracking": "*"
}
use Flarum\Extend;
return [
new Extend\Locales(__DIR__.'/locale'),
(new \FoskyM\IssueTracking\Extend\PlatformProvider())
->provide(PlatformProvider::class)
];
// ...
use FoskyM\IssueTracking\AbstractPlatformProvider;
use FoskyM\IssueTracking\AbstractIssue;
use FoskyM\IssueTracking\AbstractProgress;
// ...
class PlatformProvider extends AbstractPlatformProvider
{
public $key = "foskym-issue-tracking-youtrack";
public $name = "YouTrack";
public function availableSettings(): array
{
return [
'url' => 'required|url',
'token' => 'required',
'project' => 'required',
'state_field' => 'required',
'resolved_state' => 'required',
];
}
// ...
}
foskym-issue-tracking-youtrack:
admin:
fields:
heading: "Issue Tracking: YouTrack"
url_label: "YouTrack URL"
token_label: "YouTrack Token"
project_label: "YouTrack Project ID"
state_field_label: "State Field"
resolved_state_label: "Resolved State"
# {$setting_key}_label: ...
url_help: ...
token_help: ...
project_help: ...
state_field_help: ...
resolved_state_help: ...
# {$setting_key}_help: ...
# help text can be ignored
See AbstractPlatformProvider.php
And see YouTrack's PlatformProvider.php
class IssueCreated
{
/**
* @var User
*/
public $actor;
/**
* @var \FoskyM\IssueTracking\Model\Issue
*/
public $issue;
/**
* @var Discussion
*/
public $discussion;
}
class CommentPosted
{
/**
* @var User
*/
public $actor;
/**
* @var CommentPost
*/
public $post;
/**
* @var string
*/
public $issueId;
}