Skip to content

Conversation

@KarlsonComplete
Copy link
Collaborator

No description provided.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @KarlsonComplete, 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!

Summary of Changes

This pull request introduces the ApplicationInstallation entity and its corresponding repository, along with related events and interfaces. The goal is to manage the lifecycle and status changes of application installations within the Bitrix24 ecosystem. The entity includes properties such as IDs, timestamps, statuses, and associated Bitrix24 account and partner information. The repository provides methods for saving, retrieving, and deleting application installations.

Highlights

  • ApplicationInstallation Entity: Defines the ApplicationInstallation entity with properties like ID, creation/update timestamps, Bitrix24 account/partner IDs, status, and external ID. It includes methods for changing the status of an application installation (e.g., installed, uninstalled, blocked, active) and updating associated contact persons and partner information.
  • ApplicationInstallationsRepository: Implements the ApplicationInstallationRepositoryInterface using Doctrine ORM. It provides methods for saving, retrieving by ID and Bitrix24 account ID, and deleting ApplicationInstallation entities. It also includes validation to ensure the application installation exists and is in the correct status before deletion.
  • Domain Validation: The pull request also includes a change to the Domain value object, specifically modifying the regex pattern used to validate domain names. The pattern ^[A-Za-zА-Яа-яЁё0-9-]{1,63}(\.[A-Za-zА-Яа-яЁё0-9-]{1,63}){0,2}$ limits the number of domain segments to a maximum of 3.

Changelog

Click here to see the changelog
  • src/ApplicationInstallations/Entity/ApplicationInstallation.php
    • Introduces the ApplicationInstallation entity with properties for managing application installation details.
    • Implements methods for changing contact persons, partner information, and application status.
    • Adds methods for marking applications as installed, uninstalled, active, or blocked, triggering corresponding events.
    • Includes validation to ensure status transitions are valid.
  • src/ApplicationInstallations/Infrastructure/Doctrine/ApplicationInstallationsRepository.php
    • Creates the ApplicationInstallationsRepository for persisting and retrieving ApplicationInstallation entities.
    • Implements methods for saving, retrieving by ID and Bitrix24 account ID, and deleting application installations.
    • Adds validation to ensure the application installation exists and is in the correct status before deletion.
    • Adds methods for finding application installations by Bitrix24 account ID and external ID.
  • src/Bitrix24Accounts/ValueObjects/Domain.php
    • Modifies the regex pattern for domain validation to limit the number of domain segments to a maximum of 3.
    • The pattern ^[A-Za-zА-Яа-яЁё0-9-]{1,63}(\.[A-Za-zА-Яа-яЁё0-9-]{1,63}){0,2}$ enforces this limit.
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 is currently in preview and 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 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.


A new entity takes its place,
Application installs, a digital space.
With statuses to track,
And events on the right track,
In Bitrix's realm, a structured embrace.

Footnotes

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces the ApplicationInstallation entity and its repository, along with necessary interfaces and events. The code appears well-structured, but there are a few areas that could be improved for clarity and robustness. Specifically, I have a question about the readonly properties in the entity, and suggest some minor improvements to the repository.

Merge Readiness

The code is generally well-structured and implements the required functionality. However, I recommend addressing the questions and suggestions raised in the review comments before merging. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2-03-2025

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

06-07-2025

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13-07-2025

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarlsonComplete подправсь 1 замечание и можно вливать

3-09-2025

Copy link
Collaborator

@camaxtly camaxtly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

06-08-2025

@camaxtly camaxtly merged commit 75c5ed4 into mesilov:add-application-install Aug 6, 2025
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants