Repository navigation
Conversation
…tation This commit enhances the agenda.repository.js file by adding JSDoc comments to various functions, providing clear descriptions of parameters and return values. This improves code readability and maintainability, facilitating better understanding for future developers working on the repository.
This commit refactors the telegramDisplayName function in users.repository.js by removing redundant checks for user display names. The function now directly constructs the display name from first and last names, improving clarity and efficiency in user data handling.
This commit enhances the agenda.service.js file by adding JSDoc comments to the createAgendaPayment, getAllAgendaPayments, getAgendaPaymentsByUser, getAgendaPayment, updateAgenda, and deleteAgenda functions. The comments provide clear descriptions of parameters and return values, improving code readability and maintainability for future developers.
…am user management This commit introduces functionality to track Telegram user registrations and their memberships within the bot. It adds a new `trackTelegramUserAndMembership` function and a helper function `registrationKey` to generate unique keys for registration messages. Additionally, JSDoc comments are added to enhance code documentation, improving clarity and maintainability for future developers.
… imports This commit refactors the AgendaPayment class by replacing the getAgendaMemberDisplayName function with getMemberName for improved clarity. Additionally, it consolidates and organizes import statements for better maintainability, enhancing the overall structure of the agenda_payment.js file.
This commit refactors the paid.js file by removing duplicate import statements and consolidating them into a single section. This enhances code clarity and maintainability by ensuring a cleaner structure for the import declarations.
This commit refactors the someone_paid.js file by replacing the getAgendaMemberDisplayName function with getMemberName for improved clarity. It also consolidates import statements, enhancing code organization and maintainability.
…etMemberName and add JSDoc comments This commit refactors the agenda_formatter.js file by replacing the getAgendaMemberDisplayName function with getMemberName for improved clarity. It also adds JSDoc comments to the memberPaid function, enhancing code documentation and maintainability.
…names with fallback options This commit introduces the getMemberName function, which consolidates various methods of retrieving a member's name from different properties. It includes a cleanText utility function to sanitize input values and ensures that the function returns the most appropriate name or identifier. JSDoc comments are added for improved documentation and maintainability.
…terTelegramUserAndMembership function This commit enhances the registerTelegramUserAndMembership.js file by adding JSDoc comments to the registerTelegramUserAndMembership function. The comments provide clear descriptions of the function's parameters and return values, improving code readability and maintainability for future developers.
…ment class This commit adds a missing line to generate the payment summary message in the AgendaPayment class. The change ensures that the summary is properly formatted and sent to the user, enhancing the functionality of the payment process.
…ployment instructions This commit revises the README.md file to clarify the descriptions of environment variables, including `POSTGRES_PASSWORD`, `BACKEND_URL`, `ALLOWED_USERS`, and `ADMIN_USERS`. It also updates the deployment instructions to specify Node.js version requirements and improve clarity on the use of Docker and PostgreSQL. Additionally, a new bot command `/ia` is introduced, and the schema application process is detailed for better understanding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily improves documentation, code readability, and maintainability across the project. The most significant changes include clarifying and expanding the
README.mdfor environment variables and deployment, adding JSDoc comments for better code understanding in backend repositories and services, and refactoring imports and utility usage in the Telegram bot source code.Documentation improvements:
README.md, added security notes, and explained Compose/deployment nuances. Also documented new and legacy bot commands, clarified schema application, and improved local and production setup instructions. [1] [2] [3] [4] [5]Backend code maintainability:
backend/src/repositories/agenda.repository.jsandbackend/src/services/agenda.service.jsfor improved developer understanding and editor support. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]telegramDisplayNameinusers.repository.jsto avoid concatenating undefined values and ensure a fallback to first name.Telegram bot code refactoring:
agenda_payment.js,paid.js, andsomeone_paid.jsto use ES module syntax and improved utility usage (e.g., replacedgetAgendaMemberDisplayNamewithgetMemberName). [1] [2] [3] [4] [5]agenda_payment.jsandsomeone_paid.js. [1] [2]Code organization:
registrationKeyfunction inserver.jsfor better documentation.These changes collectively make the codebase easier to understand, maintain, and deploy.