A focused Symfony Console application to import Markdown files from a directory into Jira Cloud as issues.
- PHP >= 8.4
- Composer
- Clone the repository.
- Install dependencies:
composer install
The application is configured via environment variables. You can set these in a .env.local file or in your system environment.
| Variable | Description | Default |
|---|---|---|
JIRA_BASE_URL |
Your Jira Cloud instance URL (e.g., https://your-domain.atlassian.net) |
- |
JIRA_EMAIL |
The email address associated with your Jira account | - |
JIRA_API_TOKEN |
Your Jira API token | - |
JIRA_PROJECT_KEY |
The Jira project key where tickets will be created | - |
JIRA_DEFAULT_ISSUE_TYPE |
The default issue type for created tickets | Task |
Run the following command to import Markdown files:
php bin/console app:create-jira-ticket <markdown-directory>- The command discovers
.mdfiles directly inside the provided directory. - It does not scan subdirectories recursively.
- Each file is rendered using a Twig template located at
config/jira/ticket-template.md.twig. - The first H1 heading (
# Heading) in the Markdown file is used as the Jira issue summary. If no H1 is found, the filename (without extension) is used. - The command continues processing even if individual file imports fail.
- A summary is provided at the end of the run.
✓ ticket-a.md -> PROJ-123
✗ ticket-b.md -> Jira API error: [status code 400] ...
Processed: 2 Created: 1 Failed: 1
The project includes several quality tools accessible via Composer:
- Run tests:
composer test - Static analysis (PHPStan):
composer phpstan
- Code style check (PHPCS):
composer phpcs
- Code style fix (PHPCBF):
composer phpcbf
You can customize how tickets are rendered in Jira by editing config/jira/ticket-template.md.twig. The template has access to:
filename: The name of the Markdown file.content: The raw content of the Markdown file.