-
Notifications
You must be signed in to change notification settings - Fork 1
Add application install #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mesilov
commented
Aug 10, 2025
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | yes/no |
| Issues | Fix #42 |
| License | MIT |
Функции для сущности
- Добавил билдер - И тесты на репозиторий
- Дописал описание к методу validate для домена - Юзанул cs-fixer - Юзанул ректор
- Поправил сущность
- Поправил домен
- Написал UseCase на установку приложения
- Поправил handler для установки приложения - Тест на установку (включающий в себя аккаунт битрикс 24) -Тест на метод ChangePortalLicenseFamily
…ия / статус) из конструктора . Объявляем теперь при создании.
Добавил applicationToken в сущность установки
- Добавили setToken - Поправили тест установки приложения - Поправили обработчики после правок методов в аккаунте
-Написали тест к событию
-Дополнил тестами деинсталяцию.
Add application install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @mesilov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
I've implemented a new system for managing application installations, addressing issue #42. This involves introducing a dedicated ApplicationInstallation entity to track the status and details of each app installation. I've also created specific use cases for installing, handling post-installation events, and uninstalling applications, ensuring a robust lifecycle management. The existing Bitrix24Account entity has been updated to integrate with this new system, including new fields and refined methods for managing application tokens and statuses. Additionally, I've added new Doctrine mappings and a dedicated repository for the new installation entity, along with comprehensive unit and functional tests to ensure the reliability of these changes.
Highlights
- New Application Installation Entity: I've introduced a new
ApplicationInstallationentity to manage the lifecycle and state of each application installation, including its status (new, active, blocked, deleted), associated tokens, and links to contact persons and partners. - Comprehensive Application Lifecycle Management: I've implemented dedicated use cases for
Install,OnAppInstall, andUninstallto handle the full lifecycle of an application. TheInstalluse case manages initial setup and reinstallation,OnAppInstallupdates token and status post-UI installation, andUninstallhandles deactivation. - Enhanced Bitrix24Account Integration: I've updated the
Bitrix24Accountentity and its repository to integrate seamlessly with the new application installation logic. This includes addingisMasterAccountandcommentfields, and refining how application tokens and statuses are managed during installation and uninstallation. - New Doctrine Mappings: I've added new Doctrine XML mappings for the
ApplicationInstallationentity and theApplicationStatusembeddable, ensuring proper persistence of the new data structures. - Dedicated Application Installation Repository: I've introduced a new
ApplicationInstallationRepositoryto provide robust data access and management for the newApplicationInstallationentities, complementing the existingBitrix24AccountRepository. - Improved Domain Validation: I've updated the domain validation logic in
Bitrix24Accounts\ValueObjects\Domainto be more flexible, supporting longer domain names and more labels, which improves compatibility with internationalized domains.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a comprehensive application installation and uninstallation workflow. The changes are extensive, covering new entities, repositories, use cases, and tests. While the overall structure is sound, there are several critical and high-severity issues that need to be addressed. These include a potential null pointer exception, incorrect event data being dispatched, flawed validation logic, and bugs in the test builders. I've provided detailed comments and suggestions for each issue.