Skip to content

ITK-Leantime/leantime-tickettemplate

Repository files navigation

Leantime Ticket Template

Allows administrators to create and configure a ticket templates per project.

Installation

Clone this repository into your Leantime plugin folder:

git clone https://github.com/ITK-Leantime/leantime-tickettemplate.git app/Plugins/TicketTemplate

Install and enable the plugin:

bin/leantime plugin:install leantime/ticket-template
bin/leantime plugin:enable leantime/ticket-template

Alternatively, navigate to /plugins/myapps and activate the leantime/ticket-template plugin.

Usage

Go to plugin settings (/TicketTemplate/settings), which requires at least administrator (40) role, to configure ticket templates.

Development

Run composer install

docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer install

Composer normalize

docker run --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer normalize

Coding standards

Check and apply with phpcs

docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-check
docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-apply

Check and apply with prettier

docker run --rm -v "$(pwd):/work" tmknom/prettier:latest --check assets
docker run --rm -v "$(pwd):/work" tmknom/prettier:latest --write assets

Check and apply markdownlint

docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md'
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md' --fix

Check with shellcheck

docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/create-release
docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/deploy
docker run --rm --volume "$PWD:/app" --workdir /app peterdavehello/shellcheck shellcheck bin/local.create-release

Code analysis

# This analysis takes a bit more than the default allocated ram.
docker run --interactive --rm --volume ${PWD}:/app --env PHP_MEMORY_LIMIT=256M itkdev/php8.3-fpm:latest composer code-analysis

Test release build

docker compose build && docker compose run --rm php bin/create-release dev-test

Deploy

The deploy script downloads a release from Github and unzips it. The script should be passed a tag as argument. In the process the script deletes itself, but the script finishes because it is still in memory.