diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..72fc02c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @sidler @marcreichel diff --git a/LICENSE b/LICENSE index 9e56536..f7cd6b2 100644 --- a/LICENSE +++ b/LICENSE @@ -14,7 +14,7 @@ copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE diff --git a/README.md b/README.md index 88c4f2d..b92dac4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Mantis 2 Github Connector +# Mantis 2 GitHub Connector [![Packagist Version](https://img.shields.io/packagist/v/artemeon/mantis2github)](https://packagist.org/packages/artemeon/mantis2github) [![Packagist Downloads](https://img.shields.io/packagist/dt/artemeon/mantis2github)](https://packagist.org/packages/artemeon/mantis2github) @@ -78,25 +78,25 @@ mantis2github sync 123 456 789 Read details of a GitHub issue. ```shell -mantis2github read:github [id] +mantis2github read:github ``` ##### Arguments | Argument | required | Description | |----------|----------|-----------------| -| `id` | `false` | GitHub issue id | +| `id` | `true` | GitHub issue id | #### `read:mantis` Read details of a Mantis issue. ```shell -mantis2github read:mantis [id] +mantis2github read:mantis ``` ##### Arguments | Argument | required | Description | |----------|----------|-----------------| -| `id` | `false` | Mantis issue id | +| `id` | `true` | Mantis issue id | diff --git a/composer.json b/composer.json index 8a04db0..629f8d2 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } }, "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*", "guzzlehttp/guzzle": "^7.3.0", "symfony/console": "^5.0", diff --git a/composer.lock b/composer.lock index e5e1129..46d7b31 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ec594cb800ea7409cd88b811aed33f64", + "content-hash": "6526f46a258ecba9d64af1ccf85c7838", "packages": [ { "name": "guzzlehttp/guzzle", @@ -1580,9 +1580,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*", - "composer-runtime-api": "^2.2" + "composer-runtime-api": "^2.2.2" }, "platform-dev": [], "plugin-api-version": "2.2.0" diff --git a/mantis2github b/mantis2github index 58eae06..1db3372 100644 --- a/mantis2github +++ b/mantis2github @@ -1,13 +1,14 @@ #!/usr/bin/env php - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ + +use Artemeon\M2G\Command\ConfigurationCommand; +use Artemeon\M2G\Command\CreateGithubIssueFromMantisIssue; +use Artemeon\M2G\Command\ReadGithubIssueCommand; +use Artemeon\M2G\Command\ReadMantisIssueCommand; +use Artemeon\M2G\Config\ConfigReader; +use Artemeon\M2G\Service\GithubConnector; +use Artemeon\M2G\Service\MantisConnector; +use Symfony\Component\Console\Application; (new class() { protected string $name; @@ -18,15 +19,15 @@ $this->autoload(); $this->fetchVersion(); - $configValues = (new \Artemeon\M2G\Config\ConfigReader())->read(); - $githubConnector = new \Artemeon\M2G\Service\GithubConnector($configValues); - $mantisConnector = new \Artemeon\M2G\Service\MantisConnector($configValues); + $configValues = (new ConfigReader())->read(); + $githubConnector = new GithubConnector($configValues); + $mantisConnector = new MantisConnector($configValues); - $app = new \Symfony\Component\Console\Application($this->name, $this->version); - $app->add(new \Artemeon\M2G\Command\ConfigurationCommand($githubConnector)); - $app->add(new \Artemeon\M2G\Command\ReadMantisIssueCommand($mantisConnector)); - $app->add(new \Artemeon\M2G\Command\ReadGithubIssueCommand($githubConnector)); - $app->add(new \Artemeon\M2G\Command\CreateGithubIssueFromMantisIssue($mantisConnector, $githubConnector)); + $app = new Application($this->name, $this->version); + $app->add(new ConfigurationCommand()); + $app->add(new ReadMantisIssueCommand($mantisConnector)); + $app->add(new ReadGithubIssueCommand($githubConnector)); + $app->add(new CreateGithubIssueFromMantisIssue($mantisConnector, $githubConnector)); $app->run(); } diff --git a/src/Command/ConfigurationCommand.php b/src/Command/ConfigurationCommand.php index 83904f4..076f8e2 100644 --- a/src/Command/ConfigurationCommand.php +++ b/src/Command/ConfigurationCommand.php @@ -3,7 +3,6 @@ namespace Artemeon\M2G\Command; use Artemeon\M2G\Config\ConfigReader; -use Artemeon\M2G\Service\GithubConnector; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Yaml\Yaml; @@ -14,17 +13,6 @@ class ConfigurationCommand extends Command protected string $configPath = __DIR__ . '/../../../config.yaml'; protected array $config = []; - private GithubConnector $githubConnector; - - /** - * @param GithubConnector $mantisConnector - */ - public function __construct(GithubConnector $mantisConnector) - { - parent::__construct(); - $this->githubConnector = $mantisConnector; - } - protected function configure() { $this->setName('configure') diff --git a/src/Command/CreateGithubIssueFromMantisIssue.php b/src/Command/CreateGithubIssueFromMantisIssue.php index de135bf..9319639 100644 --- a/src/Command/CreateGithubIssueFromMantisIssue.php +++ b/src/Command/CreateGithubIssueFromMantisIssue.php @@ -1,24 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Command; use Artemeon\M2G\Dto\GithubIssue; -use Artemeon\M2G\Dto\MantisIssue; use Artemeon\M2G\Service\GithubConnector; use Artemeon\M2G\Service\MantisConnector; -use GuzzleHttp\Exception\GuzzleException; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use function Termwind\render; @@ -34,7 +23,6 @@ public function __construct(MantisConnector $mantisConnector, GithubConnector $g $this->githubConnector = $githubConnector; } - protected function configure() { $this->setName('sync') @@ -99,15 +87,14 @@ protected function handle(): int $newGithubIssue = GithubIssue::fromMantisIssue($mantisIssue); - $filteredLabels = array_filter($labels, function ($label) use ($mantisIssue) { + $filteredLabels = array_values(array_filter($labels, function ($label) use ($mantisIssue) { return strtolower($label) === strtolower($mantisIssue->getProject()); - }); + })); $newGithubIssue->setLabels($filteredLabels); + $newGithubIssue = $this->githubConnector->createIssue($newGithubIssue); - try { - $newGithubIssue = $this->githubConnector->createIssue($newGithubIssue); - } catch (GuzzleException | \Exception $e) { + if ($newGithubIssue === null) { $issues[] = [ 'id' => $id, 'icon' => '', @@ -118,7 +105,17 @@ protected function handle(): int } $mantisIssue->setUpstreamTicket($newGithubIssue->getIssueUrl()); - $this->mantisConnector->patchUpstreamField($mantisIssue); + $patched = $this->mantisConnector->patchUpstreamField($mantisIssue); + + if ($patched === false) { + $issues[] = [ + 'id' => $id, + 'icon' => '', + 'message' => 'Upstream ticket URL could not be updated.', + 'issue' => '', + ]; + continue; + } $issues[] = [ 'id' => $id, diff --git a/src/Command/ReadGithubIssueCommand.php b/src/Command/ReadGithubIssueCommand.php index aaa8caa..778b6f9 100644 --- a/src/Command/ReadGithubIssueCommand.php +++ b/src/Command/ReadGithubIssueCommand.php @@ -1,12 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Command; @@ -32,7 +24,7 @@ public function __construct(GithubConnector $mantisConnector) protected function configure() { $this->setName('read:github') - ->addArgument('id', InputArgument::OPTIONAL, 'GitHub issue id') + ->addArgument('id', InputArgument::REQUIRED, 'GitHub issue id') ->setDescription('Read details of a GitHub issue'); } @@ -49,7 +41,7 @@ protected function handle(): int { $this->header(); - $issue = $this->askForIssue(); + $issue = $this->fetchIssueDetails(); terminal()->clear(); @@ -112,17 +104,13 @@ protected function handle(): int return 0; } - protected function askForIssue(): GithubIssue + protected function fetchIssueDetails(): GithubIssue { - $id = $this->argument('id') ?? $this->ask(' GitHub Issue ID:'); + $id = $this->argument('id'); if (!is_numeric($id)) { $this->error('Please provide a valid issue id.'); - if (empty($this->argument('id'))) { - $this->askForIssue(); - } - exit(1); } @@ -134,7 +122,7 @@ protected function askForIssue(): GithubIssue $this->error('Issue not found.'); if (empty($this->argument('id'))) { - $this->askForIssue(); + $this->fetchIssueDetails(); } exit(1); diff --git a/src/Command/ReadMantisIssueCommand.php b/src/Command/ReadMantisIssueCommand.php index 752369a..d193691 100644 --- a/src/Command/ReadMantisIssueCommand.php +++ b/src/Command/ReadMantisIssueCommand.php @@ -1,12 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Command; @@ -30,7 +22,7 @@ protected function configure() { $this->setName('read:mantis') ->setDescription('Read details of a Mantis issue') - ->addArgument('id', InputArgument::OPTIONAL, 'The issue id'); + ->addArgument('id', InputArgument::REQUIRED, 'The issue id'); } protected function header(): void @@ -46,21 +38,21 @@ protected function handle(): int { $this->header(); - $issue = $this->askForIssue(); + $issue = $this->fetchIssueDetails(); terminal()->clear(); - if ($issue->getResolution() === 'open') { + if (in_array($issue->getResolution(), ['open', 'reopened'])) { render(<< - Issue is open + Issue is {$issue->getResolution()} HTML); - } else if ($issue->getResolution() === 'fixed') { + } else { render( << - Issue is fixed + Issue is {$issue->getResolution()} HTML ); @@ -88,17 +80,13 @@ protected function handle(): int return 0; } - protected function askForIssue(): ?MantisIssue + protected function fetchIssueDetails(): ?MantisIssue { - $id = $this->argument('id') ?? $this->ask(' Mantis Issue ID:'); + $id = $this->argument('id'); if (!is_numeric($id)) { $this->error('Please provide a valid issue id.'); - if (empty($this->argument('id'))) { - $this->askForIssue(); - } - exit(1); } @@ -109,10 +97,6 @@ protected function askForIssue(): ?MantisIssue if (!$issue) { $this->error('Issue not found.'); - if (empty($this->argument('id'))) { - $this->askForIssue(); - } - exit(1); } diff --git a/src/Config/ConfigReader.php b/src/Config/ConfigReader.php index 703513a..9774eb4 100644 --- a/src/Config/ConfigReader.php +++ b/src/Config/ConfigReader.php @@ -1,12 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Config; diff --git a/src/Config/ConfigValues.php b/src/Config/ConfigValues.php index fa6fddb..633be10 100644 --- a/src/Config/ConfigValues.php +++ b/src/Config/ConfigValues.php @@ -1,12 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Config; diff --git a/src/Dto/GithubIssue.php b/src/Dto/GithubIssue.php index af33862..35acf0d 100644 --- a/src/Dto/GithubIssue.php +++ b/src/Dto/GithubIssue.php @@ -1,55 +1,29 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Dto; +use JetBrains\PhpStorm\Pure; + class GithubIssue { - private ?int $id; - private ?int $number; - private string $title; - private string $description; - private string $issueUrl; - private string $state; - private array $assignees; - private array $labels; - public function __construct( - ?int $id, - ?int $number, - string $summary, - string $description, - string $issueUrl, - string $state = 'open', - array $assignees = [], - array $labels = [] + private ?int $id = null, + private ?int $number = null, + private ?string $title = null, + private ?string $description = null, + private ?string $issueUrl = null, + private string $state = 'open', + private array $assignees = [], + private array $labels = [], ) { - $this->id = $id; - $this->title = $summary; - $this->description = $description; - $this->number = $number; - $this->issueUrl = $issueUrl; - $this->state = $state; - $this->assignees = $assignees; - $this->labels = $labels; } + #[Pure] public static function fromMantisIssue(MantisIssue $issue): GithubIssue { return new self( - null, - null, - $issue->getSummary(), - $issue->getIssueUrl() . PHP_EOL . PHP_EOL . $issue->getDescription(), - '', - '', + title: $issue->getSummary(), + description: $issue->getIssueUrl() . PHP_EOL . PHP_EOL . $issue->getDescription(), ); } @@ -58,22 +32,22 @@ public function getId(): ?int return $this->id; } - public function getTitle(): string + public function getNumber(): ?int { - return $this->title; + return $this->number; } - public function getDescription(): string + public function getTitle(): ?string { - return $this->description; + return $this->title; } - public function getNumber(): ?int + public function getDescription(): ?string { - return $this->number; + return $this->description; } - public function getIssueUrl(): string + public function getIssueUrl(): ?string { return $this->issueUrl; } @@ -97,6 +71,6 @@ public function setLabels(array $labels = []): self public function getLabels(): array { - return $this->labels; + return $this->labels ?? []; } } diff --git a/src/Dto/MantisIssue.php b/src/Dto/MantisIssue.php index bc302d6..ed25d4d 100644 --- a/src/Dto/MantisIssue.php +++ b/src/Dto/MantisIssue.php @@ -1,54 +1,22 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Dto; class MantisIssue { - private int $id; - private string $summary; - private string $description; - private string $project; - private string $status; - private string $resolution; - private ?string $assignee; - private ?string $upstreamTicket; - private ?int $upstreamTicketFieldId; - private ?string $upstreamTicketFieldName; - private ?string $issueUrl; - public function __construct( - int $id, - string $summary, - string $description, - string $project, - string $status, - string $resolution, - ?string $assignee, - ?string $issueUrl, - ?string $upstreamTicket, - ?int $upstreamTicketFieldId, - ?string $upstreamTicketFieldName - ) - { - $this->id = $id; - $this->summary = $summary; - $this->description = $description; - $this->project = $project; - $this->status = $status; - $this->resolution = $resolution; - $this->assignee = $assignee; - $this->upstreamTicket = $upstreamTicket; - $this->issueUrl = $issueUrl; - $this->upstreamTicketFieldId = $upstreamTicketFieldId; - $this->upstreamTicketFieldName = $upstreamTicketFieldName; + private int $id, + private string $summary, + private string $description, + private string $project, + private string $status, + private string $resolution, + private ?string $assignee, + private ?string $issueUrl, + private ?string $upstreamTicket = null, + private ?int $upstreamTicketFieldId = null, + private ?string $upstreamTicketFieldName = null, + ) { } public function getId(): int diff --git a/src/Service/GithubConnector.php b/src/Service/GithubConnector.php index 5fbc844..ceed304 100644 --- a/src/Service/GithubConnector.php +++ b/src/Service/GithubConnector.php @@ -1,12 +1,4 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Service; @@ -18,88 +10,82 @@ class GithubConnector { - private ?ConfigValues $config; + private Client $client; - public function __construct(?ConfigValues $config) + public function __construct(private ?ConfigValues $config) { - $this->config = $config; + $this->client = new Client([ + 'headers' => [ + 'Accept' => 'application/vnd.github.v3+json', + 'Authorization' => 'token ' . $this->config->getGithubToken(), + ], + 'base_uri' => 'https://api.github.com/repos/' . $config->getGithubRepo() . '/', + ]); } public function readIssue(int $number): ?GithubIssue { try { - $response = $this->getDefaultClient()->get( - '/repos/' . $this->config->getGithubRepo() . '/issues/' . $number + $response = $this->client->get( + 'issues/' . $number, ); $result = json_decode($response->getBody(), true); - } catch (GuzzleException | Exception $e) { + } catch (GuzzleException | Exception) { return null; } return new GithubIssue( - $result['id'], - $result['number'], - $result['title'], - $result['body'] ?? '', - $result['html_url'], - $result['state'], - $result['assignees'], - $result['labels'], + id: $result['id'], + number: $result['number'], + title: $result['title'], + description: $result['body'] ?? '', + issueUrl: $result['html_url'], + state: $result['state'], + assignees: $result['assignees'], + labels: $result['labels'], ); } - /** - * @throws GuzzleException - */ - public function createIssue(GithubIssue $issue): GithubIssue + public function createIssue(GithubIssue $issue): ?GithubIssue { - $response = $this->getDefaultClient()->post( - '/repos/' . $this->config->getGithubRepo() . '/issues', - [ - 'body' => json_encode([ - 'title' => $issue->getTitle(), - 'body' => $issue->getDescription(), - 'labels' => $issue->getLabels(), - ]), - ], - ); + try { + $response = $this->client->post( + 'issues', + [ + 'body' => json_encode([ + 'title' => $issue->getTitle(), + 'body' => $issue->getDescription(), + 'labels' => $issue->getLabels(), + ]), + ], + ); + } catch (GuzzleException | Exception) { + return null; + } $result = json_decode($response->getBody(), true); return new GithubIssue( - $result['id'], - $result['number'], - $result['title'], - $result['body'], - $result['html_url'], - $result['state'], - $result['assignees'], - $result['labels'], + id: $result['id'], + number: $result['number'], + title: $result['title'], + description: $result['body'], + issueUrl: $result['html_url'], + state: $result['state'], + assignees: $result['assignees'], + labels: $result['labels'], ); } public function getLabels(): array { try { - $response = $this->getDefaultClient()->get( - '/repos/' . $this->config->getGithubRepo() . '/labels', - ); + $response = $this->client->get('labels'); $result = json_decode($response->getBody(), true); - } catch (GuzzleException | Exception $e) { + } catch (GuzzleException | Exception) { return []; } - return $result; - } - - private function getDefaultClient(): Client - { - return new Client([ - 'base_uri' => 'https://api.github.com/', - 'headers' => [ - 'Authorization' => 'token ' . $this->config->getGithubToken(), - 'accept' => 'application/vnd.github.v3+json', - ], - ]); + return $result ?: []; } } diff --git a/src/Service/MantisConnector.php b/src/Service/MantisConnector.php index 2a9898b..4a2ba09 100644 --- a/src/Service/MantisConnector.php +++ b/src/Service/MantisConnector.php @@ -1,98 +1,87 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ namespace Artemeon\M2G\Service; use Artemeon\M2G\Config\ConfigValues; use Artemeon\M2G\Dto\MantisIssue; +use Exception; use GuzzleHttp\Client; +use GuzzleHttp\Exception\GuzzleException; class MantisConnector { - private ?ConfigValues $config; + private Client $client; - public function __construct(?ConfigValues $config) + public function __construct(private ?ConfigValues $config) { - $this->config = $config; + $this->client = new Client([ + 'headers' => [ + 'Authorization' => $this->config->getMantisToken(), + 'Content-Type' => 'application/json', + ], + 'base_uri' => rtrim($this->config->getMantisUrl(), '/') . '/api/rest/issues/', + ]); } public function readIssue(int $number): ?MantisIssue { try { - $response = $this->getDefaultClient()->get( - rtrim($this->config->getMantisUrl(), '/') . '/api/rest/issues/' . $number - ); + $response = $this->client->get((string) $number); $result = json_decode($response->getBody(), true); - } catch (\Exception $e) { + } catch (GuzzleException | Exception) { return null; } $issue = new MantisIssue( - $result['issues'][0]['id'], - $result['issues'][0]['summary'], - $result['issues'][0]['description'], - $result['issues'][0]['project']['name'], - $result['issues'][0]['status']['name'], - $result['issues'][0]['resolution']['name'], - $result['issues'][0]['handler']['real_name'] ?? $result['issues'][0]['handler']['name'] ?? null, - $this->config->getMantisUrl() . '/view.php?id=' . $result['issues'][0]['id'], - null, - null, - null, + id: $result['issues'][0]['id'], + summary: $result['issues'][0]['summary'], + description: $result['issues'][0]['description'], + project: $result['issues'][0]['project']['name'], + status: $result['issues'][0]['status']['name'], + resolution: $result['issues'][0]['resolution']['name'], + assignee: $result['issues'][0]['handler']['real_name'] ?? $result['issues'][0]['handler']['name'] ?? null, + issueUrl: $this->config->getMantisUrl() . '/view.php?id=' . $result['issues'][0]['id'], ); $this->updateUpstreamFieldsIssue($result['issues'][0], $issue); return $issue; } - public function patchUpstreamField(MantisIssue $issue) + public function patchUpstreamField(MantisIssue $issue): bool { - $jsonEncode = json_encode([ + $body = json_encode([ 'custom_fields' => [ [ 'field' => [ 'id' => $issue->getUpstreamTicketFieldId(), - 'name' => $issue->getUpstreamTicketFieldName() + 'name' => $issue->getUpstreamTicketFieldName(), ], - 'value' => $issue->getUpstreamTicket() - ] - ] + 'value' => $issue->getUpstreamTicket(), + ], + ], ]); - $response = $this->getDefaultClient()->patch( - $this->config->getMantisUrl() . '/api/rest/issues/' . $issue->getId(), - [ - 'body' => $jsonEncode - ] - ); + try { + $this->client->patch( + $issue->getId(), + [ + 'body' => $body, + ], + ); + return true; + } catch (GuzzleException | Exception) { + return false; + } } private function updateUpstreamFieldsIssue(array $issue, MantisIssue $mantisIssue): void { - foreach ($issue['custom_fields'] as $aField) { - if ($aField['field']['name'] === 'Upstream Ticket') { - $mantisIssue->setUpstreamTicketFieldName($aField['field']['name']); - $mantisIssue->setUpstreamTicketFieldId($aField['field']['id']); - $mantisIssue->setUpstreamTicket($aField['value']); + foreach ($issue['custom_fields'] as $field) { + if ($field['field']['name'] === 'Upstream Ticket') { + $mantisIssue->setUpstreamTicketFieldName($field['field']['name']); + $mantisIssue->setUpstreamTicketFieldId($field['field']['id']); + $mantisIssue->setUpstreamTicket($field['value']); } } } - - private function getDefaultClient(): Client - { - return new Client([ - 'headers' => [ - 'Authorization' => $this->config->getMantisToken(), - 'Content-Type' => 'application/json' - ] - ]); - } - } diff --git a/stubs/config.yaml.stub b/stubs/config.yaml.stub index 137fe55..939aad7 100644 --- a/stubs/config.yaml.stub +++ b/stubs/config.yaml.stub @@ -5,5 +5,5 @@ MANTIS_TOKEN: {{mantisToken}} # github personal access token GITHUB_TOKEN: {{githubToken}} -# target repo where issues will be created, e.g. user/reponame +# target repo where issues will be created, e.g. user/repo-name GITHUB_REPOSITORY: {{githubRepository}}