{"id":15145482,"url":"https://github.com/prestashop/kanbanbot","last_synced_at":"2026-01-20T17:18:30.257Z","repository":{"id":163968310,"uuid":"630486990","full_name":"PrestaShop/kanbanbot","owner":"PrestaShop","description":"Kanban Bot - Used to automatically populate the Kanban used to monitor PRs in progress","archived":false,"fork":false,"pushed_at":"2024-10-21T15:49:58.000Z","size":405,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-10-29T17:04:04.612Z","etag":null,"topics":["github-bot","hacktoberfest","tool"],"latest_commit_sha":null,"homepage":"https://kanbanbot.prestashop-project.org/","language":"PHP","has_issues":false,"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/PrestaShop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T13:40:20.000Z","updated_at":"2024-10-21T15:50:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0a15ee8-16f9-483c-9cb2-b1ea6791a367","html_url":"https://github.com/PrestaShop/kanbanbot","commit_stats":{"total_commits":105,"total_committers":7,"mean_commits":15.0,"dds":0.5047619047619047,"last_synced_commit":"35589b4ea2011e28d3d6e91dd765b708a9b05caf"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fkanbanbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fkanbanbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fkanbanbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fkanbanbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrestaShop","download_url":"https://codeload.github.com/PrestaShop/kanbanbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163335,"owners_count":19265256,"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":["github-bot","hacktoberfest","tool"],"created_at":"2024-09-26T11:25:44.684Z","updated_at":"2025-10-19T16:31:47.458Z","avatar_url":"https://github.com/PrestaShop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kanbanbot\n\nA bot to automatize some repetitive actions on PR's and [PR Dashboard](https://github.com/orgs/PrestaShop/projects/17)\n\n## Requirements and application running\n\nOnly php (see the version [here](composer.json)) and a server like apache are needed.\n\n1. Run `composer install`\n2. Setup a webserver to serve the root directory of the application. For example use Symfony built-in server with command `symfony serve`\n\nYou can also use Docker.\n\n## Functioning\n\nKanbanbot is mainly based on one webhook. See the following code [here](config/packages/framework.yaml) :\n```yaml\nwebhook:\n        routing:\n            github:\n                service: App\\Shared\\Infrastructure\\Webhook\\GithubWebhookParser\n```\n\nThe production application has been setup so that GitHub send every event that happens on PrestaShop organization to Kanbanbot as [webhook](https://docs.github.com/en/webhooks-and-events/webhooks/about-webhooks).\n\nKanbanbot listens to received events and then run the appropriate commands.\n\n## How to add a usecase ?\n\nThere are two layers to consider when adding a new usecase :\n1. The first layout is responsible to match the appropriate commands in terms of the triggered event. To do that you have to \ncreate a new class which implements [App\\Shared\\Infrastructure\\Factory\\CommandFactory\\CommandStrategyInterface.php](src/Shared/Infrastructure/Factory/CommandFactory/CommandStrategyInterface.php).\nYou can see some examples in the [src/Shared/Infrastructure/Factory/CommandFactory/Strategy/Command](src/Shared/Infrastructure/Factory/CommandFactory/Strategy/Command) folder.\nIn this layer you can also add global github event exclusions. To do that you can create a new class which implements [App\\Shared\\Infrastructure\\Factory\\CommandFactory\\ExclusionStrategyInterface.php](src/Shared/Infrastructure/Factory/CommandFactory/ExclusionStrategyInterface.php). You can see some examples in the [src/Shared/Infrastructure/Factory/CommandFactory/Strategy/Exclusion](src/Shared/Infrastructure/Factory/CommandFactory/Strategy/Exclusion) folder.\n2. The second layout contains the commands themselves. They are dispatched in several Bounded context like in [PullRequest](src/PullRequest/Application/CommandHandler) and in [PullRequestDashboard](src/PullRequestDashboard/Application/CommandHandler).\n\n## Testing\n\nThe whole application is tested. This widely avoids regressions and allows easy refactoring or library updating.\n\nThere are three kinds of tests:\n1. Unit tests. In this application unit test means that no infrastructure (like db, api calls ...) are used. This allows a really fast execution and then it gives a quick feedback to practice TDD. Also unit tests adopts a functional approach. It means that it tests the behavior of the application and not the implementation. Concretely they test CommandHandler.\n[Here is an example](tests/PullRequest/Application/CommandHandler/AddLabelByAapprovalCountCommandHandlerTest.php)\n2. Integration tests. They test only adapters like implementations of repositories. [Here is an example](tests/Shared/Infrastructure/Adapter/RestGithubCommitterRepositoryTest.php)\n3. EndToEnd tests. They test that commands are well dispatched in terms of the request. [Here is an example](tests/Shared/Infrastructure/Webhook/GithubWebhookTest.php)\n\n## Composer scripts\n\nThere are some composer scripts to help you to develop (unit tests, integration tests, end to end tests, code style, phpstan ...).\nBefore pushing a commit you can run `composer local-ci to` check if everything is ok.\n\n## Deployment of kanbanbot new version\n\n1. Bump the version number in `app.version` variable in the [config/service.php](config/services.php) file!\n2. Follow the GitHub workflow described below to deploy latest version of `main` branch\n\nYou can verify the deployed version : ping the `/healthcheck` route that will return the version number.\n\n## Environments\n\n* **Production**: kanbanbot.prestashop-project.org\n\n## Workflow\n\nThe GitHub workflow is used as follow:\n\n![alt text](pics/workflow.png \"Github Workflow\")\n\nAs you can see from the schema above\n- add the label \"integration-deployment\" to a Pull Request to trigger the deployment of the integration environment and be able to test it\n- merge a Pull Request against branch `main` to trigger the deployment of the preprod environment and be able to test it\n- publish a GitHub release to trigger the deployment of the production environment","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fkanbanbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestashop%2Fkanbanbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fkanbanbot/lists"}