-
-
Notifications
You must be signed in to change notification settings - Fork 692
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
Refactor Tests: Migrate src/screens/UserPortal/Volunteer/Actions from Jest to Vitest #2612
Refactor Tests: Migrate src/screens/UserPortal/Volunteer/Actions from Jest to Vitest #2612
Conversation
Updated CONTRIBUTING.md with new branching strategy
Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4. - [Release notes](https://github.com/mafintosh/dns-packet/releases) - [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md) - [Commits](mafintosh/dns-packet@v1.3.1...v1.3.4) Signed-off-by: dependabot[bot] <[email protected]>
…dependabot/npm_and_yarn/dns-packet-1.3.4 Bump dns-packet from 1.3.1 to 1.3.4
* Update authorized-changes-detection.yml * Code Coverage @ 87.1% * Update .gitignore * Delete codecov This executable should not be in the repo * added translation hint text in placeholders (#487) * Update pull-requests.yml * Create DOCUMENTATION.md * Rename issue-guidelines.md to ISSUE_GUIDELINES.md * Update CONTRIBUTING.md * Update issue.yml * Rename PR-guidelines.md to PR_GUIDELINES.md * Update CONTRIBUTING.md * Update pull-request-target.yml * Delete PULL_REQUEST_TEMPLATE.md * Delete ISSUE_TEMPLATE.md * Rename Code_Style.md to CODE_STYLE.md * added removeMember mutation (#491) * added removeMember mutation * changed mutation name * remove contributions from router (#502) * Fixed Settings page Header (#501) * fixed cani-use lite warning * fixed the alignments for smaller screens and also added spacing on places where it was needed * fixed the linting errors * ran prettier to remove styling errors * made the orgSetting title dynamic * linted the code and made the settings header as required and also made the settings page navbar responsive * linted code and made necessary changes * errors fixed * Added dropdown for Applanguage in UserUpdation form (#498) * Added dropdown for Applanguage in UserUpdation form * App language code changed to Default language * Change the Scalar Types [Provides relevant client side changes for #1085 in Talawa-API] (#500) * Change typedefs * Fix date parsing * Move ID to ObjectID scalar * Client changes for Adding GraphQL Scalars (#511) * Change typedefs * Fix date parsing * Move ID to ObjectID scalar * Revert ObjectID to ID * Change ObjectID to ID * modal closed after organization creation (#516) * most recently added Org displays at the top (#515) * Add Husky (#520) * updated contributing (#521) * Display and choose Organisation image (#512) * upload image working for createOrganisation * Organisation image showing everywhere * Testcase failure fixed * Linting fixed * convertToBase64 func made and tests for it * CI/CD error fixed * tests added for AdminNavbar & OrganisationDashboard * Linting fixed * fixed translation on the plugin tab (#510) * added OrgName to the Navbar (#525) * Fix create event mutation [Fixes part of #1101 in Talawa-API] (#523) * Add format fix * Fix updation of posts * Test coverage improved for organizationPeople.tsx (#526) * Update INSTALLATION.md * Update INSTALLATION.md * Update INSTALLATION.md * Update stale.yml * Remove tags (#532) * Fixed navbar added tests (#534) * Fixed navbar added tests * Fixed the translation of All orgnaizations btn in AdminNavbar * Fix the updateOrg page, and made it to create mutation request [Fixes #531] (#536) * fix orgUpdate system * fix translations * Update CONTRIBUTING.md * Code Coverage @ 88% * Fixes #478 : Implemeneted calendar to the Event tab (#537) * calendar-implemented * calendar-implemented * fixed tests * Added post-merge hook using husky (#541) * Added post-merge hook using husky * made required changes to installation.md * make changes to documentation for husky * made the required changes in installation guide * Update pull-requests.yml * Fixed yarn installation instructions (#584) * organization sorting for all organization (#619) * removed redundant notification (#577) * Profile Page for Members (#543) * Initial member page made * Changed query added Org and Events section * Homescreen ready * initial translation added for Profile * initial translation added for Profile * Added translations * Added translations * Revised translation * Fixed failing tests for components * Link added to OrgAdminListCard * Linting fixed for OrgPeopleListCard * Added tests, removed logs * Uniform design * Fix:routing issue for orgdash page (#580) * Fix:routing issue for orgdash page * fix:failing test of SuperDashListCard * Rectify Warnings: EventListCard.test.tsx (#595) * Added logic to close modal after successful submission (#623) * Feature Request: Position of the search bar. (#631) * Feature Request: Position of the search bar #614 resolved * Feature Request: Position of the search bar #614 resolved * fixes: #550 added test for the calendar (#552) * added test for the calendar * updates mocks * Update Router Function [Fixes #636] (#638) * Update Router Function * Empty commit * Fix about content overflow (#632) Signed-off-by: Ekene Nwobodo <[email protected]> * removed duplicate rows per page section in orgposts (#648) * fixed :made card in organization dashboard interactive (#620) * Implemented manage functionality for admin and super admin after login (#539) * Implememnted manage functinality for admin/superadmin after login * Update AdminDashListCard.module.css * Some formatting issues with module file * resolved workflow issues * Added folding feature to posts (#581) * added folding feature to posts * added fold feature to posts * brought code under code coverage * added tests * added tests for remainging uncovered lines * brought code coverage to 100% for the changes * Code coverage @87.2% * Fix User Update Details Page and Add Update Password Page [Fixes #530] (#657) * fixed updateuser logic * update translations * fix lint * lint fix 2 * fix tests * fixed:move orgLocation & remove duplicate orgName (#655) * fixed:move orgLocation & remove duplicate orgName * Dummy commit * fixes - [#597] - Navbar navlinks hover and button styles (#603) * fixed: #585 - Password error showing. Tested * fix: #590 - fixed navbar hover issues * fix: #590 - fixed navbar hover issues * Code Coverage 87.4% * fixes 599 (#653) * fixed errors and removed window.replace * written test case for ensure window.location.replace * written test case for ensure window.location.replace * added useHistory to keep track of routing behind the scenes * fixed merge conflicts and errors * updated comments for file changes * Added warning comments for routing --------- Co-authored-by: Adepeju <adepeju.kayode@gmail> * fix org search location (#682) Signed-off-by: Ekene Nwobodo <[email protected]> * fixed the issue of validate the input before submit #674 (#678) * Adds required tests for OrganizationEvents.tsx and Fixes a minor bug in Calendar (#527) * adds tests for organization events * removes the unrequired branch from OrganizationEvents.tsx * fixes failing tests * fixes failing lint tests * Update password preview feature with coverage tests (#629) * Fix to the issue #585 (#607) * [fix]- fixed the password error warning * [fix]- fixed the password error warning * [fix]- fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [feat]-added test cases for password error warning * [feat]- added test cases for password error warning * [feat]- added test cases for password error warning * [fix]- fixed the linting * Improve test coverage for calendar.tsx (#679) * Improve test coverage for calendar.tsx * Restore previous tests * remove --coverage * i rebased my codebase and resolved the initial issue (#669) * fixed the issue use of toast in place of window.alert #645 (#687) * Update ISSUE_GUIDELINES.md * fixed the static time data under Organization card in the Organization List tab (#689) * fixed the static time in org card * formatted the date to MM D, YYYY --------- Co-authored-by: thesaaddevloper <[email protected]> * Fixed the pagination alignment issue (#702) * [fix]- fixed the password error warning * [fix]- fixed the password error warning * [fix]- fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [fix]-fixed the password error warning * [feat]-added test cases for password error warning * [feat]- added test cases for password error warning * [feat]- added test cases for password error warning * [fix]- fixed the linting * [fix]- fixed the pagination alignment issue * [fix]- fixed the pagination alignment issue * [fix]- fixed the pagination alignment issue * Removed overlapping (#675) * changes input element to textarea and changes in test (#710) * Code Coverage @90.7% * Indicating active tabs (#691) * added underline to active links in navbar * fixed lint error * fixed the org default image #688 and removed stock image (#695) * fixed the org default image #688 and removed stock image * removed eslint warning * added new img as default org img * Update INSTALLATION.md * Added Clear Error and Warn Messages when API is unavailable (#670) * Added error and warn messages * Added tests & fixed inconsistency in mocks * Lint fix LoginPage * Lint Fix LoginPage.test * minor fix * Minor update to LoginPage * Minor change to LoginPage.test * Replaced toast.warn() with toast.error() * Fixed test accordingly * Lint Fix * Minor fix * Extra edge case handled * code coverage fix * Lint fix * Update LoginPage * Update LoginPage.test * Lint fix * improve test coverage for orgpost.tsx (#718) * Improve test coverage for calendar.tsx * Restore previous tests * remove --coverage * improve test for orgpost.tsx * Implemented Proper Error Handling for all Screens [Fixes: #535] (#731) * Handled error cases for all screens * Some more fixes * Some more fixes * Added StaticMockLink to use Mocks multiple times [Fixes Multiple Issues] (#745) * add StaticMockLink * lint fix * remove showWarning * Added prompt to Register on Login Page (#628) * Add prompt to Login page - Add prompt in other languages: fr, sp, hi, zh. - switch styling of Login Button with Reg Button * format with prettier * fixed event checkboxes to update (#707) * Block/Unblock functionality for only members of the organization (#690) * Implememnted manage functinality for admin/superadmin after login * Update AdminDashListCard.module.css * Some formatting issues with module file * resolved workflow issues * Updated block/unblock page preventing users who are not members of organiztion * Update BlockUser.test.tsx to resolve failing tests Modified the mocks fields according to the corresponding changes in BlockUser.tsx file. * created a reusable postNotFound Component with responsive UI (#717) * created a reusable postNotFound Component with responsive UI * run test error solved * added translation to the component and also created the test.tsx for the error component * fixed the failing test and added the postNotFound reusable component for OrgList --------- Co-authored-by: thesaaddevloper <[email protected]> * fix: #601 modal responsive width (#621) * added dynamic title to OrgPeople section (#704) * added dynamic title to OrgPeople section * fixed code coverage * fixed code coverage * uncommented the mistakenly added code * Delete er * Updated session timeout notification toast with already existing one (#734) * Added a toast to notify users that session has expired and redirects to the login page * Updated toast notification on session timeout with already existing one * eliminated the use of magic numbers * minor error correction on the timeout minutes --------- Co-authored-by: TheoCathy <[email protected]> * Fixed the empty space in the OrgList (#751) * created a reusable postNotFound Component with responsive UI * run test error solved * added translation to the component and also created the test.tsx for the error component * fixed the failing test and added the postNotFound reusable component for OrgList * fixed the empty space in orgList * fixed the failing test * removed the unwanted files --------- Co-authored-by: thesaaddevloper <[email protected]> * align navbar items (#755) * align navbar items * replace More with a hamburger icon * replace More with a hamburger icon to fix workflow error * replace More with a hamburger icon to fix workflow error * Fixes: toggle password for registration (#758) * added toggle-password * updated * formatting * added icon for toggle password * Super Admin Dashboard Error When Organizations Absent (#754) * No Organization Warning on OrgList * Minor Fix * Fixed failing tests * Added Warning on Roles and Request Pages * Added Tests for OrgList * Testing Fixes * Added more tests * Added Tests for Roles and Request Pages * Code Coverage @ 91.0% * Add link to dashboard admin card (#760) * image upload made functional (#677) * image upload made functional * lint * fixed failing test * linting * re run test , remove yarn.lock changes * updateUser test cov * OrgPost * rerun tests * Empty commit * reverted last 2 commits changes * re run code cov * update userUpdate * rerun code cov again * revert last commit * Update PR_GUIDELINES.md * Implemented Search bar and the radio buttons in orgPost page that searches both title and text of post (#770) * created a reusable postNotFound Component with responsive UI * run test error solved * added translation to the component and also created the test.tsx for the error component * fixed the failing test and added the postNotFound reusable component for OrgList * fixed the empty space in orgList * fixed the failing test * removed the unwanted files * the one search bar which searches both text and title of post * testing file * orpost file testing * code coverage is increased * fixed the failing test --------- Co-authored-by: thesaaddevloper <[email protected]> Co-authored-by: saadabban76 <�[email protected]> * center org image on mobile (#778) Signed-off-by: Ekene Nwobodo <[email protected]> * removed link for plugin dropdown toggle (#781) * removed link for plugin dropdown toggle * added id * align superadmin nav items and fix failed tests (#766) * changed the handleSearchByName function in searchByName in Roles page (#735) * changed the handleSearchByName function to search using target's value instead of searchByName variable * updated the file Roles.tsx to take care of useState lag * changed tests for suiting searchByName * changed tests for searchByName including backspaces * added tests for paginationList and changing rowsPerPage * added tests to increase coverage in Roles.tsx * changed the package.json file's test command * removed extra scrollbars (#800) * Recently added Post displays at top (#773) * Recently added Post displays at top * reversed the posts as required in the query * Increased the OrgList Code Coverage (#786) * increased the orgList coverage to 95$ * increased the orgList Code Coverage * increased the orgList Code Coverage * increased the orgList Code Coverage * fixed image rendering in orgPost page * increased the code coverage for orgList Component * increased code coverage to 97% in orgList Component --------- Co-authored-by: saadabban76 <�[email protected]> * Modify event visibility for non-admins (#796) * Modify event visibility for non-admins Signed-off-by: Ekene Nwobodo <[email protected]> * Add test suites for events visibilty --------- Signed-off-by: Ekene Nwobodo <[email protected]> * Bug Fix: Drawer menu visibility (#794) * Remove filter by event field (#807) * increased the orgList coverage to 95$ * increased the orgList Code Coverage * increased the orgList Code Coverage * increased the orgList Code Coverage * fixed image rendering in orgPost page * increased the code coverage for orgList Component * increased code coverage to 97% in orgList Component * removed the filter by event section in orgPeople's component * fixed the failing test --------- Co-authored-by: saadabban76 <�[email protected]> * Add image to post (#804) * increased the orgList coverage to 95$ * increased the orgList Code Coverage * increased the orgList Code Coverage * increased the orgList Code Coverage * fixed image rendering in orgPost page * increased the code coverage for orgList Component * increased code coverage to 97% in orgList Component * added Image to the post's card * replaced external links with codebase default image * replaced external links with codebase default image * replaced blank image with the default image * fixed the failing test --------- Co-authored-by: saadabban76 <�[email protected]> * Update pull-request-target.yml * Update pull-request-target.yml * Update pull-request-target.yml * Update pull-request-target.yml * Update pull-request-target.yml * Update pull-request-target.yml * Upgrade Yarn to NPM in Talawa Admin Project (#802) * npm upgrade * remove package lock * Update push.yml * empty * upgrade yarn to npm * fix docs * fix scripts * empty * stop watch mode * fix ymls * empty * fix scripts * empty commit * update scripts * Redirect to dashboard on organization update (#816) * Redirect to dashboard on organization update * Minor Change * Proper Testing Of Pagination In All List Views (#797) * install faker package used for mocks in tests * Test init for pagination * install dependencies needed to implement certain tests * add a data-testid attribute to their markup for use in tests * add data-testid attributes to its markup being referenced from tests * add test to ensure the number of organization displayed on the page corresponds to the option selected from rowsPerPage * add prop to allow rendering of component in test environment * add data-testid attributes to their markup being referenced from tests * add data-testid attributes to its markup being referenced from tests * add test to affirm that the number of persons displayed on the webpage is same with the selected option from rowsPerPage * install dependencies for certain tests * fix lint errors * tests fix * remove unnecessary dependencies * lint fix * tests fix update * restore file to previous state * empty commit * tests fix update * lint fix * Conditional Usage of Google reCAPTCHA [Fixes #798] (#820) * conditonal recaptcha * Update INSTALLATION.md * add tests * fixed the issue of Mismatched passwords validation #722 (#824) * fixed the issue of Mismatched passwords validation #722 * fixed lint code error * Code Coverage @ 92% * Replace Talawa Portal with Talawa Admin Portal #817 (#821) * Update website title to Talawa Admin Portal in en * Update website title in fr json file * Update website title in sp json file * Update website title in zh json file * Update website title in hi json file * Update the test in ListNavbar file * Update the test in LoginPage.test file * Create a function for the tex macher to make test * Fix lint errors in the LandingPage test file * Remove console.log in LandingPage test file * Upgrade to use npm instead of yarn * Delete yarn.lock file * Fix lint errors * Fix lint errors * Update the heading in hi.json file * Remove unused codes * Fix lint error in LanfingPage file * Correct the talawa_portal value in Fr json file * Correct the talawa_portal value in sp json file * Remove anused package in package.json file * Organization Form Redirect Issue Prevents User Navigation, Affecting User Experience. Issue #808 (#815) * addressing issue #808 * finished - requested changes * addressing warning * Added: event preview modal to view event details (#772) * added event preview model * added event preview model * fixed formatting * added test * added test * added test * failing tests * test * tests * Update workflow (#832) * Workflow fix (#833) * Update pull-requests.yml * Update pull-requests.yml * Update pull-requests.yml * Code Coverage @ 91.0% * Feature: Separation of ADMIN and SUPERADMIN functionalities (#826) * Initial changes * Commit to sync repo * Made changes to OrgList * Some fixes * Minor fix * Added tests for OrgList * Added tests for OrgList * Coverage fix * Required changes added * Made changes to OrgList * Some fix * Some fixes * fixes test for OrgList * Some more fixes * Empty commit * Lint fix * Fixed test * Lint fix * Added Whitespace Validation to Organization and Post create forms (#838) * Added whitespace check in Org Create form * Added Tests * Added Empty String check to OrgPost Form * Added Tests for OrgPost * fixed the issue of Toast msg is not available in all languages #740 (#845) * fixed the issue of Toast msg is not available in all languages #740 * format issue * Empty-Commit * Fixed Org Update (#843) * Prevent Admins and Super Admins from downgrading their own roles (#840) * Code Cleanup * Disabled Super Admins from changing their roles * Added Tests * Added more tests * Improved Code Quality * Revert "Fixed Org Update (#843)" (#847) This reverts commit 53c3fef28ef986d63b1eec45663acb7d07cf1b8d. * Fixed Organization Update and Translation (#849) * Fixed Organization Update * Minor Changes * Success message updated * Fail tests on warning [Priority Needed] (#856) * fix warnings Signed-off-by: Ansh Goyal <[email protected]> * fix warnings Signed-off-by: Ansh Goyal <[email protected]> * fix warnings Signed-off-by: Ansh Goyal <[email protected]> * fix warnings Signed-off-by: Ansh Goyal <[email protected]> * fix warnings Signed-off-by: Ansh Goyal <[email protected]> * restore addonregister Signed-off-by: Ansh Goyal <[email protected]> --------- Signed-off-by: Ansh Goyal <[email protected]> * Code duplicacy removed (#852) * Code duplicacy removed * Tests added * Added comments * Fixed failing tests * Code formatted * Unused packages removed, flag icons package updated to latest version (#860) * Unused packages removed, flag icons updated to latest version * Empty commit * Changes in package-lock.json * Fixes #848: limiting mulitple toast (#851) * limiting-toast * added test * Organization People Filters Improved (#855) * Added Filters to Users and Organizations Query * Added Last Name Filter on User, Member and Admin * Added Translation * Fixed Failing Tests * Added Tests for Filters * Fixed Failing Tests * Code Cleanup * Fixed Tests * Added Translation * remove graphql-boost dep (#866) Signed-off-by: Ansh Goyal <[email protected]> * added UserNotFound component to the Roles page and improved the search (#865) * changed the handleSearchByName function to search using target's value instead of searchByName variable * updated the file Roles.tsx to take care of useState lag * changed tests for suiting searchByName * changed tests for searchByName including backspaces * added tests for paginationList and changing rowsPerPage * added tests to increase coverage in Roles.tsx * changed the package.json file's test command * changed PostNotFound component to be used as a reusable one and added it in Roles section and set languages option in locales folder * changed formatting in locales changed files * removed comments in Roles.tsx * Empty commit * renamed the PostNotFound component and modifiied relevant files * changed Roles.tsx filtering * empty commit * reverted changes in package.json * Improved signupform validations (#828) * Improved signupform validations * updated signup form validation to show all messages at once * improved test coverage for LoginPage * Fixed failing test --------- Co-authored-by: Joyce Malicha <[email protected]> * added tests for Search Bar in the Organization List Page of SUPERADMIN #827 (#867) * added tests for Search Bar in the Organization List Page of SUPERADMIN #827 * added tests for Search Bar in the Organization List Page of SUPERADMIN #827 * Added Tests Previews (#868) * Installed jest-preview * Automatic Setup * Fiixed Failing Test Command * Added Basic CSS * Added PostCSS Module * Fixed MUI Styling * Minor Changes * Added cross-env to support windows * Adaptar for React 17 and CSS Modules Mock * Added Mocked Styles to Tests * Documentatin Updated * Fixed Failing Tests * Minorr change in documentation * Jest is now Dev Dependency * Workflow Test * Jest Module Path Updates * Module Path Tese 2 * Github Workflow Fixed * Removed Legacy Test Command * Added Documentation to Debug Tests * Fixed Documentation * Docs Image Added To Repo * Images Reorganization * Organized Images * Revert "Improved signupform validations (#828)" (#875) This reverts commit 5820dd9ec05256551b48470c8880fcdc05452fda. * Restored SearchBar Test for OrgList Page (#878) * Restored searchBar test * Lint fix * Coverage fix * Lint fix * Some fixes * Some fixes * fixed the issue of Users filter to fetch corresponding Users to Organisation #701 (#853) * fixed the issue of Users filter to fetch corresponding Users to Organisation #701 * removedd uunused variable * fixed failing text * fixed merged issue * fixed lint error * swap variable * Revert "Restored SearchBar Test for OrgList Page (#878)" (#879) This reverts commit 3d39c524d54e81853490d2d8a1f844ce67252365. * Fixed crashing on error in Block/Unblock page (#862) * Website crash fixed * lint fixed * Added tests for empty response from server * More tests added * Rerun tests empty commit * Redirect on error functioning * Fixed failing tests * Testcase and Title added when users not found * Linting fixed * Typo fixed * Fixed failing tests * Linting fixed * Added NotFound component in OrgPeople and changed Roles.tsx (#882) * changed the handleSearchByName function to search using target's value instead of searchByName variable * updated the file Roles.tsx to take care of useState lag * changed tests for suiting searchByName * changed tests for searchByName including backspaces * added tests for paginationList and changing rowsPerPage * added tests to increase coverage in Roles.tsx * changed the package.json file's test command * changed PostNotFound component to be used as a reusable one and added it in Roles section and set languages option in locales folder * changed formatting in locales changed files * removed comments in Roles.tsx * Empty commit * renamed the PostNotFound component and modifiied relevant files * changed Roles.tsx filtering * empty commit * reverted changes in package.json * added NotFound component in OrgPeople, made changes in the locales files and made some changes to Roles too * added NotFound component to OrgPeople, changerd locales files and changed Roles.tsx * minor change * Restored Search-Bar Test for OrgList Page (#880) * Restored searchBar test * Lint fix * Coverage fix * Lint fix * Some fixes * Some fixes * Fixed Org Dashboard Error (#873) * Fixed TypeError * Minor Change * Fixed Tests * Added back logo512 * Fixed auth header getting copied on login (#890) * fix user update (#876) * fix user detials update * remove userType from update-user page * fix failed test for userUpdate.test.tsx * Removed and Replaced Ant Design from the project (#891) * Fixed auth header getting copied on login * Removed/Replaced Ant Design from the project * Fixed failing tests * Removed comment * Add today functionality in calendar (#897) * Update countline.py * Update pull-requests.yml * Updated countlines.py to cover .spec. files (#900) Co-authored-by: Peter Harrison <[email protected]> * fixed the Inability to set user roles for specific organizations #556 (#898) * fixed the Inability to set user roles for specific organizations #556 * added all language translation * Revert "fixed the Inability to set user roles for specific organizations #556 (#898)" (#901) This reverts commit 891d898eb5543116bb9042a6386b5a12e474159c. * Documentation updated, Redundant css files removed (#896) * Doc updated unused files removed * Removed unused css files from setup tests * Added small calendar in the events #887 (#903) * added small clanedar * added small clanedar * fixed Code Coverage: Create tests for OrgSettings.tsx #396 (#905) * remove redundancy from orgPostCard (#906) * Revert "remove redundancy from orgPostCard (#906)" (#910) This reverts commit d5ce4aa27ee241b0687f7db3d6acd1b62339562f. * Block/Unblock Page Improvements (#885) * Added Radio Buttons * Optimized Queries * Optimized Query and Added Last Name Filter * Radio Button Working * Added Translations * Fixed Filter Name * Fixed Debounce * Fixed Asynchronous Debounce * Added Tests * Better Error and Loading State Handline * Fixed Loader * Fixed Loader * Modulrised Mock Data * Minor Change * Fixed Tests * Increase Coverage * User query replaced with OrgMemberConnection * Fixed Tests * Code Coverage Increase * Code Cov * Fixed Translations * Fixed Failing Tests * fix in failing test (#913) * Improve and Standardize Automated Linting Tests (#916) * added linting rules * added linting rules * added linting rules * Rename `data` variables to more readable name [Fixes #829] (#835) * Refactor screens * Update components * Fix test * Fix typecheck errors * Increase test coverage * Merge latest adminUI-Redesign into Develop (#927) * Updated CODE_STYLE.md * Updated CODE_STYLE.md (#917) * Updated CODE_STYLE.md * Import section update * Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925) * Updated CODE_STYLE.md * Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed * Buttons replaced from normal ones to Bootstrap ones * Import section update * Error fixed for Buttons * Language dropdowns and Change language * InputBoxes & Checkboxes fixed and imported from BS * Removed unused package popper.js * Replaced react-modal with Bootstrap one in Login Page * Modals converted to React Bootstrap one * Completely replaced react-modal with react-bootstrap/Modal from the project * Removed react-modal from the project * Removed classbased modal and unused images * Notification navbar migrated * Modal migration * Modal migration * Modal migration done for OrgPostCard * Empty commit to make workflow run * Empty commit to make workflow run * Empty commit to run the workflow --------- Co-authored-by: Anwer Sayeed <[email protected]> * Introduces API versioning check in CI/CD (#924) * a random change * husky precommit * one more try * one more try * one more try * one more try * one more try * one more try * second try * removed unwanted deps * removed unwanted deps * resolved the error * updated variable name * rerun test * rerun test * added test to pull.yml * removed push check * resolved conflict * Update stale.yml * Update CONTRIBUTING.md * Merge talawa-user-portal into develop (#935) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Merge latest Admin UI Redesign into Develop (#934) * Updated CODE_STYLE.md * Updated CODE_STYLE.md (#917) * Updated CODE_STYLE.md * Import section update * Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925) * Updated CODE_STYLE.md * Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed * Buttons replaced from normal ones to Bootstrap ones * Import section update * Error fixed for Buttons * Language dropdowns and Change language * InputBoxes & Checkboxes fixed and imported from BS * Removed unused package popper.js * Replaced react-modal with Bootstrap one in Login Page * Modals converted to React Bootstrap one * Completely replaced react-modal with react-bootstrap/Modal from the project * Removed react-modal from the project * Removed classbased modal and unused images * Notification navbar migrated * Modal migration * Modal migration * Modal migration done for OrgPostCard * Empty commit to make workflow run * Empty commit to make workflow run * Empty commit to run the workflow * Sass filed added with documentation * Linting fixed * Fixed the folder structure and naming convention * Customised Bootstrap (#929) * Sass filed added with documentation * Linting fixed * Fixed the folder structure and naming convention * Assets typo fixed * Typo fix * Merge conflict error fixed --------- Co-authored-by: Anwer Sayeed <[email protected]> * test PR for API versioning check (#932) * testPR * test2 * testing the change * testing it again * test--no-verify * test--no-verify * echo token * test-again * test-again * test * test * read-only * clone * clone * redesigned newsfeed (#939) * Revert "redesigned newsfeed (#939)" (#943) This reverts commit a645eca7cf2ce1335374f48b52335a293e344580. * Make Talawa-Admin mutations in sync with the backend (#946) * Initial change * Redundant Notification removed * Fixed linting and other issues * Tests fixed * Add Home Screen And People Screen along with other components (#940) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Add Home Screen along with other components * Fix failing tests * Add required tests and Offcanvas navbar * Remove unused variables from tests * Sync the Mutations with talawa-api * Merge AdminUI-Redesign into Develop (#947) * Updated CODE_STYLE.md * Updated CODE_STYLE.md (#917) * Updated CODE_STYLE.md * Import section update * Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925) * Updated CODE_STYLE.md * Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed * Buttons replaced from normal ones to Bootstrap ones * Import section update * Error fixed for Buttons * Language dropdowns and Change language * InputBoxes & Checkboxes fixed and imported from BS * Removed unused package popper.js * Replaced react-modal with Bootstrap one in Login Page * Modals converted to React Bootstrap one * Completely replaced react-modal with react-bootstrap/Modal from the project * Removed react-modal from the project * Removed classbased modal and unused images * Notification navbar migrated * Modal migration * Modal migration * Modal migration done for OrgPostCard * Empty commit to make workflow run * Empty commit to make workflow run * Empty commit to run the workflow * Sass filed added with documentation * Linting fixed * Fixed the folder structure and naming convention * Customised Bootstrap (#929) * Sass filed added with documentation * Linting fixed * Fixed the folder structure and naming convention * Assets typo fixed * Typo fix * Initial login page work * Merge conflict error fixed * Theming modified and Added Loader over every screen * Fixed UI issue for navbar and login * Fixed production bug * Removed unused variable * Tests fixed * Added Change Language Btn dropdown * Merge conflict fixed, merge latest develop into adminUI-redesign (#938) * Merge latest adminUI-Redesign into Develop (#927) * Updated CODE_STYLE.md * Updated CODE_STYLE.md (#917) * Updated CODE_STYLE.md * Import section update * Upgrade and Migrate from Bootstrap 4 to Bootstrap 5 (#925) * Updated CODE_STYLE.md * Latest Boostrap v5.3.0 & react-bootstrap v2.7.4 installed * Buttons replaced from normal ones to Bootstrap ones * Import section update * Error fixed for Buttons * Language dropdowns and Change language * InputBoxes & Checkboxes fixed and imported from BS * Removed unused package popper.js * Replaced react-modal with Bootstrap one in Login Page * Modals converted to React Bootstrap one * Completely replaced react-modal with react-bootstrap/Modal from the project * Removed react-modal from the project * Removed classbased modal and unused images * Notification navbar migrated * Modal migration * Modal migration * Modal migration done for OrgPostCard * Empty commit to make workflow run * Empty commit to make workflow run * Empty commit to run the workflow --------- Co-authored-by: Anwer Sayeed <[email protected]> * Introduces API versioning check in CI/CD (#924) * a random change * husky precommit * one more try * one more try * one more try * one more try * one more try * one more try * second try * removed unwanted deps * removed unwanted deps * resolved the error * updated variable name * rerun test * rerun test * added test to pull.yml * removed push check * resolved conflict * Sass filed added with documentation * Linting fixed * Fixed the folder structure and naming convention * Update stale.yml * Typo fix * Update CONTRIBUTING.md * Merge talawa-user-portal into develop (#935) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Merge conflict error fixed --------- Co-authored-by: Anwer Sayeed <[email protected]> Co-authored-by: Kanishka Bansode <[email protected]> Co-authored-by: Peter Harrison <[email protected]> Co-authored-by: Noble Mittal <[email protected]> * Random checkout * Design ready for homescreen * Login page 100% code c=coverage * Login page icon adjustment * Added translations * Fixed the failing tests * Revert to older version of loader * Animation added fixed warnings * Fixed accessability * Mutations and Tests foxed * Fixed coloring in UserPortal * Tests fixed and ChangeLanguageDropdown used in UserLoginPage * Linting Fixed --------- Co-authored-by: Anwer Sayeed <[email protected]> Co-authored-by: Kanishka Bansode <[email protected]> Co-authored-by: Peter Harrison <[email protected]> Co-authored-by: Noble Mittal <[email protected]> * Merge latest adminUI-Redesign (#950) * Initial Organizations screen done * Removed yellow scrollbar * Linting fixed * Replaced images with svgs for logos * Styling done for btnsContainer * Better typechecking and readability * Animated Drawer working * Responsive page ready * OrgCard responsive * Fixed navbar issue and added webkit keyframes * LeftDrawer ready * Translations added * Added shimmer loading effect * Styling issue fixed * Failing tests fixed for OrgList * Removed unused vars * Tests done for LeftDrawer * Succesfully made component without causing any breaking change * 100% Code coverage achieved for Requests Screen * Fix alignment * Roles screen UI done * Role screen fixed with 100% test coverage * Changing screen activeness fixed * Unused vars and Typos fixed * Language support added * Linting and typos fixed * Fixed failing tests for LeftDrawer * Completed tests of AdminDashListCard with 100% code coverage * OrgListCard done * Finalised tests * Requests user search made functional again ! * Fixed loading on refetch and UX on all screens * OrgList failing errors fixed * Fixed all failing tests * Achieved 100% code coverage for OrgList.tsx * Wrote tests and mod LeftDrawer for admins * Minor ui issue fixed * Fixed failing test * UI bug dropdown * Frontend insync with Backend attempt 1 * Introspection fail fix 1 * Introspection error fix 3 * Introspection error fix another attempt * Another attempt * [Talawa-user-portal] Add Settings and Donate Screen, along with other UI fixes (#953) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Add Home Screen along with other components * Fix failing tests * Add required tests and Offcanvas navbar * Remove unused variables from tests * Sync the Mutations with talawa-api * Add Settings and Donate Screen * Add multilingual support for the screens * Add Event Project and Volunteer Management (#961) * Add screens for adding and updating event projects * Add delete operation for event projects and debug update * Remove yarn.lock * Begin testing * Add display of tasks and functionality to add tasks * Add modal for edit task * Add UpdateTaskModal * Add Delete Task Modal and volunteers display * Add test for DeleteEventProjectModal.tsx * Add tests for add and update event project modal * Add screen for managing volunteers * Add option to assign and remove volunteers * Add tests for AddTaskModal.tsx * Add tests for TaskListItem.tsx and DeleteTaskModal.tsx * Complete testing for all Task Modals * Add completed display to tasks * Add tests for event dashboard * Restructure files * Add attendee management modal * Add testing for EventAttendeeModal * Move to 100% testing and wrapper for attendees modal * Add basic checkIn functionality for users * Add testing for CheckIn modals * Introduce the tag generation into the repository * Update linting rule and fix errors * Remove alloted seat and alloted room * Fix testing * Correct some tests * Migrate from attendees to registrants * Migrate Event Project modals to new design * Migrate registrants modals and checkin modals to new design with 100% test coverage * Move task modals to new styles * Move to 100% test coverage * Admin workflow completed with updated package.json (#960) * Merge latest AdminUI Redesign into develop (#956) * Initial Organizations screen done * Removed yellow scrollbar * Linting fixed * Replaced images with svgs for logos * Styling done for btnsContainer * Better typechecking and readability * Animated Drawer working * Responsive page ready * OrgCard responsive * Fixed navbar issue and added webkit keyframes * LeftDrawer ready * Translations added * Added shimmer loading effect * Styling issue fixed * Failing tests fixed for OrgList * Removed unused vars * Tests done for LeftDrawer * Succesfully made component without causing any breaking change * 100% Code coverage achieved for Requests Screen * Fix alignment * Roles screen UI done * Role screen fixed with 100% test coverage * Changing screen activeness fixed * Unused vars and Typos fixed * Language support added * Linting and typos fixed * Fixed failing tests for LeftDrawer * Completed tests of AdminDashListCard with 100% code coverage * OrgListCard done * Finalised tests * Requests user search made functional again ! * Fixed loading on refetch and UX on all screens * OrgList failing errors fixed * Fixed all failing tests * Achieved 100% code coverage for OrgList.tsx * Wrote tests and mod LeftDrawer for admins * Minor ui issue fixed * Fixed failing test * UI bug dropdown * Frontend insync with Backend attempt 1 * Introspection fail fix 1 * Introspection error fix 3 * Introspection error fix another attempt * Another attempt * Fixed Default Animation on Organizations Screen * Fixed typo * Loading data from localstorage functional * Fixed name conventions * Fixed typo * UI Fix * Changed screen name * Table Loader added * Added LeftOrg drawer and Organization screen comp to Screens * routesReducer tests fixed * Redundant adminNavbar removed from project * MemberDetail issue fixed * Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images * Fixed failing tests * Fix tests * Fixed warnings * Linting fixes * Linting issues fixed * Achieved 100% code coverage for CollapsibleDropdown * Achieved 100% CC on IconComponent and removed useless imports * Achieved 100% cc for LeftDrawer Component * Achieved 100% CC on SuperAdminScreen Component * Fixed typo * Integrated Event Dashboard * Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed * Removed redundant code * Removed useless imports * Linting fixed * Removed LeftDrawerOrg * Update documentation * copy-docs -to-talawa branch update to develop * removed dependance of code copying from generate segment * Update push.yml (#969) * Update push.yml (#970) * Feature Request: Adding a dialog to go to plugin store after an organization is created by the admin (#951) * Add/ test for OrgPost.tsx * fix: org post back to default * Added Dialog 2 * Updated Dialog UI * Removed Extra code * Updated Plugin store * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * Fix: UI Redesign * fix: merge * fix * Update AddOnStore.tsx * Fixed Merge Errors * Add test: for OrgEntry * Test 3 * fix test 4 * Merge latest AdminUI Redesign into develop (#972) * Initial Organizations screen done * Removed yellow scrollbar * Linting fixed * Replaced images with svgs for logos * Styling done for btnsContainer * Better typechecking and readability * Animated Drawer working * Responsive page ready * OrgCard responsive * Fixed navbar issue and added webkit keyframes * LeftDrawer ready * Translations added * Added shimmer loading effect * Styling issue fixed * Failing tests fixed for OrgList * Removed unused vars * Tests done for LeftDrawer * Succesfully made component without causing any breaking change * 100% Code coverage achieved for Requests Screen * Fix alignment * Roles screen UI done * Role screen fixed with 100% test coverage * Changing screen activeness fixed * Unused vars and Typos fixed * Language support added * Linting and typos fixed * Fixed failing tests for LeftDrawer * Completed tests of AdminDashListCard with 100% code coverage * OrgListCard done * Finalised tests * Requests user search made functional again ! * Fixed loading on refetch and UX on all screens * OrgList failing errors fixed * Fixed all failing tests * Achieved 100% code coverage for OrgList.tsx * Wrote tests and mod LeftDrawer for admins * Minor ui issue fixed * Fixed failing test * UI bug dropdown * Frontend insync with Backend attempt 1 * Introspection fail fix 1 * Introspection error fix 3 * Introspection error fix another attempt * Another attempt * Fixed Default Animation on Organizations Screen * Fixed typo * Loading data from localstorage functional * Fixed name conventions * Fixed typo * UI Fix * Changed screen name * Table Loader added * Added LeftOrg drawer and Organization screen comp to Screens * routesReducer tests fixed * Redundant adminNavbar removed from project * MemberDetail issue fixed * Achieved 100% code coverage for LeftDrawerOrg, Added Empty div in images * Fixed failing tests * Fix tests * Fixed warnings * Linting fixes * Linting issues fixed * Achieved 100% code coverage for CollapsibleDropdown * Achieved 100% CC on IconComponent and removed useless imports * Achieved 100% cc for LeftDrawer Component * Achieved 100% CC on SuperAdminScreen Component * Fixed typo * Integrated Event Dashboard * Failing tests for LeftDrawer LeftDrawerOrg OrgList screen fixed * Removed redundant code * Removed useless imports * Linting fixed * Removed LeftDrawerOrg * Dashboard screen ui almost ready * Org Dash ready * Block/Unblock screen ready * Organization settings page ready * Lang changes * Page refresh on updating org removed * OrgUpdate tests done * OrgUpdate 100% test coverage achieved * OrgSettings Tests done * Organization Dashboard Cards done * Organization Dashboard achieved 100% CC * 100% CC achieved for BlockUser screen * Finalised changes * Small change * Tests fixed * Separate OrgSettings component made * Linting fixed * Formatting fixed * Events screen and Post Comment Modal for Talawa-user-portal (#963) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Add Home Screen along with other components * Fix failing tests * Add required tests and Offcanvas navbar * Remove unused variables from tests * Sync the Mutations with talawa-api * Add Settings and Donate Screen * Add multilingual support for the screens * Add events screen without calendar view * Add multilingual support to Events screen * Fix failing tests due to merge * Add Post Comment functionality * Refactor Events tests * Deprecate event registrants from query * Update README.md * Add My Tasks screen and Fix UI bugs [User Portal] (#978) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Add Home Screen along with other components * Fix failing tests * Add required tests and Offcanvas navbar * Remove unused variables from tests * Sync the Mutations with talawa-api * Add Settings and Donate Screen * Add multilingual support for the screens * Add events screen without calendar view * Add multilingual support to Events screen * Fix failing tests due to merge * Add Post Comment functionality * Refactor Events tests * Deprecate event registrants from query * Add my tasks screen for user portal * Remove unnecessary comments from test files * Add Feedback UI Components to Talawa Admin (#980) * Add feedback component * Add tests for feedback modal * Add handling for empty feedback * Add Average Rating and Reviews component * Add testing for all the added cards * Fix tests and move to 100% coverage * Add bugfix * Add merge function to fix failing tests * Add key definitons * Change merge policy * Add custom merge policy to all the Event Stat tests * remove cache * Migrate to a single query in the parent * Adding Plugin Logic to the Talawa Mobile Web App (#976) * Add/ test for OrgPost.tsx * fix: org post back to default * Added Dialog 2 * Updated Dialog UI * Removed Extra code * Updated Plugin store * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * Fix: UI Redesign * fix: merge * fix * Update AddOnStore.tsx * Fixed Merge Errors * Add test: for OrgEntry * Test 3 * fix test 4 * chores: version changes * Add: Initial Websocket setup on talawa mobile web * Add: plugin logic * Add: plugin logic * removed extra * removed extra * Added: Tests * fix * Add Side Navigation to Event Dashboard (#981) * Create left drawer for event dashboard * Add basic styles to the event dashboard * Fix button styling * Add testing * Add testing for the left event drawer * Add 100% line coverage for all components * Increase timeout for tests * Move maximum rating in feedback from 10 to 5 [Fixes #990] (#987) * Move maximum rating in feedbacks from 10 to 5 * Fix failing tests * Add chat screen to talawa-user-portal (#986) * Create login and register page for user portal * Lint public locales * Create tests for login page components * Add react import in tests * Create organizations screen for user portal * Fix failing tests and lint code * fix failing tests * Add tests for organization screen and componenets * Fix non-null assertions * Fix non-null assertions in organizations test * Fix bootstrap migration changes * Add Home Screen along with other components * Fix failing tests * Add required tests and Offcanvas navbar * Remove unused variables from tests * Sync the Mutations with talawa-api * Add Settings and Donate Screen * Add multilingual support for the screens * Add events screen without calendar view * Add multilingual support to Events screen * Fix failing tests due to merge * Add Post Comment functionality * Refactor Events tests * Deprecate event registrants from query * Add my tasks screen for user portal * Remove unnecessary comments from test files * Add chat screen along with components * Add mui/system package for x-chart support * Add chat screen tests and fix other bugs * Update issue.yml * Update stale.yml * Merge latest AdminUI Redesign into Master (#1006) * Pagination Done for Orglist * Fixed warnings * Infinite scroll and search working for Requests screen * Simplified the code * Infinite scroll enabled and functioning on OrgList Requests and Users screen * FIxed warning * Fixed typo * Fixed bug * Joined and Blockedbyorgs screen and mdoal ready * Tables ready ! * Remove user from organization functionality working well * Update user role in organization feature ready * Minor changes * Done with tests on OrgList * Done with testss of Requests screen * 100% CC achieved for Users screen * Main tests done for UserTableItem * 100% Code Coverage Achieved for UserTableItem * Removed Redundant Landing Page * 100% CC achieved for TableLoader * Translation added for Users Screen * Translation done for Requests screen * Translation done for dashboard screen * Linting and warnings fixed * Improved login page * UI Done for Forgot Password Screen * Forgot Password Screen Tests done! * Fixed all pending tests * Better message for btns and coloring * Linting issues fixed * Fixed code styles * SUPPRESSED UNKNOWN ERROR * Fixed formatting * Updated typoed message * Fixed failing tests accompanying typo * fix createEvent to close modal and show events without refresh (#1014) * fix: Ensure Full Visibility of Logo on 404 Error Page (#1018) - Adjusted the positioning of the logo on the 404 error page to ensure full visibility. - Implemented CSS modifications to prevent the logo from being covered or cut off. - Tested the changes by navigating to various undefined endpoints, confirming that the logo is now displayed correctly on the 404 error page. This commit addresses the bug by ensuring the proper display of the logo on the 404 error page, enhancing the user experience. Fixes #1016 Signed-off-by: Akhilender <[email protected]> * Implemented featurs for Postfeed Management (#982) * redesigned newsfeed * added test * newsfeed management * pinned post * postfeed management * pin unpin tag and video control * changes part 2 * newsfeed changes * changes in Card Preview of newsfeed * changes in Card Preview of newsfeed * testing phase 1 * translation * tests * tests * merged intto develop * test * Added query * Update pull-requests.yml * update and delete buttons of event modal are now working (#1051) * update and delete buttons of event modal are now working * fixed the naming conventions and style of the modal * Dynamic dashboard Enhancements (#979) * Dynamic Organization Dashboard * Dynamic Organization Dashboard * refined organization dashboard * Update src/utils/handleLatestFeed.ts Co-authored-by: Noble Mittal <[email protected]> * fixed inconsistent casing * fixed org dashboard test * fixed org dashboard test * revert previous commit * final changes * final changes --------- Co-authored-by: Noble Mittal <[email protected]> * Fix dashboard items (#1007) * Dashboard items are working now. * added variables for links -fix dashboard items * Added variables for links -fix dashboard items. * made the changes as said * Removed : string from variable assignment. * remove repititive code and resolved falling tests * Fix repeating code and falling tests. * Resolved some more falling tests * write test for missed lines * Fix event creation issue with white spaces. (#1025) * fix event creation with white spaces * Add test for empty input values * chore: fix unit test (#1052) * Fix layout distortion due to untruncated title description of events. (#1049) * Fix layout distortion due to untruncated title description of events * Add test * add test for LeftDrawerEvent.tsx * fixed some tests * add test complete * test: SecuredRouteForUser component 100% Test Coverage and fixed uncovered lines (#1048) * SecuredRouteForUser test case added * Fixed Linting Errors * Update SecuredRouteForUser.test.tsx * Update SecuredRouteForUser.test.tsx * linting fix * Update SecuredRouteForUser.test.tsx * Update SecuredRouteForUser.test.tsx * Fix incorrect toast Notification. (#1053) * correct toast notification for TableRow.tsx with full test coverage * Add correct toast with full code coverage * Add correct toast for deleteEventProjectModal.tsx with full test coverage * Add correct toast for UpdateEventProjectModal.tsx with full test coverage * Add correct toast for EventRegistrantsModal.tsx and full test coverage. * Add correct toast for AddTaskModal.tsx with full test coverage * Add correct toast for UpdateTaskModal.tsx with full test coverage * minor fix * Add correct toast to EventRegistrantsModal.tsx * fix EventRegitrantsModal.tsx * created a return button on event dashboard (#1057) * test: Loader Component 100% Test Coverage and Fix Uncovered Lines (#1047) * test: Achieve 100% Test Coverage and Fix Uncovered Lines - Improved the test coverage for the Loader component, addressing the previously uncovered lines and ensuring that all tests pass successfully. - Added a test to ensure that the component renders correctly with a custom 'sm' size. I verified that both the spinner-wrapper and spinner elements are present and that the correct class is applied. - Added a test to ensure that the component renders correctly with a 'lg' size. I verified that the spinner element has the appropriate class. - Added a test to ensure that the component renders correctly with an 'xl' size. I verified that the spinner element has the correct class. With these new tests, I now have 100% test coverage, and there are no more uncovered lines. The Loader component is thoroughly tested for different size scenarios, and all tests pass successfully. Signed-off-by: Akhilender <[email protected]> * Fixed linting in Loader component Signed-off-by: Akhilender <[email protected]> * Test: Increasing the test level - Trying to meet the code coverage level for Loader component. Signed-off-by: Akhilender <[email protected]> * Fixed Linting Signed-off-by: Akhilender <[email protected]> * fix: Linting Signed-off-by: Akhilender <[email protected]> * Improving test coverage for Loader Component - Fixed lint errors Signed-off-by: Akhilender <[email protected]> * test: Improving the tests on the Loader Component - Added a new aspect in the test-case1 Signed-off-by: Akhilender <[email protected]> * Fixed: Removed runtime-generated classes from testing - Eliminated all checks for classes associated with bootstrap components assigned at runtime. - Recognized that validating classes assigned during runtime is inappropriate. Signed-off-by: Akhilender <[email protected]> --------- Signed-off-by: Akhilender <[email protected]> * Simulated Test Database (#984) * Dynamic Organization Dashboard * Dynamic Organization Dashboard * Sample Org Implementation * removed unnecessary changes * removed unnecessary svgs * removed unnecessary import * added appropriate button style * fixed OrgListCard tests * Fixed OrgList and OrgListCard Tests * Removed Unnecessary 'container' Variable * Added Missing Translations and removed unused variable * Fixed event check in management not updating automatically bug (#1062) * fixed the event checkIn bug * fixed the failing test * fixed the CheckInWrapper test * Fix user profile buttons layout and added form validation (#1064) * Fix user profile buttons layout and added form validation * Fix falling tests and warnings * Add test for missed lines * fix falling tests * test: Achieved 100% test coverage and fixed uncovered lines (#1068) * test: Achieved 100% test coverage and fixed uncovered lines - Improved the test coverage for the User-Password-Update component, addressing the previously uncovered lines and ensuring that all tests pass successfully. - Added two new tests 1. Empty Password Field Test: - The first test ensures that an error is displayed when attempting to save changes with an empty password field. 2. Mismatched New and Confirm Passwords Test - The second test covers the scenario where the new and confirm password fields do not match. With these new tests, I now have 100% test coverage, and there are no more uncovered lines. Signed-off-by: Akhilender <[email protected]> * Altered the formData - Altered the formData to make sure all are related to the organization name. Signed-off-by: Akhilender <[email protected]> --------- Signed-off-by: Akhilender <[email protected]> * created test for src/components/UserPortal/EventCard/EventCard.tsx (#1079) * created test for eventCard of User portal * corrected the start and end time * Feature request: Adding advertisement screen (#994) * Add/ test for OrgPost.tsx * fix: org post back to default * Added Dialog 2 * Updated Dialog UI * Removed Extra code * Updated Plugin store * fix: warnings and solves #951 & #948 * fix: warnings and solves #951 & #948 * fix: warnings and solve…
…ations" button (PalisadoesFoundation#1124) * Changes position and text of all organization button * Made changes to the routesReducer.test file * Made changes in IconComponent.test file * Fetched changes from main repo * Fixed unnecessary changes --------- Co-authored-by: Aditya Agarwal <[email protected]>
… Organizations" button (PalisadoesFoundation#1124)" (PalisadoesFoundation#1183) This reverts commit 1fd4105.
* Added Base branch check to main * Deleted all files in the main branch in anticipation of merging develop into main cleanly * Merge develop to main * Deleted all main files * Merged develop into main
* Deleted all files in the main branch in anticipation of merging develop into main cleanly * Merge develop into main
* Deleted all files in the main branch in anticipation of merging develop into main cleanly * Merge develop into main * Deleted all files in the main branch in anticipation of merging develop into main cleanly * Merge develop into main
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v6.1.15...v6.2.1) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lisadoesFoundation#1961) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/changed-files@v40...v41) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.18.2...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10. - [Release notes](https://github.com/mde/ejs/releases) - [Commits](mde/ejs@v3.1.9...v3.1.10) --- updated-dependencies: - dependency-name: ejs dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tion#2020) * Deleted all files in the main branch in anticipation of merging develop into main cleanly * Merge develop into main --------- Co-authored-by: Peter Harrison <[email protected]>
* 20240727112607 Deleted all files in the main branch in anticipation of merging develop into main cleanly * 20240727112842 Merge develop into main
* 20240929102850 Deleted all files in the main branch in anticipation of merging develop into main cleanly * 20240929103238 Merge develop into main
…lisadoesFoundation#2307) Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40 to 41. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/changed-files@v40...v41) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.3 to 4.22.5. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v4.21.3...v4.22.5) --- updated-dependencies: - dependency-name: rollup dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* 20241114065242 Deleted all files in the main branch in anticipation of merging develop into main cleanly * 20241114065332 Merge develop into main
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
schema.graphqlOops! Something went wrong! :( ESLint: 8.57.0 Error: .eslintrc.json:
WalkthroughThe pull request introduces several configuration files and scripts aimed at enhancing the development environment for the Talawa Admin project. Key changes include the addition of a Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
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.
Actionable comments posted: 42
🧹 Outside diff range and nitpick comments (49)
.gitignore (1)
3-5
: Consider standardizing on a single package managerThe inclusion of both
yarn.lock
andpnpm-lock.yaml
suggests multiple package managers might be in use. This could lead to dependency resolution issues and inconsistencies across development environments.Consider:
- Choosing one package manager (npm, yarn, or pnpm)
- Documenting the chosen package manager in the project's README
- Removing lock file entries for unused package managers
public/locales/fr/errors.json (2)
2-2
: Remove trailing space and fix punctuationThe French translation has inconsistent spacing and punctuation.
- "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible !. ", + "talawaApiUnavailable": "Le service Talawa-API n'est pas disponible !"
4-4
: Standardize template variable spacingThe spacing around template variables is inconsistent. In line 4, there's a double space before {{msg}}, while in lines 9-10, there's no space before {{entity}}.
- "unknownError": "Une erreur inconnue est survenue. {{msg}}", + "unknownError": "Une erreur inconnue est survenue. {{msg}}", - "errorOccurredCouldntCreate": "Une erreur s'est produite. Impossible de créer {{entity}}", + "errorOccurredCouldntCreate": "Une erreur s'est produite. Impossible de créer {{entity}}", - "errorLoading": "Une erreur s'est produite lors du chargement des données {{entity}}" + "errorLoading": "Une erreur s'est produite lors du chargement des données {{entity}}"Also applies to: 9-10
scripts/custom-test-env.js (2)
4-7
: Fix JSDoc tag and improve documentationThe
@pdfme
tag is undefined in the TSDoc configuration.Update the documentation to use proper markdown formatting:
/** - * A custom environment to set the TextEncoder and TextDecoder variables, that is required by @pdfme during testing. - * Providing a polyfill to the environment for the same + * A custom environment to set the TextEncoder and TextDecoder variables, required by + * the PDF generation library during testing. + * + * Provides polyfills for TextEncoder and TextDecoder in the test environment. */🧰 Tools
🪛 eslint
[error] 5-5: tsdoc-undefined-tag: The TSDoc tag "@pdfme" is not defined in this configuration
(tsdoc/syntax)
9-15
: Add TypeScript return type for async setup methodThe setup method is missing its return type annotation.
Add proper TypeScript types:
- async setup() { + async setup(): Promise<void> {🧰 Tools
🪛 eslint
[error] 9-9: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 9-9: Missing return type on function.
(@typescript-eslint/explicit-module-boundary-types)
scripts/__mocks__/@pdfme/generator.ts (2)
11-11
: Remove commented debug codeDebug logging should be removed from production code.
- // console.log('pdf error: length : ', template, inputs, inputs.length);
14-21
: Consider enhancing mock PDF structureWhile the current implementation provides basic PDF-like data, it could be more realistic for testing purposes.
Consider enhancing the mock to include more PDF structure:
// Generate mock PDF-like header bytes const pdfHeader = [0x25, 0x50, 0x44, 0x46]; // %PDF + const pdfVersion = [0x2D, 0x31, 0x2E, 0x34]; // -1.4 + const pdfEOF = [0x25, 0x25, 0x45, 0x4F, 0x46]; // %%EOF // Add some random content based on input size const contentSize = Math.min(template.schemas.length, inputs.length) * 10; const mockContent = Array.from({ length: contentSize }, () => Math.floor(Math.random() * 256), ); - return Promise.resolve(new Uint8Array([...pdfHeader, ...mockContent])); + return Promise.resolve(new Uint8Array([...pdfHeader, ...pdfVersion, ...mockContent, ...pdfEOF]));scripts/__mocks__/@pdfme/generator.test.ts (2)
1-3
: Consider using proper type definitions instead of type assertionsThroughout the test file,
Template
type is being used with type assertions (as Template
). This could mask potential type errors.Consider creating a proper mock template object that satisfies the
Template
interface:const createMockTemplate = (schemas: any[] = []): Template => ({ schemas, // add other required Template properties });
4-47
: Standardize test case syntaxThe test suite mixes
test()
andit()
syntax. While functionally identical, consistency improves readability.Standardize all test cases to use either
test()
orit()
, preferablytest()
as it's more explicit..github/workflows/check-tsdoc.js (2)
17-33
: Consider usingPromise.all
to improve performanceIn the
findTsxFiles
function, you're sequentially processing file stats and directory reads. To enhance performance, you can process them in parallel usingPromise.all
.Apply this diff to refactor the code:
async function findTsxFiles(dir) { let results = []; try { const list = await fs.readdir(dir); - for (const file of list) { - const filePath = path.join(dir, file); - const stat = await fs.stat(filePath); - if (stat.isDirectory()) { - results = results.concat(await findTsxFiles(filePath)); - } else if ( - filePath.endsWith('.tsx') && - !filePath.endsWith('.test.tsx') && - !filesToSkip.includes(path.relative(dir, filePath)) - ) { - results.push(filePath); - } - } + const filePaths = list.map(file => path.join(dir, file)); + const stats = await Promise.all(filePaths.map(fs.stat)); + const nestedResults = await Promise.all(stats.map((stat, index) => { + const filePath = filePaths[index]; + if (stat.isDirectory()) { + return findTsxFiles(filePath); + } else if ( + filePath.endsWith('.tsx') && + !filePath.endsWith('.test.tsx') && + !filesToSkip.includes(path.relative(dir, filePath)) + ) { + return [filePath]; + } else { + return []; + } + })); + results = results.concat(...nestedResults); } catch (err) { console.error(`Error reading directory ${dir}: ${err.message}`); } return results; }
55-55
: Avoid usingawait
inside loop conditionsUsing
await
directly inside loop conditions can lead to less readable code. It's better to separate the asynchronous call from the condition.Apply this diff:
for (const file of files) { - if (!await containsTsDocComment(file)) { + const hasComment = await containsTsDocComment(file); + if (!hasComment) { filesWithoutTsDoc.push(file); } }.github/workflows/eslint_disable_check.py (2)
61-61
: Rename unused loop variable_
to improve readabilityThe loop control variable
dirs
is unused in the loop body. According to Python conventions, it should be renamed to_
to indicate it's intentionally unused.Apply this diff:
for root, dirs, files in os.walk(os.path.join(directory, 'src')): - for file_name in files: + for _root, _dirs, files in os.walk(os.path.join(directory, 'src')): for file_name in files:🧰 Tools
🪛 Ruff (0.8.0)
61-61: Loop control variable
dirs
not used within loop bodyRename unused
dirs
to_dirs
(B007)
Line range hint
135-135
: Useraise ... from e
to preserve exception contextWhen re-raising exceptions, it's good practice to use
raise ... from e
to maintain the original traceback and exception context.Apply this diff:
except json.JSONDecodeError as e: - raise ValueError(f"Error decoding JSON from file {filepath}: {e}") + raise ValueError(f"Error decoding JSON from file {filepath}: {e}") from e🧰 Tools
🪛 Ruff (0.8.0)
61-61: Loop control variable
dirs
not used within loop bodyRename unused
dirs
to_dirs
(B007)
setup.ts (1)
107-117
: Duplicate code when updating.env
filesThe pattern for reading, replacing, and writing to
.env
is repeated multiple times. Consider creating a utility function to handle this logic to reduce duplication.Apply this diff to create a utility function:
+async function updateEnvFile(key: string, value: string) { + const envPath = '.env'; + const data = await fs.promises.readFile(envPath, 'utf8'); + const envConfig = dotenv.parse(data); + const updatedData = data.replace(`${key}=${envConfig[key]}`, `${key}=${value}`); + await fs.promises.writeFile(envPath, updatedData, 'utf8'); +} ... // Replace the repeated code with calls to updateEnvFile - fs.readFile('.env', 'utf8', (err, data) => { - const result = data.replace( - `REACT_APP_USE_RECAPTCHA=${useRecaptcha}`, - `REACT_APP_USE_RECAPTCHA=yes`, - ); - fs.writeFileSync('.env', result, 'utf8'); - }); + await updateEnvFile('REACT_APP_USE_RECAPTCHA', 'yes');.github/workflows/compare_translations.py (2)
135-135
: Use exception chaining when re-raising exceptionsTo preserve the original traceback when re-raising an exception, use
raise ... from e
.Apply this diff:
except json.JSONDecodeError as e: - raise ValueError(f"Error decoding JSON from file {filepath}: {e}") + raise ValueError(f"Error decoding JSON from file {filepath}: {e}") from e🧰 Tools
🪛 Ruff (0.8.0)
135-135: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
1-49
: Update the module docstring to match PEP 257 standardsThe module docstring is lengthy and includes attributes and functions, which is unnecessary. Per PEP 257, module docstrings should be a short summary. Move detailed documentation to individual functions.
Refactor the module docstring:
-"""Script to encourage more efficient coding practices. -Methodology: - Utility for comparing translations between default and other languages. - ... - This script complies with our python3 coding and documentation standards - and should be used as a reference guide. It complies with: - 1) Pylint - 2) Pydocstyle - 3) Pycodestyle - 4) Flake8 -""" +"""Utility script to compare translations between default and other languages.""".github/workflows/countline.py (1)
243-244
: Improve performance by skipping node_modules earlyCurrently, you're checking for
'node_modules'
in the file path after some processing. Consider skipping thenode_modules
directory earlier in the directory walk to improve performance.Modify the
_filepaths_in_directories
function:def _filepaths_in_directories(directories): """Create a list of full file paths based on input directories.""" result = [] for directory in directories: + if 'node_modules' in directory: + continue for root, _, files in os.walk(directory, topdown=False): for name in files: result.append(os.path.join(root, name)) return resultschema.graphql (1)
618-625
: Inconsistency between mutation parameters and input typeThe
createAdvertisement
mutation accepts individual parameters, while aCreateAdvertisementInput
input type is defined and could be utilized for consistency and scalability.Consider modifying the mutation to use the
CreateAdvertisementInput
:-createAdvertisement( - endDate: Date! - link: String! - name: String! - orgId: ID! - startDate: Date! - type: String! - ): Advertisement! +createAdvertisement( + data: CreateAdvertisementInput! + ): Advertisement!Ensure that the input type includes all necessary fields and adjust the mutation implementation accordingly.
.husky/pre-commit (1)
4-10
: Optimize pre-commit hook to avoid redundancy and unintended stagingThe pre-commit script runs both
npm run format:fix
andnpm run lint-staged
, which might overlap in functionality iflint-staged
also formats code. Additionally,git add .
stages all changes, potentially including unintended files.Consider relying solely on
lint-staged
for formatting and linting:npm run format:fix # npm run lint:fix npm run lint-staged npm run typecheck npm run update:toc -git add .
This ensures only the intended changes are staged. Confirm that
lint-staged
is configured to handle all necessary linting and formatting tasks.scripts/githooks/update-toc.js (2)
11-12
: Remove unnecessary empty lineThere's an extra empty line between lines 11 and 12, which is causing a Prettier formatting error.
Apply this diff to fix the formatting:
execSync(command, { stdio: 'inherit' }); - });
🧰 Tools
🪛 eslint
[error] 11-12: Delete
··⏎
(prettier/prettier)
4-7
: Extend script to process Markdown files in subdirectoriesCurrently, the script only updates the table of contents for Markdown files in the root directory. Any Markdown files in subdirectories are ignored.
Modify the script to recursively search for
.md
files:const markdownFiles = fs - .readdirSync('./') + .readdirSync('./', { withFileTypes: true }) + .flatMap((entry) => { + if (entry.isDirectory()) { + return fs.readdirSync(`./${entry.name}`) + .filter((file) => file.endsWith('.md')) + .map((file) => `${entry.name}/${file}`); + } else if (entry.isFile() && entry.name.endsWith('.md')) { + return [entry.name]; + } else { + return []; + } + });Alternatively, use the
glob
package to handle recursive file searching:import glob from 'glob'; const markdownFiles = glob.sync('**/*.md', { ignore: 'node_modules/**' });.github/workflows/codeql-codescan.yml (1)
1-44
: Fix YAML formatting issuesThe YAML file has inconsistent indentation and trailing spaces.
- Remove trailing spaces from lines 6, 17, and 20
- Use consistent indentation (2 spaces) throughout the file
- Consider using a YAML formatter to maintain consistency
Would you like me to generate a fully formatted version of the file?
🧰 Tools
🪛 actionlint (1.7.4)
35-35: the runner of "github/codeql-action/init@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
41-41: the runner of "github/codeql-action/autobuild@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
44-44: the runner of "github/codeql-action/analyze@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 yamllint (1.35.1)
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
[warning] 37-37: wrong indentation: expected 11 but found 10
(indentation)
.github/pull_request_template.md (2)
6-8
: Consider enhancing branch descriptionsThe branch descriptions could be more detailed to help contributors understand the workflow better.
-- `develop`: For unstable code: New features and bug fixes. -- `master`: Where the stable production ready code lies. Only security related bugs. +- `develop`: The integration branch for new features and non-critical bug fixes. All PRs should target this branch. +- `master`: The production branch containing stable, thoroughly tested code. Only critical security fixes are merged directly.
24-24
: Clarify issue reference formatThe format for referencing issues could be more explicit.
-Fixes #<!--Add related issue number here.--> +Fixes #<!-- Add issue number (e.g., Fixes #123) -->.github/workflows/stale.yml (2)
28-29
: Consider pinning to specific action versionFor better reproducibility and security, consider pinning to a specific SHA.
- - uses: actions/stale@v8 + - uses: actions/stale@3cc23c99b9d20e44466193a8c70d3582903f9dcd # v8.0.0🧰 Tools
🪛 actionlint (1.7.4)
28-28: the runner of "actions/stale@v8" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
31-34
: Consider more concise stale messagesThe current messages are verbose. Consider shorter versions while maintaining clarity.
- stale-issue-message: 'This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.' - stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.' - close-issue-message: 'This issue did not get any activity in the past 180 days and thus has been closed. Please check if the newest release or develop branch has it fixed. Please, create a new issue if the issue is not fixed.' - close-pr-message: 'This pull request did not get any activity in the past 180 days and thus has been closed.' + stale-issue-message: 'Marking as stale due to 10 days of inactivity. Will close in 180 days if no updates occur. Please verify if develop branch resolves the issue.' + stale-pr-message: 'Marking as stale due to 10 days of inactivity. Will close in 180 days. Please check for conflicts with develop branch and request help if needed.' + close-issue-message: 'Closing due to 180 days of inactivity. Please check latest release/develop branch and create new issue if still relevant.' + close-pr-message: 'Closing due to 180 days of inactivity.'.github/workflows/push.yml (2)
45-45
: Consider more specific cache keyThe cache key could include package-lock.json hash to ensure proper cache invalidation.
- key: ${{ runner.os }}-code-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-code-coverage-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}-${{ matrix.node-version }}
56-61
: Consider fail-fast for coverage uploadsCurrently, coverage upload failures won't fail the workflow. Consider enabling fail-fast for better visibility of coverage issues.
- fail_ci_if_error: false + fail_ci_if_error: truescripts/githooks/check-localstorage-usage.js (1)
61-78
: Enhance Error HandlingThe error handling in the file reading block could be improved to be more specific about the type of error encountered.
try { if (existsSync(file)) { const content = readFileSync(file, 'utf-8'); // ... rest of the code } else { console.log(`File ${file} does not exist.`); } } catch (error) { - console.error(`Error reading file ${file}:`, error.message); + if (error instanceof Error) { + console.error(`Error reading file ${file}:`, error.message); + } else { + console.error(`Unknown error reading file ${file}`); + } }.github/workflows/issue.yml (2)
29-56
: Simplify label addition logicThe current implementation using
reduce
to check for labels is unnecessarily complex. Consider simplifying the logic for better maintainability.- if(labels.data.reduce((a, c)=>a||["dependencies"].includes(c.name), false)) + const labelNames = labels.data.map(label => label.name); + if (labelNames.includes("dependencies"))🧰 Tools
🪛 actionlint (1.7.4)
29-29: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
21-25
: Consider using reusable workflow for checkoutThe sparse checkout configuration could be moved to a reusable workflow to maintain consistency across different workflows.
.github/workflows/talawa_admin_md_mdx_format_adjuster.py (2)
19-44
: Add type hints for better code maintainabilityConsider adding type hints to improve code maintainability and IDE support.
-def escape_mdx_characters(text): +def escape_mdx_characters(text: str) -> str:
90-93
: Add logging for better debuggingConsider adding logging to track file processing progress and any issues encountered.
+import logging + +logging.basicConfig(level=logging.INFO) + def main(): args = parser.parse_args() # Process each Markdown file in the directory for root, _, files in os.walk(args.directory): for file in files: if file.lower().endswith(".md"): + logging.info("Processing file: %s", os.path.join(root, file)) process_file(os.path.join(root, file))ISSUE_GUIDELINES.md (2)
5-5
: Fix grammatical error in introductionChange "a issues reports" to "issue reports" for correct grammar.
-In order to give everyone a chance to submit a issues reports and contribute to the Talawa project +In order to give everyone a chance to submit issue reports and contribute to the Talawa project🧰 Tools
🪛 LanguageTool
[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...(EN_A_VS_AN)
44-44
: Capitalize "Slack" in channel references"Slack" is a proper noun and should be capitalized.
-Ask our contributors to assign it to you in `#talawa` slack channel. +Ask our contributors to assign it to you in `#talawa` Slack channel. -Join our `#talawa-github` slack channel for automatic issue and pull request updates. +Join our `#talawa-github` Slack channel for automatic issue and pull request updates. -Discuss issues in our various slack channels when necessary +Discuss issues in our various Slack channels when necessaryAlso applies to: 53-53, 57-57
🧰 Tools
🪛 LanguageTool
[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in#talawa
slack channel. Working on these types of exi...(ON_SKYPE)
public/locales/hi/common.json (1)
86-87
: Consider adding timeout duration in session messagesThe session timeout messages could be more informative by including the actual timeout duration. Consider adding a placeholder for the timeout value:
- "sessionWarning": "आपका सत्र निष्क्रियता के कारण जल्द ही समाप्त हो जाएगा। कृपया अपने सत्र को बढ़ाने के लिए पृष्ठ के साथ बातचीत करें।", + "sessionWarning": "आपका सत्र {{timeout}} मिनट की निष्क्रियता के कारण जल्द ही समाप्त हो जाएगा। कृपया अपने सत्र को बढ़ाने के लिए पृष्ठ के साथ बातचीत करें।",README.md (1)
53-53
: Fix markdown heading formattingRemove extra spaces after the hash symbol in the heading.
-# Videos +# Videos🧰 Tools
🪛 Markdownlint (0.35.0)
53-53: null
Multiple spaces after hash on atx style heading(MD019, no-multiple-space-atx)
CODE_STYLE.md (2)
71-89
: Enhance Bootstrap component usage exampleThe example could be improved by:
- Adding TypeScript types
- Including error handling
- Showing proper event handling
- <div class="dropdown"> - <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> - Dropdown button - </button> - <ul class="dropdown-menu"> - <li><a class="dropdown-item" href="#">Action</a></li> - <li><a class="dropdown-item" href="#">Another action</a></li> - <li><a class="dropdown-item" href="#">Something else here</a></li> - </ul> - </div> +interface DropdownProps { + onSelect: (key: string | null) => void; +} + +function BasicExample({ onSelect }: DropdownProps) { + return ( + <Dropdown onSelect={onSelect}> + <Dropdown.Toggle variant="success" id="dropdown-basic"> + Dropdown Button + </Dropdown.Toggle> + <Dropdown.Menu> + <Dropdown.Item eventKey="1">Action</Dropdown.Item> + <Dropdown.Item eventKey="2">Another action</Dropdown.Item> + <Dropdown.Item eventKey="3">Something else</Dropdown.Item> + </Dropdown.Menu> + </Dropdown> + ); +}🧰 Tools
🪛 Markdownlint (0.35.0)
73-73: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
75-75: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
78-78: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
127-138
: Improve assets directory structure documentationThe directory structure documentation could be enhanced with:
- More detailed explanations of each directory's purpose
- Guidelines for adding new assets
- File naming conventions
🧰 Tools
🪛 Markdownlint (0.35.0)
128-128: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
129-129: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
130-130: Expected: 0; Actual: 2
Unordered list indentation(MD007, ul-indent)
131-131: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
132-132: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
133-133: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
134-134: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
135-135: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
136-136: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
137-137: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
🪛 LanguageTool
[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories ofsrc
assets
- This houses all of the static assets used in the project - `...(ALL_OF_THE)
[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project -css
- This houses all of the css files used in the project - `imag...(ALL_OF_THE)
[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project -images
- This houses all of the images used in the project -scss
-...(ALL_OF_THE)
[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project -scss
- This houses all of the scss files used in the project - `c...(ALL_OF_THE)
[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms -_talawa.scss
- Partial Sass file for Talawa -_utilities.scss
- Pa...(HE_VERB_AGR)
[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... -_utilities.scss
- Partial Sass file for utilities -_variables.scss
-...(HE_VERB_AGR)
[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... -_variables.scss
- Partial Sass file for variables -app.scss
- Main S...(HE_VERB_AGR)
CONTRIBUTING.md (2)
Line range hint
321-321
: Fix heading hierarchy.The headings for pre-commit and post-merge hooks use h4 (####) but should use h3 (###) to maintain proper heading hierarchy.
Also applies to: 329-329
🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ibuting to open source, please read the Open Source Guides on [How to Contribute to Open So...(EN_COMPOUND_ADJECTIVE_INTERNAL)
[style] ~27-~27: This expression usually appears with a “please” in front of it.
Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex...(INSERT_PLEASE)
[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I...(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~62-~62: A determiner may be missing.
Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ...(THE_SUPERLATIVE)
[uncategorized] ~68-~68: Loose punctuation mark.
Context: ...ushed to themain
branch: -develop
: For unstable code and bug fixing - `mai...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~69-~69: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d bug fixing -main
: Where the stable production ready code lies. This is our default branch. ...(EN_COMPOUND_ADJECTIVE_INTERNAL)
[typographical] ~73-~73: Consider adding a comma.
Context: ...ultiple developers are working on issues there is bound to be a conflict of interest (...(IF_THERE_COMMA)
[typographical] ~73-~73: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...licts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **Fir...(RB_LY_COMMA)
[grammar] ~73-~73: Did you mean “served” (as in the idiom ‘first come, first served’)?
Context: ...ts are resolved in a First Come First Serve basis however there are certain excep...(FIRST_SERVED)
[grammar] ~75-~75: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...tant to ask the author of the PR in the slack channel or in their PRs or issues thems...(ON_SKYPE)
[style] ~77-~77: ‘Last but not the least’ might be wordy. Consider a shorter alternative.
Context: ...y and test that function when needed. - Last but not the least, communication is important make sure t...(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_THE_LEAST)
[grammar] ~77-~77: It seems that “to” is missing before the verb.
Context: ...t the least, communication is important make sure to talk to other contributors, in ...(MISSING_TO_BETWEEN_BE_AND_VB)
[grammar] ~77-~77: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ... other contributors, in these cases, in slack channel or in a issue/PR thread. - As a...(ON_SKYPE)
[misspelling] ~77-~77: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... in these cases, in slack channel or in a issue/PR thread. - As a last resort the...(EN_A_VS_AN)
[typographical] ~78-~78: It appears that a comma is missing.
Context: ...el or in a issue/PR thread. - As a last resort the Admins would be responsible for dec...(DURING_THAT_TIME_COMMA)
Line range hint
327-327
: Standardize code block formatting.Use fenced code blocks with language specifiers instead of indented code blocks for git commands:
- git commit -m "commit message" --no-verify +```bash +git commit -m "commit message" --no-verify +``` - git pull --no-verify +```bash +git pull --no-verify +``` Also applies to: 335-335 <details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [uncategorized] ~5-~5: If this is a compound adjective that modifies the following noun, use a hyphen. Context: ...ibuting to open source, please read the Open Source Guides on [How to Contribute to Open So... (EN_COMPOUND_ADJECTIVE_INTERNAL) --- [style] ~27-~27: This expression usually appears with a “please” in front of it. Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex... (INSERT_PLEASE) --- [uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen. Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I... (EN_COMPOUND_ADJECTIVE_INTERNAL) --- [grammar] ~62-~62: A determiner may be missing. Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ... (THE_SUPERLATIVE) --- [uncategorized] ~68-~68: Loose punctuation mark. Context: ...ushed to the `main` branch: - `develop`: For unstable code and bug fixing - `mai... (UNLIKELY_OPENING_PUNCTUATION) --- [uncategorized] ~69-~69: If this is a compound adjective that modifies the following noun, use a hyphen. Context: ...d bug fixing - `main`: Where the stable production ready code lies. This is our default branch. ... (EN_COMPOUND_ADJECTIVE_INTERNAL) --- [typographical] ~73-~73: Consider adding a comma. Context: ...ultiple developers are working on issues there is bound to be a conflict of interest (... (IF_THERE_COMMA) --- [typographical] ~73-~73: Consider adding a comma after ‘Usually’ for more clarity. Context: ...licts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **Fir... (RB_LY_COMMA) --- [grammar] ~73-~73: Did you mean “served” (as in the idiom ‘first come, first served’)? Context: ...ts are resolved in a **First Come First Serve** basis however there are certain excep... (FIRST_SERVED) --- [grammar] ~75-~75: Did you mean the communication tool “Slack” (= proper noun, capitalized)? Context: ...tant to ask the author of the PR in the slack channel or in their PRs or issues thems... (ON_SKYPE) --- [style] ~77-~77: ‘Last but not the least’ might be wordy. Consider a shorter alternative. Context: ...y and test that function when needed. - Last but not the least, communication is important make sure t... (EN_WORDINESS_PREMIUM_LAST_BUT_NOT_THE_LEAST) --- [grammar] ~77-~77: It seems that “to” is missing before the verb. Context: ...t the least, communication is important make sure to talk to other contributors, in ... (MISSING_TO_BETWEEN_BE_AND_VB) --- [grammar] ~77-~77: Did you mean the communication tool “Slack” (= proper noun, capitalized)? Context: ... other contributors, in these cases, in slack channel or in a issue/PR thread. - As a... (ON_SKYPE) --- [misspelling] ~77-~77: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. Context: ... in these cases, in slack channel or in a issue/PR thread. - As a last resort the... (EN_A_VS_AN) --- [typographical] ~78-~78: It appears that a comma is missing. Context: ...el or in a issue/PR thread. - As a last resort the Admins would be responsible for dec... (DURING_THAT_TIME_COMMA) </details> </details> </blockquote></details> <details> <summary>INSTALLATION.md (2)</summary><blockquote> `67-67`: **Fix technical terminology.** 1. The word "setup" is incorrectly used as a verb in several places. When used as a verb, it should be "set up": - "where you want to setup the repository" → "where you want to set up the repository" - "want to setup reCAPTCHA" → "want to set up reCAPTCHA" - "want to setup Google reCAPTCHA" → "want to set up Google reCAPTCHA" 2. The Apple operating system is incorrectly written as "MacOS". The correct form is "macOS". Also applies to: 68-68, 228-228, 232-232 <details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [grammar] ~67-~67: The word “setup” is a noun. The verb is spelled with a space. Context: ...avigate to the folder where you want to setup the repository. 2. Open a `cmd` (Window... (NOUN_VERB_CONFUSION) </details> </details> --- `224-224`: **Fix grammar in API reference.** Add the missing preposition "to": - "please refer the" → "please refer to the" <details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [uncategorized] ~224-~224: Possible missing preposition found. Context: ...` For additional details, please refer the `How to Access the Talawa-API URL` sect... (AI_HYDRA_LEO_MISSING_TO) </details> </details> </blockquote></details> <details> <summary>DOCUMENTATION.md (2)</summary><blockquote> `25-25`: **Fix grammar and capitalization.** 1. The modal verb 'should' requires the base form of the verb: - "should automatically launched" → "should automatically launch" 2. "Markdown" should be capitalized as it's a proper noun: - "markdown documents" → "Markdown documents" Also applies to: 26-26 <details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.35.0)</summary> 25-25: null Bare URL used (MD034, no-bare-urls) </details> <details> <summary>🪛 LanguageTool</summary> [grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form. Context: ...f `docs.talawa.io` should automatically launched in your browser at http://localhost:300... (MD_BASEFORM) </details> </details> --- `25-25`: **Format URL properly.** Use Markdown link syntax for the localhost URL: ```diff -A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/ +A local version of `docs.talawa.io` should automatically launch in your browser at [http://localhost:3000/](http://localhost:3000/)🧰 Tools
🪛 Markdownlint (0.35.0)
25-25: null
Bare URL used(MD034, no-bare-urls)
🪛 LanguageTool
[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...fdocs.talawa.io
should automatically launched in your browser at http://localhost:300...(MD_BASEFORM)
.github/workflows/README.md (4)
1-8
: Consider enhancing the introduction with more context.While the introduction is clear, it could be more informative by explaining why these guidelines exist and their importance in maintaining workflow consistency.
# Talawa GitHub Workflows Guidelines Follow these guidelines when contributing to this directory. ## General -Any changes to files in this directory are flagged when pull requests are run. Make changes only on the advice of a contributor. +Any changes to files in this directory are automatically flagged during pull request checks. These guidelines ensure consistency and maintainability of our GitHub Actions workflows. Make changes only on the advice of an experienced contributor.
24-24
: Fix typographical errors and formatting.There are a few issues that need to be addressed:
- Line 24: Repeated word "to"
- Line 35: Incorrect abbreviation format for "eg."
- 1. Place all actions related to to this in the `pull-request-target.yml` file. + 1. Place all actions related to this in the `pull-request-target.yml` file. -1. Jobs only work correctly if they have a dedicated file (eg. `CodeQL`) +1. Jobs only work correctly if they have a dedicated file (e.g., `CodeQL`)Also applies to: 35-35
🧰 Tools
🪛 LanguageTool
[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...ors: 1. Place all actions related to to this in thepull-request-target.yml
f...(ENGLISH_WORD_REPEAT_RULE)
41-47
: Enhance the Scripts section with more specific requirements.Consider adding more detailed information to make the requirements clearer for contributors:
-1. All scripts in this directory must be written in python3 for consistency. +1. All scripts in this directory must be written in Python 3.8 or higher for consistency. 1. The python3 scripts must follow the following coding standards. Run these commands against your scripts before submitting PRs that modify or create python3 scripts in this directory. - 1. Pycodestyle - 1. Pydocstyle - 1. Pylint - 1. Flake8 -1. All scripts must run a main() function. + 1. [Pycodestyle](https://pycodestyle.pycqa.org/) + 1. [Pydocstyle](https://www.pydocstyle.org/) + 1. [Pylint](https://pylint.org/) + 1. [Flake8](https://flake8.pycqa.org/) +1. All scripts must implement a main() function following this pattern: + ```python + def main(): + # Main logic here + pass + + if __name__ == "__main__": + main() + ```
13-13
: Add missing comma for better readability.-Whenever possible you must ensure that: +Whenever possible, you must ensure that:🧰 Tools
🪛 LanguageTool
[uncategorized] ~13-~13: Possible missing comma found.
Context: ...ding on the type of workflow. Whenever possible you must ensure that: 1. The file roles...(AI_HYDRA_LEO_MISSING_COMMA)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (75)
package-lock.json
is excluded by!**/package-lock.json
public/favicon.ico
is excluded by!**/*.ico
public/favicon_palisadoes.ico
is excluded by!**/*.ico
public/images/logo512.png
is excluded by!**/*.png
public/images/svg/angleDown.svg
is excluded by!**/*.svg
public/images/svg/arrow-left.svg
is excluded by!**/*.svg
public/images/svg/arrow-right.svg
is excluded by!**/*.svg
public/images/svg/attendees.svg
is excluded by!**/*.svg
public/images/svg/feedback.svg
is excluded by!**/*.svg
public/images/svg/profiledefault.svg
is excluded by!**/*.svg
public/images/svg/up-down.svg
is excluded by!**/*.svg
public/logo192.png
is excluded by!**/*.png
public/markdown/images/install1.png
is excluded by!**/*.png
public/markdown/images/install2.png
is excluded by!**/*.png
src/assets/css/app.css.map
is excluded by!**/*.map
src/assets/images/blank.png
is excluded by!**/*.png
src/assets/images/bronze.png
is excluded by!**/*.png
src/assets/images/defaultImg.png
is excluded by!**/*.png
src/assets/images/gold.png
is excluded by!**/*.png
src/assets/images/palisadoes_logo.png
is excluded by!**/*.png
src/assets/images/silver.png
is excluded by!**/*.png
src/assets/images/talawa-logo-600x600.png
is excluded by!**/*.png
src/assets/images/talawa-logo-dark-200x200.png
is excluded by!**/*.png
src/assets/images/talawa-logo-lite-200x200.png
is excluded by!**/*.png
src/assets/svgs/Attendance.svg
is excluded by!**/*.svg
src/assets/svgs/actionItem.svg
is excluded by!**/*.svg
src/assets/svgs/admin.svg
is excluded by!**/*.svg
src/assets/svgs/agenda-category-icon.svg
is excluded by!**/*.svg
src/assets/svgs/agenda-items.svg
is excluded by!**/*.svg
src/assets/svgs/angleRight.svg
is excluded by!**/*.svg
src/assets/svgs/article.svg
is excluded by!**/*.svg
src/assets/svgs/blockUser.svg
is excluded by!**/*.svg
src/assets/svgs/blockedUser.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemDate.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemEvent.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemLocation.svg
is excluded by!**/*.svg
src/assets/svgs/chat.svg
is excluded by!**/*.svg
src/assets/svgs/checkInRegistrants.svg
is excluded by!**/*.svg
src/assets/svgs/dashboard.svg
is excluded by!**/*.svg
src/assets/svgs/date.svg
is excluded by!**/*.svg
src/assets/svgs/event.svg
is excluded by!**/*.svg
src/assets/svgs/events.svg
is excluded by!**/*.svg
src/assets/svgs/flask.svg
is excluded by!**/*.svg
src/assets/svgs/funds.svg
is excluded by!**/*.svg
src/assets/svgs/key.svg
is excluded by!**/*.svg
src/assets/svgs/listEventRegistrants.svg
is excluded by!**/*.svg
src/assets/svgs/location.svg
is excluded by!**/*.svg
src/assets/svgs/logout.svg
is excluded by!**/*.svg
src/assets/svgs/media.svg
is excluded by!**/*.svg
src/assets/svgs/newChat.svg
is excluded by!**/*.svg
src/assets/svgs/organizations.svg
is excluded by!**/*.svg
src/assets/svgs/palisadoes.svg
is excluded by!**/*.svg
src/assets/svgs/people.svg
is excluded by!**/*.svg
src/assets/svgs/plugins.svg
is excluded by!**/*.svg
src/assets/svgs/post.svg
is excluded by!**/*.svg
src/assets/svgs/posts.svg
is excluded by!**/*.svg
src/assets/svgs/requests.svg
is excluded by!**/*.svg
src/assets/svgs/roles.svg
is excluded by!**/*.svg
src/assets/svgs/settings.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Facebook-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Github-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Instagram-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Linkedin-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Reddit-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Slack-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/X-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Youtube-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/tag.svg
is excluded by!**/*.svg
src/assets/svgs/tags.svg
is excluded by!**/*.svg
src/assets/svgs/talawa.svg
is excluded by!**/*.svg
src/assets/svgs/user.svg
is excluded by!**/*.svg
src/assets/svgs/userEvent.svg
is excluded by!**/*.svg
src/assets/svgs/users.svg
is excluded by!**/*.svg
src/assets/svgs/venues.svg
is excluded by!**/*.svg
src/assets/talawa-logo-lite-200x200.png
is excluded by!**/*.png
📒 Files selected for processing (82)
.coderabbit.yaml
(1 hunks).env.example
(1 hunks).eslintignore
(1 hunks).eslintrc.json
(4 hunks).github/ISSUE_TEMPLATE/bug-report.md
(2 hunks).github/ISSUE_TEMPLATE/feature-request.md
(2 hunks).github/dependabot.yaml
(1 hunks).github/pull_request_template.md
(2 hunks).github/workflows/README.md
(1 hunks).github/workflows/auto-label.json5
(1 hunks).github/workflows/check-tsdoc.js
(1 hunks).github/workflows/ci.yml
(0 hunks).github/workflows/codeql-analysis.yml
(0 hunks).github/workflows/codeql-codescan.yml
(1 hunks).github/workflows/compare_translations.py
(1 hunks).github/workflows/countline.py
(1 hunks).github/workflows/eslint_disable_check.py
(1 hunks).github/workflows/issue.yml
(1 hunks).github/workflows/linter.yml
(0 hunks).github/workflows/npm-publish.yml
(0 hunks).github/workflows/pull-request-target.yml
(1 hunks).github/workflows/pull-request.yml
(1 hunks).github/workflows/push.yml
(1 hunks).github/workflows/stale.yml
(1 hunks).github/workflows/talawa_admin_md_mdx_format_adjuster.py
(1 hunks).gitignore
(2 hunks).husky/post-merge
(1 hunks).husky/pre-commit
(1 hunks).lintstagedrc.json
(1 hunks).node-version
(1 hunks).prettierignore
(1 hunks).prettierrc
(1 hunks)CODEOWNERS
(1 hunks)CODE_OF_CONDUCT.md
(1 hunks)CODE_STYLE.md
(1 hunks)CONTRIBUTING.md
(2 hunks)DOCUMENTATION.md
(1 hunks)Docker_Container/.dockerignore
(0 hunks)Docker_Container/README.md
(0 hunks)Docker_Container/docker-compose.yml
(0 hunks)Docker_Container/dockerfile
(0 hunks)INSTALLATION.md
(1 hunks)ISSUE_GUIDELINES.md
(1 hunks)ISSUE_TEMPLATE.md
(0 hunks)PR-guidelines.md
(0 hunks)PR_GUIDELINES.md
(1 hunks)PULL_REQUEST_TEMPLATE.md
(0 hunks)README.md
(3 hunks)config/babel.config.cjs
(1 hunks)config/vite.config.ts
(1 hunks)index.html
(1 hunks)issue-guidelines.md
(0 hunks)jest-preview.config.ts
(1 hunks)jest.config.js
(1 hunks)package.json
(2 hunks)public/index.html
(0 hunks)public/locales/en/common.json
(1 hunks)public/locales/en/errors.json
(1 hunks)public/locales/en/translation.json
(1 hunks)public/locales/fr/common.json
(1 hunks)public/locales/fr/errors.json
(1 hunks)public/locales/fr/translation.json
(1 hunks)public/locales/hi/common.json
(1 hunks)public/locales/hi/errors.json
(1 hunks)public/locales/hi/translation.json
(1 hunks)public/locales/sp/common.json
(1 hunks)public/locales/sp/errors.json
(1 hunks)public/locales/sp/translation.json
(1 hunks)public/locales/zh/common.json
(1 hunks)public/locales/zh/errors.json
(1 hunks)public/locales/zh/translation.json
(1 hunks)public/manifest.json
(1 hunks)schema.graphql
(1 hunks)scripts/__mocks__/@dicebear/collection.ts
(1 hunks)scripts/__mocks__/@dicebear/core.ts
(1 hunks)scripts/__mocks__/@pdfme/generator.test.ts
(1 hunks)scripts/__mocks__/@pdfme/generator.ts
(1 hunks)scripts/__mocks__/fileMock.js
(1 hunks)scripts/custom-test-env.js
(1 hunks)scripts/githooks/check-localstorage-usage.js
(1 hunks)scripts/githooks/update-toc.js
(1 hunks)setup.ts
(1 hunks)
⛔ Files not processed due to max files limit (28)
- src/App.test.tsx
- src/App.tsx
- src/Constant/constant.spec.ts
- src/Constant/constant.ts
- src/GraphQl/Mutations/ActionItemCategoryMutations.ts
- src/GraphQl/Mutations/ActionItemMutations.ts
- src/GraphQl/Mutations/AgendaCategoryMutations.ts
- src/GraphQl/Mutations/AgendaItemMutations.ts
- src/GraphQl/Mutations/CampaignMutation.ts
- src/GraphQl/Mutations/CommentMutations.ts
- src/GraphQl/Mutations/EventAttendeeMutations.ts
- src/GraphQl/Mutations/EventVolunteerMutation.ts
- src/GraphQl/Mutations/FundMutation.ts
- src/GraphQl/Mutations/OrganizationMutations.ts
- src/GraphQl/Mutations/PledgeMutation.ts
- src/GraphQl/Mutations/TagMutations.ts
- src/GraphQl/Mutations/VenueMutations.ts
- src/GraphQl/Mutations/mutations.ts
- src/GraphQl/Queries/ActionItemCategoryQueries.ts
- src/GraphQl/Queries/ActionItemQueries.ts
- src/GraphQl/Queries/AgendaCategoryQueries.ts
- src/GraphQl/Queries/AgendaItemQueries.ts
- src/GraphQl/Queries/EventVolunteerQueries.ts
- src/GraphQl/Queries/OrganizationQueries.ts
- src/GraphQl/Queries/PlugInQueries.ts
- src/GraphQl/Queries/Queries.ts
- src/GraphQl/Queries/fundQueries.ts
- src/GraphQl/Queries/userTagQueries.ts
💤 Files with no reviewable changes (13)
- ISSUE_TEMPLATE.md
- PULL_REQUEST_TEMPLATE.md
- .github/workflows/linter.yml
- Docker_Container/dockerfile
- public/index.html
- issue-guidelines.md
- .github/workflows/ci.yml
- Docker_Container/docker-compose.yml
- .github/workflows/codeql-analysis.yml
- Docker_Container/.dockerignore
- .github/workflows/npm-publish.yml
- PR-guidelines.md
- Docker_Container/README.md
✅ Files skipped from review due to trivial changes (27)
- .node-version
- scripts/mocks/fileMock.js
- jest-preview.config.ts
- .prettierrc
- CODEOWNERS
- .eslintignore
- scripts/mocks/@dicebear/core.ts
- .prettierignore
- .github/dependabot.yaml
- config/babel.config.cjs
- .github/workflows/auto-label.json5
- .coderabbit.yaml
- public/locales/en/common.json
- public/locales/zh/errors.json
- config/vite.config.ts
- index.html
- public/locales/en/errors.json
- public/locales/fr/common.json
- public/locales/sp/common.json
- public/locales/sp/errors.json
- .env.example
- public/locales/sp/translation.json
- public/locales/hi/errors.json
- public/locales/en/translation.json
- public/locales/fr/translation.json
- public/locales/hi/translation.json
- public/locales/zh/translation.json
🧰 Additional context used
🪛 eslint
scripts/custom-test-env.js
[error] 5-5: tsdoc-undefined-tag: The TSDoc tag "@pdfme" is not defined in this configuration
(tsdoc/syntax)
[error] 9-9: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 9-9: Missing return type on function.
(@typescript-eslint/explicit-module-boundary-types)
scripts/githooks/update-toc.js
[error] 11-12: Delete ··⏎
(prettier/prettier)
jest.config.js
[error] 33-33: Delete ·
(prettier/prettier)
[error] 34-34: Insert ,
(prettier/prettier)
scripts/githooks/check-localstorage-usage.js
[error] 10-10: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 20-20: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 43-43: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 89-89: Insert ,
(prettier/prettier)
[error] 92-92: Insert ,
(prettier/prettier)
🪛 LanguageTool
CODE_OF_CONDUCT.md
[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...
(ENGLISH_WORD_REPEAT_RULE)
ISSUE_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a issu...
(IN_ORDER_TO_PREMIUM)
[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...
(EN_A_VS_AN)
[typographical] ~24-~24: Consider adding a comma here.
Context: ...> ___ ## Issue Management In all cases please use the [GitHub open issue search](http...
(PLEASE_COMMA)
[style] ~30-~30: Consider using a different verb for a more formal wording.
Context: .... 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...
(FIX_RESOLVE)
[style] ~35-~35: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...
(MAKE_STYLE_BETTER)
[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa
slack channel. Working on these types of exi...
(ON_SKYPE)
[grammar] ~53-~53: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github
slack channel for automatic issue and pull re...
(ON_SKYPE)
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...
(ON_SKYPE)
[typographical] ~57-~57: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep...
(PLEASE_COMMA)
README.md
[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.
(EN_COMPOUND_ADJECTIVE_INTERNAL)
CODE_STYLE.md
[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories of src
assets
- This houses all of the static assets used in the project - `...
(ALL_OF_THE)
[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project - css
- This houses all of the css files used in the project - `imag...
(ALL_OF_THE)
[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project - images
- This houses all of the images used in the project - scss
-...
(ALL_OF_THE)
[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project - scss
- This houses all of the scss files used in the project - `c...
(ALL_OF_THE)
[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms - _talawa.scss
- Partial Sass file for Talawa - _utilities.scss
- Pa...
(HE_VERB_AGR)
[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _utilities.scss
- Partial Sass file for utilities - _variables.scss
-...
(HE_VERB_AGR)
[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _variables.scss
- Partial Sass file for variables - app.scss
- Main S...
(HE_VERB_AGR)
[style] ~141-~141: Consider removing “of” to be more concise
Context: ...views/screens Constant
- This houses all of the constants used in the project `GraphQl...
(ALL_OF_THE)
[style] ~143-~143: Consider removing “of” to be more concise
Context: ...in the project GraphQl
- This houses all of the GraphQL queries and mutations used in t...
(ALL_OF_THE)
[style] ~145-~145: Consider removing “of” to be more concise
Context: ...in the project screens
- This houses all of the views/screens to be navigated through i...
(ALL_OF_THE)
[style] ~147-~147: Consider removing “of” to be more concise
Context: ... in Talawa-Admin state
- This houses all of the state management code for the project ...
(ALL_OF_THE)
[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
INSTALLATION.md
[duplication] ~25-~25: Possible typo: you repeated a word
Context: ...](#running-talawa-admin) - Accessing Talawa-Admin - [Talawa-Admin Registration](#talawa-admin-registratio...
(ENGLISH_WORD_REPEAT_RULE)
[typographical] ~55-~55: It appears that a comma is missing.
Context: ... that follow. # Prerequisites In this section we'll explain how to set up all the pre...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~61-~61: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: .... Basic git
knowledge is required for open source contribution so make sure you're comfor...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[uncategorized] ~61-~61: Possible missing comma found.
Context: ...` knowledge is required for open source contribution so make sure you're comfortable with it...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~64-~64: Possible missing comma found.
Context: ...ithub. ## Setting up this repository First you need a local copy of
talawa-admin`...
(AI_HYDRA_LEO_MISSING_COMMA)
[grammar] ~67-~67: The word “setup” is a noun. The verb is spelled with a space.
Context: ...avigate to the folder where you want to setup the repository. 2. Open a cmd
(Window...
(NOUN_VERB_CONFUSION)
[grammar] ~68-~68: The operating system from Apple is written “macOS”.
Context: ...cmd
(Windows) or terminal
(Linux or MacOS) session in this folder. 1. An easy ...
(MAC_OS)
[uncategorized] ~69-~69: Possible missing article found.
Context: ...to do this is to right-click and choose appropriate option based on your OS. 3. **For Our O...
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~70-~70: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...e option based on your OS. 3. For Our Open Source Contributor Software Developers: ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~102-~102: The operating system from Apple is written “macOS”.
Context: ...node.jspackages in Windows, Linux and MacOS. 1. For Windows: 1. first install
...
(MAC_OS)
[duplication] ~116-~116: Possible typo: you repeated a word
Context: ... 5. Save the document. 6. Exit notepad
7. Exit PowerShell 8. This will ensure...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~118-~118: Possible missing comma found.
Context: ...ou are always using the correct version of node.js
2. For Linux and MacOS, use t...
(AI_HYDRA_LEO_MISSING_COMMA)
[grammar] ~119-~119: The operating system from Apple is written “macOS”.
Context: ...t version of node.js
2. For Linux and MacOS, use the terminal window. 1. install...
(MAC_OS)
[grammar] ~123-~123: The word “setup” is a noun. The verb is spelled with a white space.
Context: ... the respective recommended commands to setup your node environment 3. This wil...
(NOUN_VERB_CONFUSION)
[uncategorized] ~130-~130: Possible missing comma found.
Context: ...stall TypeScript, you can use the npm
command which comes with node.js
: ```bash np...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~158-~158: Possible missing comma found.
Context: ...ions in "setup" can be done manually as well and here's how to do it. - [Creating .e...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~162-~162: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...at runtime. It is not a part of the repo and you will have to create it. For a sampl...
(COMMA_COMPOUND_SENTENCE)
[uncategorized] ~162-~162: Possible missing comma found.
Context: ...ve to create it. For a sample of .env
file there is a file named .env.example
in...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~224-~224: Possible missing preposition found.
Context: ... For additional details, please refer the
How to Access the Talawa-API URL` sect...
(AI_HYDRA_LEO_MISSING_TO)
[grammar] ~228-~228: The word “setup” is a noun. The verb is spelled with a space.
Context: ...E_KEY in .env file You may not want to setup reCAPTCHA since the project will still ...
(NOUN_VERB_CONFUSION)
[grammar] ~232-~232: The word “setup” is a noun. The verb is spelled with a space.
Context: ...ad the following steps. If you want to setup Google reCAPTCHA now, you may refer to ...
(NOUN_VERB_CONFUSION)
[uncategorized] ~234-~234: Possible missing comma found.
Context: ... service you set up during talawa-api
installation as shown in this screenshot: ![reCAPTC...
(AI_HYDRA_LEO_MISSING_COMMA)
[typographical] ~246-~246: Except for inverted sentences, ‘need them’ requires a question mark at the end of the sentence.
Context: ...t need them or want to keep the console clean # Post Configuration Steps It's now t...
(MD_PRP_QUESTION_MARK)
[uncategorized] ~261-~261: Did you mean: “By default,”?
Context: ...n serve ``` ## Accessing Talawa-Admin By default talawa-admin
runs on port `4321` on y...
(BY_DEFAULT_COMMA)
[uncategorized] ~278-~278: Possible missing comma found.
Context: ... navigate to the running talawa-admin's website you'll land at talawa-admin registratio...
(AI_HYDRA_LEO_MISSING_COMMA)
[grammar] ~311-~311: The word ‘lint’ is a noun or an adjective. A verb or adverb is missing or misspelled here, or maybe a comma is missing.
Context: ...w.webp) ## Linting code files You can lint your code files using this command: ``...
(PRP_MD_NN)
PR_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Pull Request Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a pull...
(IN_ORDER_TO_PREMIUM)
[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...
(SPLIT_INFINITIVE)
[style] ~56-~56: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...
(EN_WEAK_ADJECTIVE)
[uncategorized] ~56-~56: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
[style] ~59-~59: Consider using a different verb for a more formal wording.
Context: ...check if all tests are passing; if not, fix the issues and then create a pull reque...
(FIX_RESOLVE)
[style] ~64-~64: This expression is wordy and overused. Consider replacing it with a more concise and formal alternative.
Context: ...wer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the p...
(SOONER_OR_LATER)
[uncategorized] ~64-~64: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...adds to the pile of notifications we get and it won't make us look at your issue fas...
(COMMA_COMPOUND_SENTENCE)
[style] ~65-~65: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ue faster. 1. Do not force push. If you make changes to your pull request, please simply add a ...
(MAKE_CHANGES)
CONTRIBUTING.md
[style] ~27-~27: This expression usually appears with a “please” in front of it.
Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex...
(INSERT_PLEASE)
[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~62-~62: A determiner may be missing.
Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ...
(THE_SUPERLATIVE)
[uncategorized] ~68-~68: Loose punctuation mark.
Context: ...ushed to the main
branch: - develop
: For unstable code and bug fixing - `mai...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~69-~69: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d bug fixing - main
: Where the stable production ready code lies. This is our default branch. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[typographical] ~73-~73: Consider adding a comma.
Context: ...ultiple developers are working on issues there is bound to be a conflict of interest (...
(IF_THERE_COMMA)
[typographical] ~73-~73: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...licts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **Fir...
(RB_LY_COMMA)
[grammar] ~73-~73: Did you mean “served” (as in the idiom ‘first come, first served’)?
Context: ...ts are resolved in a First Come First Serve basis however there are certain excep...
(FIRST_SERVED)
[grammar] ~75-~75: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...tant to ask the author of the PR in the slack channel or in their PRs or issues thems...
(ON_SKYPE)
[style] ~77-~77: ‘Last but not the least’ might be wordy. Consider a shorter alternative.
Context: ...y and test that function when needed. - Last but not the least, communication is important make sure t...
(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_THE_LEAST)
[grammar] ~77-~77: It seems that “to” is missing before the verb.
Context: ...t the least, communication is important make sure to talk to other contributors, in ...
(MISSING_TO_BETWEEN_BE_AND_VB)
[grammar] ~77-~77: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ... other contributors, in these cases, in slack channel or in a issue/PR thread. - As a...
(ON_SKYPE)
[misspelling] ~77-~77: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... in these cases, in slack channel or in a issue/PR thread. - As a last resort the...
(EN_A_VS_AN)
[typographical] ~78-~78: It appears that a comma is missing.
Context: ...el or in a issue/PR thread. - As a last resort the Admins would be responsible for dec...
(DURING_THAT_TIME_COMMA)
[grammar] ~135-~135: The operating system from Apple is written “macOS”.
Context: ...r packages can be found for Windows and MacOS. 6. The currently acceptable c...
(MAC_OS)
[uncategorized] ~163-~163: Possible missing comma found.
Context: ...odecov/results.jpg)]() 1. After making changes you can add them to git locally using `...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~164-~164: Possible missing comma found.
Context: ...o add all changes). 1. After adding the changes you need to commit them using `git comm...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~165-~165: Possible missing comma found.
Context: ...using: git push origin <branch_name>
.(Here branch name must be name of the branch ...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~165-~165: Possible missing article found.
Context: ...: git push origin <branch_name>
.(Here branch name must be name of the branch you wan...
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~165-~165: Possible missing article found.
Context: ...branch_name>`.(Here branch name must be name of the branch you want to push the chan...
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~167-~167: Possible missing comma found.
Context: ...test suite passes, either locally or on CI once a PR has been created. 1. Review a...
(AI_HYDRA_LEO_MISSING_COMMA)
[grammar] ~178-~178: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...dation/talawa) for the link to join our slack channel. 1. We also have a technical em...
(ON_SKYPE)
.github/workflows/README.md
[uncategorized] ~13-~13: Possible missing comma found.
Context: ...ding on the type of workflow. Whenever possible you must ensure that: 1. The file roles...
(AI_HYDRA_LEO_MISSING_COMMA)
[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...ors: 1. Place all actions related to to this in the pull-request-target.yml
f...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~35-~35: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...orrectly if they have a dedicated file (eg. CodeQL
) ## Scripts Follow these gui...
(E_G)
DOCUMENTATION.md
[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...f docs.talawa.io
should automatically launched in your browser at http://localhost:300...
(MD_BASEFORM)
[grammar] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ttp://localhost:3000/ 1. Add/modify the markdown documents to the docs/
directory of t...
(MARKDOWN_NNP)
🪛 yamllint (1.35.1)
.github/workflows/pull-request-target.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 27-27: trailing spaces
(trailing-spaces)
[error] 28-28: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 33-33: trailing spaces
(trailing-spaces)
[error] 34-34: trailing spaces
(trailing-spaces)
[error] 36-36: trailing spaces
(trailing-spaces)
[error] 41-41: trailing spaces
(trailing-spaces)
[error] 46-46: trailing spaces
(trailing-spaces)
[error] 71-71: trailing spaces
(trailing-spaces)
.github/workflows/codeql-codescan.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
[warning] 37-37: wrong indentation: expected 11 but found 10
(indentation)
.github/workflows/pull-request.yml
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
[error] 126-126: trailing spaces
(trailing-spaces)
[error] 129-129: trailing spaces
(trailing-spaces)
[error] 150-150: trailing spaces
(trailing-spaces)
[error] 157-157: trailing spaces
(trailing-spaces)
[error] 197-197: trailing spaces
(trailing-spaces)
[error] 201-201: trailing spaces
(trailing-spaces)
[error] 204-204: trailing spaces
(trailing-spaces)
[error] 205-205: trailing spaces
(trailing-spaces)
[error] 213-213: trailing spaces
(trailing-spaces)
[error] 243-243: trailing spaces
(trailing-spaces)
[error] 249-249: trailing spaces
(trailing-spaces)
[error] 251-251: trailing spaces
(trailing-spaces)
.github/workflows/push.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 18-18: trailing spaces
(trailing-spaces)
[warning] 20-20: wrong indentation: expected 2 but found 4
(indentation)
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 50-50: trailing spaces
(trailing-spaces)
[warning] 62-62: too many blank lines
(1 > 0) (empty-lines)
.github/workflows/issue.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[warning] 15-15: wrong indentation: expected 4 but found 6
(indentation)
[warning] 66-66: too many blank lines
(1 > 0) (empty-lines)
.github/workflows/stale.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 21-21: trailing spaces
(trailing-spaces)
🪛 actionlint (1.7.4)
.github/workflows/codeql-codescan.yml
35-35: the runner of "github/codeql-action/init@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
41-41: the runner of "github/codeql-action/autobuild@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
44-44: the runner of "github/codeql-action/analyze@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/pull-request.yml
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
62-62: shellcheck reported issue in this script: SC2086:info:1:12: Double quote to prevent globbing and word splitting
(shellcheck)
79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
.github/workflows/issue.yml
29-29: the runner of "actions/github-script@v6" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/stale.yml
28-28: the runner of "actions/stale@v8" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 Markdownlint (0.35.0)
README.md
53-53: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
CODE_STYLE.md
128-128: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
129-129: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
130-130: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
131-131: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
132-132: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
133-133: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
134-134: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
135-135: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
136-136: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
137-137: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
164-164: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
165-165: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
166-166: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
57-57: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
73-73: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
75-75: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
92-92: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
190-190: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
230-230: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
58-58: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
65-65: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
78-78: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
95-95: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
158-158: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
173-173: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
181-181: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
239-239: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
245-245: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
251-251: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
INSTALLATION.md
321-321: Expected: h3; Actual: h4
Heading levels should only increment by one level at a time
(MD001, heading-increment)
33-33: Expected: 4; Actual: 6
Unordered list indentation
(MD007, ul-indent)
34-34: Expected: 4; Actual: 6
Unordered list indentation
(MD007, ul-indent)
95-95: null
Dollar signs used before commands without showing output
(MD014, commands-show-output)
105-105: null
Bare URL used
(MD034, no-bare-urls)
142-142: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
154-154: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
164-164: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
188-188: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
194-194: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
200-200: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
208-208: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
214-214: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
220-220: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
240-240: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
256-256: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
264-264: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
270-270: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
292-292: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
300-300: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
313-313: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
327-327: Expected: fenced; Actual: indented
Code block style
(MD046, code-block-style)
335-335: Expected: fenced; Actual: indented
Code block style
(MD046, code-block-style)
178-178: Expected: #setting-up-react_app_talawa_url-in-env-file; Actual: #setting-up-REACT_APP_TALAWA_URL-in-env-file
Link fragments should be valid
(MD051, link-fragments)
178-178: Expected: #setting-up-react_app_recaptcha_site_key-in-env-file; Actual: #setting-up-REACT_APP_RECAPTCHA_SITE_KEY-in-env-file
Link fragments should be valid
(MD051, link-fragments)
.github/ISSUE_TEMPLATE/feature-request.md
28-28: null
Bare URL used
(MD034, no-bare-urls)
25-25: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
PR_GUIDELINES.md
31-31: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
39-39: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
CONTRIBUTING.md
104-104: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
113-113: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
128-128: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
139-139: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
143-143: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
158-158: null
No empty links
(MD042, no-empty-links)
159-159: null
No empty links
(MD042, no-empty-links)
161-161: null
No empty links
(MD042, no-empty-links)
.github/ISSUE_TEMPLATE/bug-report.md
36-36: null
Bare URL used
(MD034, no-bare-urls)
33-33: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
DOCUMENTATION.md
25-25: null
Bare URL used
(MD034, no-bare-urls)
🪛 Ruff (0.8.0)
.github/workflows/eslint_disable_check.py
61-61: Loop control variable dirs
not used within loop body
Rename unused dirs
to _dirs
(B007)
.github/workflows/compare_translations.py
135-135: Within an except
clause, raise exceptions with raise ... from err
or raise ... from None
to distinguish them from errors in exception handling
(B904)
🔇 Additional comments (13)
.gitignore (3)
13-14
: LGTM! Improved test coverage ignores
The changes to coverage ignores are good:
- Using
coverage/
is more standard than-/coverage
- Adding
codecov
is appropriate for CI integration
31-37
: LGTM! Appropriate ignores for logs and editor files
Good additions:
- Ignoring debug logs prevents unnecessary files from being committed
- Editor-specific files are correctly ignored for major editors
Line range hint 21-25
: Verify presence of environment template file
Good practice to ignore all environment files. However, let's ensure developers can still set up their environments correctly.
✅ Verification successful
Environment template file is present and well-documented ✅
The repository includes a comprehensive .env.example
file that provides clear documentation and examples for all required environment variables, including:
- Development server port configuration
- API URL setup
- Google reCAPTCHA integration options
- WebSocket backend URL
- Logging preferences
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for the presence of environment template files
# Check if .env.example exists
if [ -f ".env.example" ]; then
echo "✅ .env.example exists"
echo "Contents:"
cat ".env.example"
else
echo "❌ No .env.example found. Consider adding a template file."
fi
Length of output: 1328
public/locales/fr/errors.json (1)
1-11
: Verify translations against other language files
Let's verify that all error keys are consistent across different language files and no translations are missing.
✅ Verification successful
All error translation keys are consistent across language files
The verification shows that all five language files (en, fr, hi, sp, zh) contain exactly the same set of error keys in the same order:
- emailNotRegistered
- errorLoading
- errorOccurredCouldntCreate
- errorSendingMail
- notAuthorised
- notFound
- notFoundMsg
- talawaApiUnavailable
- unknownError
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Compare error keys across all language files
# Expected: All language files should have the same set of keys
# List all error translation files
echo "Finding all error translation files..."
fd "errors.json" public/locales
# Extract and compare keys from each language file
echo "Comparing keys across language files..."
for file in $(fd "errors.json" public/locales); do
echo "Keys in $file:"
jq 'keys' "$file"
done
Length of output: 2235
.github/workflows/check-tsdoc.js (1)
61-65
: Exit with non-zero status only when necessary
Exiting the process with process.exit(1)
stops any subsequent code execution. Ensure this is the intended behavior, and consider handling errors more gracefully if appropriate.
Run the following script to check if exiting the process affects other parts of the workflow:
✅ Verification successful
Exit code 1 is appropriate for this TSDoc validation script
The process.exit(1)
usage in check-tsdoc.js is appropriate because:
- It's a validation script that runs as part of the PR workflow's "Code-Quality-Checks" job
- The script is designed to fail the CI pipeline when TSDoc comments are missing, which is the intended behavior
- It's executed as a standalone npm script (
npm run check-tsdoc
) in the workflow - The failure is properly handled by the CI pipeline, as it's part of a series of quality checks that must pass
- The script's exit doesn't affect other checks as each step in the workflow job is independent
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for any scripts or workflows that import and use check-tsdoc.js
# Test: Find all occurrences of check-tsdoc.js in workflow files
rg 'check-tsdoc\.js' .github/workflows/
Length of output: 41
Script:
#!/bin/bash
# Let's try a broader search to understand the context better
# Find all workflow YAML files
echo "=== Workflow files ==="
fd -e yml -e yaml . .github/workflows/
# Find all JavaScript files in .github directory
echo -e "\n=== JavaScript files in .github ==="
fd -e js . .github/
# Check the content of check-tsdoc.js to understand its usage
echo -e "\n=== Content of check-tsdoc.js ==="
cat .github/workflows/check-tsdoc.js
Length of output: 2413
Script:
#!/bin/bash
# Let's check how this script is used in the workflow files
# Check content of workflow files for any usage of check-tsdoc.js
echo "=== Checking workflow files for check-tsdoc.js usage ==="
for file in .github/workflows/*.{yml,yaml}; do
echo -e "\n=== Checking $file ==="
cat "$file" | grep -A 5 -B 5 "check-tsdoc"
done
Length of output: 2252
Script:
#!/bin/bash
# Let's check package.json to see how check-tsdoc is configured as an npm script
echo "=== Checking package.json for check-tsdoc script ==="
cat package.json | grep -A 5 -B 5 "check-tsdoc"
# Also check if there are any other jobs that might depend on this check
echo -e "\n=== Checking pull-request.yml for job dependencies ==="
cat .github/workflows/pull-request.yml
Length of output: 10190
.github/workflows/countline.py (1)
256-264
: Exclude comments more accurately when counting lines
The current method may not exclude all comment types (e.g., block comments). Consider using a parser or regular expressions to more accurately exclude comments from the line count.
Run the following script to check for different comment styles:
.husky/post-merge (1)
4-4
: Verify the reliability of the Git command for detecting package.json
changes
The command git diff HEAD^ HEAD --exit-code -- ./package.json
may not detect changes to package.json
in all scenarios, such as merge commits with multiple parents. This could result in npm install
not running when required.
Consider testing whether this command works correctly after different types of merges. Alternatively, you might use git diff-tree
for a more robust solution.
.github/ISSUE_TEMPLATE/bug-report.md (1)
2-6
: LGTM: Metadata changes follow conventions
The metadata changes improve consistency by:
- Using proper capitalization for "Bug Report"
- Following GitHub's convention of lowercase labels
- Standardizing quote usage
.github/ISSUE_TEMPLATE/feature-request.md (1)
2-6
: LGTM: Metadata changes follow conventions
The metadata changes improve consistency by:
- Using proper capitalization for "Feature Request"
- Using descriptive label "feature request"
- Standardizing quote usage
public/locales/hi/common.json (1)
79-79
: Verify placeholder syntax consistency
The placeholders in the translations use different styles:
{{text}}
in "searchResultsFor"{{item}}
in other messages
Consider standardizing the placeholder naming convention across all translations for better maintainability.
Also applies to: 83-85
CODE_OF_CONDUCT.md (1)
3-20
: LGTM!
The addition of a table of contents improves document navigation without affecting the test migration process.
🧰 Tools
🪛 LanguageTool
[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...
(ENGLISH_WORD_REPEAT_RULE)
package.json (2)
46-51
: Verify React 18 compatibility
The upgrade to React 18 (^18.3.1) is significant. Ensure all components are compatible with React 18's changes, particularly around:
- Automatic batching
- Concurrent features
- Strict Mode changes
77-78
: Review test script changes for Vitest migration
The addition of Vitest scripts alongside Jest scripts suggests a gradual migration. Ensure all test files are properly migrated and both test runners don't conflict.
✅ Verification successful
Migration to Vitest is already in progress and properly implemented
The test file Actions.test.tsx
is already using Vitest as evidenced by its imports (import { describe, it, beforeAll, beforeEach, afterAll, vi } from 'vitest'
). The presence of both Jest and Vitest configurations in package.json appears intentional for a gradual migration, and the test file is correctly using the new framework. No conflicts or issues were found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for any remaining Jest test files
rg -l "describe|test|it|expect.*\(" "src/screens/UserPortal/Volunteer/Actions"
Length of output: 247
Script:
#!/bin/bash
# Check the content of the test file to understand the test framework being used
rg "import.*jest|import.*vitest|test\(|describe\(|it\(|expect\(" "src/screens/UserPortal/Volunteer/Actions/Actions.test.tsx" -A 2
# Check if there are any Vitest test files
fd -e test.tsx -e spec.tsx -e test.ts -e spec.ts . src/screens/UserPortal/Volunteer/Actions --exec rg -l "import.*vitest"
# Check package.json for test configurations
rg "jest|vitest" package.json
Length of output: 4558
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.
Actionable comments posted: 7
🧹 Outside diff range and nitpick comments (13)
.github/workflows/codeql-codescan.yml (3)
1-11
: Fix trailing spaces in header commentThe header comment provides good documentation but contains trailing spaces.
-# Please read the README.md file in this directory that defines what should +# Please read the README.md file in this directory that defines what should🧰 Tools
🪛 yamllint (1.35.1)
[error] 6-6: trailing spaces
(trailing-spaces)
14-20
: Consider optimizing workflow triggersRunning CodeQL analysis on all branches might consume unnecessary GitHub Actions minutes. Consider limiting the analysis to:
- Pull requests (already configured)
- Main/master branch pushes
- Release branches
on: pull_request: branches: - - '**' + - 'main' + - 'master' push: branches: - - '**' + - 'main' + - 'master' + - 'release/**'🧰 Tools
🪛 yamllint (1.35.1)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
31-43
: Fix YAML indentationThe steps are well-configured but have inconsistent indentation.
- - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v3 + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3🧰 Tools
🪛 yamllint (1.35.1)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
[warning] 37-37: wrong indentation: expected 11 but found 10
(indentation)
.github/workflows/push.yml (5)
12-12
: Consider using a more descriptive workflow nameThe current name "push workflow" is generic. Consider renaming it to better reflect its purpose, such as "Test Coverage Analysis" or "Code Coverage Report".
-name: push workflow +name: Test Coverage Analysis
14-18
: Fix YAML formattingRemove trailing spaces to improve YAML file formatting.
on: push: branches: - - '**' - + - '**'🧰 Tools
🪛 yamllint (1.35.1)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 18-18: trailing spaces
(trailing-spaces)
19-21
: Fix YAML indentationAdjust the indentation to follow YAML standards (2 spaces).
env: - CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }} + CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}🧰 Tools
🪛 yamllint (1.35.1)
[warning] 20-20: wrong indentation: expected 2 but found 4
(indentation)
[error] 21-21: trailing spaces
(trailing-spaces)
56-61
: Consider enabling CI failure on coverage upload errorsThe Codecov upload step is configured to not fail the CI on errors. This might hide potential issues with coverage reporting.
uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} verbose: true - fail_ci_if_error: false + fail_ci_if_error: true name: '${{env.CODECOV_UNIQUE_NAME}}'
54-54
: Consider adding coverage threshold checkSince this PR involves test migration and maintaining 100% coverage, consider adding a coverage threshold check to ensure coverage doesn't drop.
Would you like me to provide an example of how to configure Vitest with coverage thresholds?
.lintstagedrc.json (1)
2-2
: Consider combining duplicate patternsThe pattern
"**/*.{ts,tsx}"
appears twice with different commands. While this works, it might be more maintainable to combine them into a single pattern with an array of commands:{ - "**/*.{ts,tsx}": "eslint --fix", + "**/*.{ts,tsx}": [ + "eslint --fix", + "node scripts/githooks/check-localstorage-usage.js" + ], "**/*.{ts,tsx,json,scss,css,yml}": "prettier --write", - "**/*.{ts,tsx}": "node scripts/githooks/check-localstorage-usage.js" }Also applies to: 4-4
🧰 Tools
🪛 Biome (1.9.4)
[error] 2-2: The key **/*.{ts,tsx} was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
scripts/githooks/check-localstorage-usage.js (1)
82-96
: Consider adding performance optimization for large repositoriesFor large repositories, processing files sequentially might be slow. Consider adding a batch processing option:
- Process files in parallel using worker threads for large repositories
- Add a
--max-files
option to limit processing in large repositories- Consider caching results for unchanged files
Would you like me to provide an implementation example?
setup.ts (2)
86-95
: Improve websocket URL transformation robustnessThe current websocket URL transformation might fail for complex URLs. Consider using URL API for more reliable protocol conversion.
- const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); + const url = new URL(endpoint); + const websocketUrl = `ws${url.protocol === 'https:' ? 's' : ''}://${url.host}${url.pathname}`;
10-182
: Implement comprehensive error handling strategyThe setup script handles critical configuration but lacks consistent error handling across various operations.
Consider:
- Implementing a global error handler
- Adding proper error messages for each operation
- Providing recovery options where possible
- Logging errors for debugging
Example structure:
async function handleOperation(operation: () => Promise<void>, errorMessage: string) { try { await operation(); } catch (error) { console.error(`${errorMessage}:`, error); const { retry } = await inquirer.prompt({ type: 'confirm', name: 'retry', message: 'Would you like to retry this operation?', default: true, }); if (retry) { await handleOperation(operation, errorMessage); } else { process.exit(1); } } }.github/workflows/pull-request.yml (1)
97-119
: Enhance sensitive file protectionConsider adding more security-sensitive files to the protected list:
- Version control files (.git*)
- Environment files (*.env)
- Security configuration files
Apply this diff:
files: | .github/** + .git* env.example + *.env .node-version
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (12)
.github/ISSUE_TEMPLATE/bug-report.md
(2 hunks).github/ISSUE_TEMPLATE/feature-request.md
(2 hunks).github/workflows/codeql-codescan.yml
(1 hunks).github/workflows/pull-request.yml
(1 hunks).github/workflows/push.yml
(1 hunks).lintstagedrc.json
(1 hunks)schema.graphql
(1 hunks)scripts/__mocks__/@dicebear/collection.ts
(1 hunks)scripts/__mocks__/@pdfme/generator.test.ts
(1 hunks)scripts/githooks/check-localstorage-usage.js
(1 hunks)scripts/vitest-setup.ts
(1 hunks)setup.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- scripts/mocks/@dicebear/collection.ts
- .github/ISSUE_TEMPLATE/feature-request.md
- .github/ISSUE_TEMPLATE/bug-report.md
- scripts/mocks/@pdfme/generator.test.ts
🧰 Additional context used
📓 Learnings (1)
scripts/githooks/check-localstorage-usage.js (1)
Learnt from: MayankJha014
PR: PalisadoesFoundation/talawa-admin#2612
File: scripts/githooks/check-localstorage-usage.js:10-18
Timestamp: 2024-12-07T14:25:09.928Z
Learning: TypeScript type annotations should not be added to JavaScript (`.js`) files in this project. Type annotations can only be used in TypeScript (`.ts` or `.tsx`) files.
🪛 yamllint (1.35.1)
.github/workflows/codeql-codescan.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
[warning] 37-37: wrong indentation: expected 11 but found 10
(indentation)
.github/workflows/pull-request.yml
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
[error] 128-128: trailing spaces
(trailing-spaces)
[error] 131-131: trailing spaces
(trailing-spaces)
[error] 152-152: trailing spaces
(trailing-spaces)
[error] 159-159: trailing spaces
(trailing-spaces)
[error] 199-199: trailing spaces
(trailing-spaces)
[error] 203-203: trailing spaces
(trailing-spaces)
[error] 206-206: trailing spaces
(trailing-spaces)
[error] 207-207: trailing spaces
(trailing-spaces)
[error] 215-215: trailing spaces
(trailing-spaces)
[error] 245-245: trailing spaces
(trailing-spaces)
[error] 251-251: trailing spaces
(trailing-spaces)
[error] 253-253: trailing spaces
(trailing-spaces)
.github/workflows/push.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 18-18: trailing spaces
(trailing-spaces)
[warning] 20-20: wrong indentation: expected 2 but found 4
(indentation)
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 50-50: trailing spaces
(trailing-spaces)
[warning] 62-62: too many blank lines
(1 > 0) (empty-lines)
🪛 actionlint (1.7.4)
.github/workflows/pull-request.yml
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 Biome (1.9.4)
.lintstagedrc.json
[error] 2-2: The key **/*.{ts,tsx} was already declared.
This where a duplicated key was declared again.
If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.
(lint/suspicious/noDuplicateObjectKeys)
🪛 eslint
scripts/githooks/check-localstorage-usage.js
[error] 10-10: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 20-20: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
[error] 43-43: Missing return type on function.
(@typescript-eslint/explicit-function-return-type)
🔇 Additional comments (10)
.github/workflows/codeql-codescan.yml (1)
21-30
: LGTM! Job configuration follows best practices
The job configuration is well structured with:
- Appropriate Dependabot exclusion
- Correct runner selection
- Focused language matrix
.github/workflows/push.yml (1)
54-54
: LGTM: Test command correctly uses Vitest
The workflow has been properly updated to use test:vitest
command, which aligns with the PR objective of migrating from Jest to Vitest.
.lintstagedrc.json (1)
3-3
: Verify YAML file handling
The pattern includes .yml
files for Prettier formatting. Ensure that your Prettier configuration properly handles YAML files.
#!/bin/bash
# Check if prettier is configured for YAML
prettier --help | grep -i "yml\|yaml"
scripts/vitest-setup.ts (1)
1-7
: LGTM! Standard Vitest setup with necessary test environment configuration.
The setup correctly:
- Imports and configures TextEncoder/Decoder for tests requiring text encoding
- Includes jest-dom matchers for DOM testing assertions
- Follows best practices for test environment configuration
setup.ts (1)
74-75
: Previous concerns about checkConnection
implementation remain valid
The implementation still has the issues mentioned in the previous review regarding Promise handling, timeout management, and error scenarios.
.github/workflows/pull-request.yml (2)
225-228
: LGTM: Test coverage threshold is appropriate
The minimum coverage threshold of 95% is well-aligned with the PR's objective of maintaining high test coverage.
61-62
:
Fix potential command injection vulnerability
The unquoted shell variable ${CHANGED_FILES}
could lead to command injection. Always quote shell variables to prevent word splitting and globbing.
Apply this diff:
- run: npx eslint ${CHANGED_FILES} && python .github/workflows/eslint_disable_check.py
+ run: npx eslint "${CHANGED_FILES}" && python .github/workflows/eslint_disable_check.py
Likely invalid or redundant comment.
🧰 Tools
🪛 actionlint (1.7.4)
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
schema.graphql (3)
1091-1091
: LGTM: Query return type matches parameter cardinality
The venue
query correctly returns a single Venue
type when querying by a single ID.
1227-1265
:
Remove duplicate enum definitions
The following enums are defined twice:
EducationGrade
EmploymentStatus
Gender
MaritalStatus
Remove these duplicate definitions to prevent schema validation errors.
Apply this diff to remove all duplicates:
-enum EducationGrade {
- GRADE_1
- GRADE_2
- GRADE_3
- GRADE_4
- GRADE_5
- GRADE_6
- GRADE_7
- GRADE_8
- GRADE_9
- GRADE_10
- GRADE_11
- GRADE_12
- GRADUATE
- KG
- NO_GRADE
- PRE_KG
-}
-enum EmploymentStatus {
- FULL_TIME
- PART_TIME
- UNEMPLOYED
-}
-enum Gender {
- FEMALE
- MALE
- OTHER
-}
-enum MaritalStatus {
- DIVORCED
- ENGAGED
- MARRIED
- SEPERATED
- SINGLE
- WIDOWED
-}
Likely invalid or redundant comment.
1216-1225
:
Remove duplicate input type definition
The AddressInput
type is already defined at lines 43-52. Remove this duplicate definition.
Apply this diff:
-input AddressInput {
- city: String
- countryCode: String
- dependentLocality: String
- line1: String
- line2: String
- postalCode: String
- sortingCode: String
- state: String
-}
Likely invalid or redundant comment.
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.
Actionable comments posted: 13
🧹 Outside diff range and nitpick comments (14)
ISSUE_GUIDELINES.md (4)
32-37
: Use consistent markdown list numberingThe ordered list uses inconsistent numbering. While markdown will render it correctly, it's better to use sequential numbers for maintainability.
Apply this change:
-1. Your issue may have already been created. Search for duplicate open issues before submitting yours to avoid similar deficiencies in the code. -1. Verify whether the issue has been fixed by trying to reproduce it using the latest master or development branch in the repository. -1. Click on the [`New Issue`](https://github.com/PalisadoesFoundation/talawa-admin/issues/new/choose) button -1. Use the templates to create a standardized report of what needs to be done and why. -1. If you want to be assigned the issue that you have created, then add a comment immediately after submitting it. +1. Your issue may have already been created. Search for duplicate open issues before submitting yours to avoid similar deficiencies in the code. +2. Verify whether the issue has been fixed by trying to reproduce it using the latest master or development branch in the repository. +3. Click on the [`New Issue`](https://github.com/PalisadoesFoundation/talawa-admin/issues/new/choose) button +4. Use the templates to create a standardized report of what needs to be done and why. +5. If you want to be assigned the issue that you have created, then add a comment immediately after submitting it.🧰 Tools
🪛 LanguageTool
[style] ~33-~33: Consider using a different verb for a more formal wording.
Context: ...e. 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...(FIX_RESOLVE)
47-47
: Capitalize "Slack" as it's a proper nounThe word "slack" should be capitalized as it's a product name.
- 2. Ask our contributors to assign it to you in `#talawa` slack channel. + 2. Ask our contributors to assign it to you in `#talawa` Slack channel.🧰 Tools
🪛 LanguageTool
[grammar] ~47-~47: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in#talawa
slack channel. Working on these types of exi...(ON_SKYPE)
57-57
: Capitalize "Slack" as it's a proper nounThe word "slack" should be capitalized as it's a product name.
-1. Join our `#talawa-github` slack channel for automatic issue and pull request updates. +1. Join our `#talawa-github` Slack channel for automatic issue and pull request updates.🧰 Tools
🪛 LanguageTool
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our#talawa-github
slack channel for automatic issue and pull re...(ON_SKYPE)
61-61
: Capitalize "Slack" as it's a proper nounThe word "slack" should be capitalized as it's a product name.
-1. Discuss issues in our various slack channels when necessary +1. Discuss issues in our various Slack channels when necessary🧰 Tools
🪛 LanguageTool
[grammar] ~61-~61: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...(ON_SKYPE)
[typographical] ~61-~61: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep ...(PLEASE_COMMA)
schema.graphql (2)
1-3
: Enhance @auth directive with clear authentication requirements.The
@auth
directive should specify the authentication requirements more explicitly.Consider adding parameters to define authentication requirements:
-directive @auth on FIELD_DEFINITION +directive @auth( + requires: AuthRequirement = USER +) on FIELD_DEFINITION + +enum AuthRequirement { + USER + ADMIN + SUPERADMIN + NONE +}
136-141
: Add input validation directives.Input types lack field validations for required constraints like string length, numeric ranges, etc.
Consider adding validation directives:
+directive @constraint( + minLength: Int + maxLength: Int + min: Int + max: Int + pattern: String +) on INPUT_FIELD_DEFINITION input CheckInInput { allotedRoom: String @constraint(maxLength: 100) allotedSeat: String @constraint(maxLength: 50) - eventId: ID! - userId: ID! + eventId: ID! @constraint(pattern: "^[0-9a-fA-F]{24}$") + userId: ID! @constraint(pattern: "^[0-9a-fA-F]{24}$") }Also applies to: 184-190, 414-418
.eslintrc.json (1)
77-122
: Consider moving TypeScript naming conventions to a separate PRWhile the TypeScript naming conventions are well-defined, they represent a significant change that's unrelated to the Vitest migration. Consider moving these rules to a separate PR to maintain focused changes.
.github/workflows/issue.yml (2)
21-48
: Consider optimizing the label assignment logicThe current implementation makes multiple API calls for label management. Consider combining the label operations to reduce API calls.
- const labels = await github.rest.issues.listLabelsOnIssue(apiParams); - if(labels.data.reduce((a, c)=>a||["dependencies"].includes(c.name), false)) - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ["good first issue", "security"] - }); - else if(labels.data.reduce((a, c)=>a||["security", "ui/ux"].includes(c.name), false)) - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: ["good first issue"] - }); + const labels = await github.rest.issues.listLabelsOnIssue(apiParams); + const labelNames = labels.data.map(label => label.name); + const labelsToAdd = new Set(); + + if (labelNames.some(name => ["dependencies"].includes(name))) { + labelsToAdd.add("good first issue"); + labelsToAdd.add("security"); + } else if (labelNames.some(name => ["security", "ui/ux"].includes(name))) { + labelsToAdd.add("good first issue"); + } + + if (labelsToAdd.size > 0) { + await github.rest.issues.addLabels({ + ...apiParams, + labels: Array.from(labelsToAdd) + }); + }
58-65
: Consider adding a welcome message for first-time contributorsThe greeting message could be enhanced to include information about the project's development process and community guidelines.
- issue-message: "Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md) and [Issue Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/ISSUE_GUIDELINES.md) to ensure that you are following our guidelines for contributing and making issues." + issue-message: | + 👋 Welcome to Talawa Admin! Congratulations on making your first Issue! :confetti_ball: + + To help you get started: + 1. Read our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/CONTRIBUTING.md) + 2. Review our [Issue Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa-admin/blob/develop/ISSUE_GUIDELINES.md) + 3. Join our [Slack community](https://join.slack.com/t/thepalisadoes-dyb1131/shared_invite/your-actual-slack-invite-link) for real-time discussions + + We're excited to have you contribute to our project! 🎉README.md (1)
45-51
: Consider adding version compatibility informationThe installation section could benefit from information about version compatibility and system requirements.
1. You can install the software for this repository using the steps in our [INSTALLATION.md](INSTALLATION.md) file. +1. Before installation, ensure your system meets these requirements: + - Node.js (version X.X or higher) + - npm (version X.X or higher) + - Other dependencies... 1. Do you want to contribute to our code base? Look at our [CONTRIBUTING.md](CONTRIBUTING.md) file to get started..github/workflows/pull-request-target.yml (1)
36-42
: Enhance code quality criteria explanationThe PR review policy could benefit from more specific code quality criteria and examples.
1. We don't merge PRs with poor code quality. 1. Follow coding best practices such that CodeRabbit.ai approves your PR. + 1. Ensure your code follows: + - SOLID principles + - DRY (Don't Repeat Yourself) + - Proper error handling + - Consistent naming conventions 1. We don't merge PRs with failed tests.🧰 Tools
🪛 yamllint (1.35.1)
[error] 36-36: trailing spaces
(trailing-spaces)
[error] 38-38: trailing spaces
(trailing-spaces)
PR_GUIDELINES.md (2)
11-16
: Enhance table of contents structureThe table of contents appears incomplete as it only shows one subsection under "Pull Request Processing". Consider adding all major sections with their respective subsections for better navigation.
- [Pull Requests and Issues](#pull-requests-and-issues) - [Linting and Formatting](#linting-and-formatting) - [Testing](#testing) - [Pull Request Processing](#pull-request-processing) + - [Draft Pull Requests](#draft-pull-requests) + - [Single Pull Request Rule](#single-pull-request-rule) + - [Code Quality Standards](#code-quality-standards) + - [Work in Progress](#work-in-progress) - [Only submit PRs against our `develop` branch, not the default `main` branch](#only-submit-prs-against-our-develop-branch-not-the-default-main-branch)
46-46
: Fix split infinitive in testing requirementsThere's a grammatical issue with the split infinitive "to manually test".
-1. All pull requests must include Vitest test units. If, for some reason, it is not possible to add tests, please let us know and explain why. In that case, you'll need to tell us what steps you followed to manually test your changes. +1. All pull requests must include Vitest test units. If, for some reason, it is not possible to add tests, please let us know and explain why. In that case, you'll need to tell us what steps you followed to test your changes manually.🧰 Tools
🪛 LanguageTool
[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...(SPLIT_INFINITIVE)
.github/workflows/pull-request.yml (1)
224-229
: Consider adding granular coverage thresholdsWhile the overall coverage threshold is good, consider adding specific thresholds for statements, branches, and functions.
- name: Test acceptable level of code coverage uses: VeryGoodOpenSource/very_good_coverage@v2 with: path: "./coverage/lcov.info" - min_coverage: 95.0 + min_coverage: 95.0 + exclude: "**/*.test.{ts,tsx}" # Exclude test files from coverage + thresholds: + statements: 95 + branches: 90 + functions: 95 + lines: 95
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (12)
.eslintrc.json
(4 hunks).github/workflows/issue.yml
(1 hunks).github/workflows/pull-request-target.yml
(1 hunks).github/workflows/pull-request.yml
(1 hunks).github/workflows/talawa_admin_md_mdx_format_adjuster.py
(1 hunks)ISSUE_GUIDELINES.md
(1 hunks)PR_GUIDELINES.md
(1 hunks)README.md
(3 hunks)package.json
(2 hunks)schema.graphql
(1 hunks)scripts/githooks/check-localstorage-usage.js
(1 hunks)setup.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- scripts/githooks/check-localstorage-usage.js
- .github/workflows/talawa_admin_md_mdx_format_adjuster.py
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.
(EN_COMPOUND_ADJECTIVE_INTERNAL)
ISSUE_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a issu...
(IN_ORDER_TO_PREMIUM)
[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...
(EN_A_VS_AN)
[typographical] ~26-~26: Consider adding a comma here.
Context: ... --- ## Issue Management In all cases please use the [GitHub open issue search](http...
(PLEASE_COMMA)
[style] ~33-~33: Consider using a different verb for a more formal wording.
Context: ...e. 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...
(FIX_RESOLVE)
[style] ~38-~38: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...
(MAKE_STYLE_BETTER)
[grammar] ~47-~47: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa
slack channel. Working on these types of exi...
(ON_SKYPE)
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github
slack channel for automatic issue and pull re...
(ON_SKYPE)
[grammar] ~61-~61: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...
(ON_SKYPE)
[typographical] ~61-~61: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep ...
(PLEASE_COMMA)
PR_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Pull Request Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a pull...
(IN_ORDER_TO_PREMIUM)
[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...
(SPLIT_INFINITIVE)
[style] ~57-~57: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...
(EN_WEAK_ADJECTIVE)
[uncategorized] ~57-~57: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
[style] ~60-~60: Consider using a different verb for a more formal wording.
Context: ...check if all tests are passing; if not, fix the issues and then create a pull reque...
(FIX_RESOLVE)
[style] ~65-~65: This expression is wordy and overused. Consider replacing it with a more concise and formal alternative.
Context: ...wer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the p...
(SOONER_OR_LATER)
[uncategorized] ~65-~65: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...adds to the pile of notifications we get and it won't make us look at your issue fas...
(COMMA_COMPOUND_SENTENCE)
[style] ~66-~66: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ue faster. 1. Do not force push. If you make changes to your pull request, please simply add a ...
(MAKE_CHANGES)
🪛 yamllint (1.35.1)
.github/workflows/issue.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[warning] 15-15: wrong indentation: expected 4 but found 6
(indentation)
[warning] 66-66: too many blank lines
(1 > 0) (empty-lines)
.github/workflows/pull-request-target.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
[error] 30-30: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 33-33: trailing spaces
(trailing-spaces)
[error] 35-35: trailing spaces
(trailing-spaces)
[error] 36-36: trailing spaces
(trailing-spaces)
[error] 38-38: trailing spaces
(trailing-spaces)
[error] 43-43: trailing spaces
(trailing-spaces)
[error] 48-48: trailing spaces
(trailing-spaces)
[error] 73-73: trailing spaces
(trailing-spaces)
[error] 81-81: no new line character at the end of file
(new-line-at-end-of-file)
.github/workflows/pull-request.yml
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
[error] 128-128: trailing spaces
(trailing-spaces)
[error] 131-131: trailing spaces
(trailing-spaces)
[error] 152-152: trailing spaces
(trailing-spaces)
[error] 159-159: trailing spaces
(trailing-spaces)
[error] 199-199: trailing spaces
(trailing-spaces)
[error] 203-203: trailing spaces
(trailing-spaces)
[error] 206-206: trailing spaces
(trailing-spaces)
[error] 207-207: trailing spaces
(trailing-spaces)
[error] 215-215: trailing spaces
(trailing-spaces)
[error] 245-245: trailing spaces
(trailing-spaces)
[error] 256-256: trailing spaces
(trailing-spaces)
[error] 258-258: trailing spaces
(trailing-spaces)
🪛 actionlint (1.7.4)
.github/workflows/pull-request-target.yml
77-77: unexpected key "permissions" for "step" section. expected one of "continue-on-error", "env", "id", "if", "name", "run", "shell", "timeout-minutes", "uses", "with", "working-directory"
(syntax-check)
.github/workflows/pull-request.yml
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 Markdownlint (0.35.0)
PR_GUIDELINES.md
31-31: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
39-39: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (9)
ISSUE_GUIDELINES.md (2)
9-21
: LGTM!
The table of contents is well-structured with proper markdown formatting and clear hierarchy.
32-32
: Fix duplicate text in search instruction
The sentence contains duplicate text that was previously identified.
schema.graphql (1)
1084-1084
:
Fix return type for venue query.
The venue
query accepts an ID parameter but returns an array of venues. When querying by a unique identifier, it should return a single venue.
Update the return type:
- venue(id: ID!): [Venue]
+ venue(id: ID!): Venue
Likely invalid or redundant comment.
.eslintrc.json (1)
33-39
: LGTM! Plugins configuration is aligned with Vitest migration
The plugins section correctly removes Jest-related plugins and includes necessary ones for TypeScript and code quality.
package.json (1)
8-71
:
Clean up test-related dependencies
The dependencies section includes both Jest and Vitest-related packages. Since we're migrating to Vitest, we should remove Jest-related dependencies.
Remove these Jest-related packages:
- "@apollo/react-testing": "^4.0.0",
- "jest": "^27.4.5",
- "jest-localstorage-mock": "^2.4.19",
- "jest-location-mock": "^2.0.0",
- "jest-preview": "^0.3.1",
Likely invalid or redundant comment.
README.md (1)
3-3
:
Update Slack invite link placeholder
The Slack invite link appears to be a placeholder. Please replace it with the actual invite link.
- [💬 Join the community on Slack](https://join.slack.com/t/thepalisadoes-dyb1131/shared_invite/your-actual-slack-invite-link)
+ [💬 Join the community on Slack](https://join.slack.com/t/your-workspace/shared_invite/your-actual-invite-link)
Likely invalid or redundant comment.
.github/workflows/pull-request.yml (1)
241-241
:
Standardize Node.js version across jobs
The workflow uses Node.js 20.x in other jobs but 22.x here. Using a development version (22.x) could lead to instability.
- node-version: '22.x'
+ node-version: '20.x'
Likely invalid or redundant comment.
setup.ts (2)
1-11
: LGTM! Clean imports and clear function declaration.
The imports are well-organized and the main function is properly declared as async.
186-201
: 🛠️ Refactor suggestion
Modernize error logging setup with async/await
The error logging setup uses outdated callback-style operations and lacks error handling.
Apply this diff:
if (shouldLogErrors) {
- const logErrors = dotenv.parse(fs.readFileSync('.env')).ALLOW_LOGS;
- fs.readFile('.env', 'utf8', (err, data) => {
- const result = data.replace(`ALLOW_LOGS=${logErrors}`, 'ALLOW_LOGS=YES');
- fs.writeFileSync('.env', result, 'utf8');
- });
+ try {
+ const data = await fs.promises.readFile('.env', 'utf8');
+ const config = dotenv.parse(data);
+ await updateEnvFile('ALLOW_LOGS', config.ALLOW_LOGS, 'YES');
+ } catch (error) {
+ console.error('Failed to update error logging configuration:', error);
+ process.exit(1);
+ }
}
Likely invalid or redundant comment.
let shouldSetTalawaApiUrl: boolean; | ||
|
||
if (process.env.REACT_APP_TALAWA_URL) { | ||
console.log( | ||
`\nEndpoint for accessing talawa-api graphql service already exists with the value:\n${process.env.REACT_APP_TALAWA_URL}`, | ||
); | ||
shouldSetTalawaApiUrl = true; | ||
} else { | ||
const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ | ||
type: 'confirm', | ||
name: 'shouldSetTalawaApiUrlResponse', | ||
message: 'Would you like to set up talawa-api endpoint?', | ||
default: true, | ||
}); | ||
shouldSetTalawaApiUrl = shouldSetTalawaApiUrlResponse; | ||
} | ||
|
||
if (shouldSetTalawaApiUrl) { | ||
let isConnected = false, | ||
endpoint = ''; | ||
|
||
while (!isConnected) { | ||
endpoint = await askForTalawaApiUrl(); | ||
|
||
// Validate and parse URL directly | ||
let url; | ||
try { | ||
url = new URL(endpoint); | ||
} catch { | ||
console.error('Invalid URL. Please provide a valid Talawa API URL.'); | ||
continue; | ||
} | ||
|
||
isConnected = await checkConnection(url.origin); | ||
} | ||
const envPath = '.env'; | ||
const currentEnvContent = fs.readFileSync(envPath, 'utf8'); | ||
const talawaApiUrl = dotenv.parse(currentEnvContent).REACT_APP_TALAWA_URL; | ||
|
||
const updatedEnvContent = currentEnvContent.replace( | ||
`REACT_APP_TALAWA_URL=${talawaApiUrl}`, | ||
`REACT_APP_TALAWA_URL=${endpoint}`, | ||
); | ||
|
||
fs.writeFileSync(envPath, updatedEnvContent, 'utf8'); | ||
const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); | ||
const currentWebSocketUrl = | ||
dotenv.parse(updatedEnvContent).REACT_APP_BACKEND_WEBSOCKET_URL; | ||
|
||
const finalEnvContent = updatedEnvContent.replace( | ||
`REACT_APP_BACKEND_WEBSOCKET_URL=${currentWebSocketUrl}`, | ||
`REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`, | ||
); | ||
|
||
fs.writeFileSync(envPath, finalEnvContent, 'utf8'); | ||
} |
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.
🛠️ Refactor suggestion
Improve API URL setup with consistent async operations and better error handling
Several improvements needed:
- Replace sync file operations with async ones
- Add timeout to connection check
- Add proper error handling for file operations
Apply this diff:
if (shouldSetTalawaApiUrl) {
let isConnected = false,
endpoint = '';
while (!isConnected) {
endpoint = await askForTalawaApiUrl();
let url;
try {
url = new URL(endpoint);
- isConnected = await checkConnection(url.origin);
+ isConnected = await Promise.race([
+ checkConnection(url.origin),
+ new Promise((_, reject) =>
+ setTimeout(() => reject(new Error('Connection timeout')), 5000)
+ )
+ ]);
} catch (error) {
console.error('Error:', error.message);
continue;
}
}
try {
- const envPath = '.env';
- const currentEnvContent = fs.readFileSync(envPath, 'utf8');
+ const currentEnvContent = await fs.promises.readFile('.env', 'utf8');
const config = dotenv.parse(currentEnvContent);
let updatedContent = currentEnvContent.replace(
`REACT_APP_TALAWA_URL=${config.REACT_APP_TALAWA_URL}`,
`REACT_APP_TALAWA_URL=${endpoint}`
);
const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://');
updatedContent = updatedContent.replace(
`REACT_APP_BACKEND_WEBSOCKET_URL=${config.REACT_APP_BACKEND_WEBSOCKET_URL}`,
`REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`
);
- fs.writeFileSync(envPath, updatedContent, 'utf8');
+ await fs.promises.writeFile('.env', updatedContent, 'utf8');
+ } catch (error) {
+ console.error('Failed to update API configuration:', error);
+ process.exit(1);
+ }
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
let shouldSetTalawaApiUrl: boolean; | |
if (process.env.REACT_APP_TALAWA_URL) { | |
console.log( | |
`\nEndpoint for accessing talawa-api graphql service already exists with the value:\n${process.env.REACT_APP_TALAWA_URL}`, | |
); | |
shouldSetTalawaApiUrl = true; | |
} else { | |
const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ | |
type: 'confirm', | |
name: 'shouldSetTalawaApiUrlResponse', | |
message: 'Would you like to set up talawa-api endpoint?', | |
default: true, | |
}); | |
shouldSetTalawaApiUrl = shouldSetTalawaApiUrlResponse; | |
} | |
if (shouldSetTalawaApiUrl) { | |
let isConnected = false, | |
endpoint = ''; | |
while (!isConnected) { | |
endpoint = await askForTalawaApiUrl(); | |
// Validate and parse URL directly | |
let url; | |
try { | |
url = new URL(endpoint); | |
} catch { | |
console.error('Invalid URL. Please provide a valid Talawa API URL.'); | |
continue; | |
} | |
isConnected = await checkConnection(url.origin); | |
} | |
const envPath = '.env'; | |
const currentEnvContent = fs.readFileSync(envPath, 'utf8'); | |
const talawaApiUrl = dotenv.parse(currentEnvContent).REACT_APP_TALAWA_URL; | |
const updatedEnvContent = currentEnvContent.replace( | |
`REACT_APP_TALAWA_URL=${talawaApiUrl}`, | |
`REACT_APP_TALAWA_URL=${endpoint}`, | |
); | |
fs.writeFileSync(envPath, updatedEnvContent, 'utf8'); | |
const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); | |
const currentWebSocketUrl = | |
dotenv.parse(updatedEnvContent).REACT_APP_BACKEND_WEBSOCKET_URL; | |
const finalEnvContent = updatedEnvContent.replace( | |
`REACT_APP_BACKEND_WEBSOCKET_URL=${currentWebSocketUrl}`, | |
`REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`, | |
); | |
fs.writeFileSync(envPath, finalEnvContent, 'utf8'); | |
} | |
let shouldSetTalawaApiUrl: boolean; | |
if (process.env.REACT_APP_TALAWA_URL) { | |
console.log( | |
`\nEndpoint for accessing talawa-api graphql service already exists with the value:\n${process.env.REACT_APP_TALAWA_URL}`, | |
); | |
shouldSetTalawaApiUrl = true; | |
} else { | |
const { shouldSetTalawaApiUrlResponse } = await inquirer.prompt({ | |
type: 'confirm', | |
name: 'shouldSetTalawaApiUrlResponse', | |
message: 'Would you like to set up talawa-api endpoint?', | |
default: true, | |
}); | |
shouldSetTalawaApiUrl = shouldSetTalawaApiUrlResponse; | |
} | |
if (shouldSetTalawaApiUrl) { | |
let isConnected = false, | |
endpoint = ''; | |
while (!isConnected) { | |
endpoint = await askForTalawaApiUrl(); | |
let url; | |
try { | |
url = new URL(endpoint); | |
isConnected = await Promise.race([ | |
checkConnection(url.origin), | |
new Promise((_, reject) => | |
setTimeout(() => reject(new Error('Connection timeout')), 5000) | |
) | |
]); | |
} catch (error) { | |
console.error('Error:', error.message); | |
continue; | |
} | |
} | |
try { | |
const currentEnvContent = await fs.promises.readFile('.env', 'utf8'); | |
const config = dotenv.parse(currentEnvContent); | |
let updatedContent = currentEnvContent.replace( | |
`REACT_APP_TALAWA_URL=${config.REACT_APP_TALAWA_URL}`, | |
`REACT_APP_TALAWA_URL=${endpoint}` | |
); | |
const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://'); | |
updatedContent = updatedContent.replace( | |
`REACT_APP_BACKEND_WEBSOCKET_URL=${config.REACT_APP_BACKEND_WEBSOCKET_URL}`, | |
`REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}` | |
); | |
await fs.promises.writeFile('.env', updatedContent, 'utf8'); | |
} catch (error) { | |
console.error('Failed to update API configuration:', error); | |
process.exit(1); | |
} | |
} |
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.
Actionable comments posted: 7
🧹 Outside diff range and nitpick comments (8)
ISSUE_GUIDELINES.md (3)
1-5
: Standardize emoji formattingFor consistency in markdown formatting, consider adding spaces around emojis:
-:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: +:+1: :tada: First off, thanks for taking the time to contribute! :tada: :+1:🧰 Tools
🪛 LanguageTool
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...(UNLIKELY_OPENING_PUNCTUATION)
47-47
: Capitalize "Slack" consistently"Slack" is a proper noun and should be capitalized throughout the document:
- 2. Ask our contributors to assign it to you in `#talawa` slack channel. + 2. Ask our contributors to assign it to you in `#talawa` Slack channel. -1. Join our `#talawa-github` slack channel for automatic issue and pull request updates. +1. Join our `#talawa-github` Slack channel for automatic issue and pull request updates. -1. Discuss issues in our various slack channels when necessary +1. Discuss issues in our various Slack channels when necessaryAlso applies to: 57-57, 61-61
🧰 Tools
🪛 LanguageTool
[grammar] ~47-~47: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in#talawa
slack channel. Working on these types of exi...(ON_SKYPE)
61-61
: Add missing comma for better readabilityAdd a comma after "when necessary" to improve sentence flow:
-1. Discuss issues in our various slack channels when necessary +1. Discuss issues in our various Slack channels when necessary,🧰 Tools
🪛 LanguageTool
[grammar] ~61-~61: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...(ON_SKYPE)
[typographical] ~61-~61: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep ...(PLEASE_COMMA)
package.json (1)
Line range hint
93-97
: Update eslint configuration for VitestThe eslint configuration still includes Jest-specific extends which should be removed as part of the migration to Vitest.
"eslintConfig": { "extends": [ - "react-app", - "react-app/jest" + "react-app" ] },.github/workflows/pull-request.yml (2)
14-17
: Optimize workflow triggers with path filtersConsider adding path filters to prevent unnecessary workflow runs when only documentation files are changed.
on: pull_request: branches: - '**' + paths-ignore: + - '**.md' + - 'docs/**' + - 'LICENSE'
192-198
: Add npm cache to improve workflow performanceConsider adding npm cache to speed up the workflow.
- name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '20.x' + cache: 'npm' + cache-dependency-path: '**/package-lock.json' - name: Install Dependencies run: npm installschema.graphql (1)
1-4
: Add documentation for directivesThe
@auth
and@role
directives would benefit from documentation describing their purpose and usage.Add documentation comments:
+""" +Directive for field-level authorization checks +""" directive @auth on FIELD_DEFINITION +""" +Directive for role-based access control +@param requires - The required user type for access +""" directive @role(requires: UserType) on FIELD_DEFINITIONsetup.ts (1)
126-139
: Move updateEnvFile helper outside main functionThe
updateEnvFile
helper function should be moved outside the main function for better reusability and to avoid recreation on each call.Move the function definition outside main:
+async function updateEnvFile( + key: string, + oldValue: string, + newValue: string, +): Promise<void> { + try { + const data = await fs.promises.readFile('.env', 'utf8'); + const result = data.replace(`${key}=${oldValue}`, `${key}=${newValue}`); + await fs.promises.writeFile('.env', result, 'utf8'); + } catch (error) { + console.error(`Failed to update ${key}:`, error); + process.exit(1); + } +} + export async function main(): Promise<void> {
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (6)
.eslintrc.json
(3 hunks).github/workflows/pull-request.yml
(1 hunks)ISSUE_GUIDELINES.md
(1 hunks)package.json
(2 hunks)schema.graphql
(1 hunks)setup.ts
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
ISSUE_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[typographical] ~26-~26: Consider adding a comma here.
Context: ... --- ## Issue Management In all cases please use the [GitHub open issue search](http...
(PLEASE_COMMA)
[style] ~33-~33: Consider using a different verb for a more formal wording.
Context: ...e. 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...
(FIX_RESOLVE)
[uncategorized] ~35-~35: Possible missing preposition found.
Context: ...lawa-admin/issues/new/choose) button 1. Use the templates to create a standardized ...
(AI_HYDRA_LEO_MISSING_TO)
[style] ~38-~38: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...
(MAKE_STYLE_BETTER)
[grammar] ~47-~47: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa
slack channel. Working on these types of exi...
(ON_SKYPE)
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github
slack channel for automatic issue and pull re...
(ON_SKYPE)
[grammar] ~61-~61: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...
(ON_SKYPE)
[typographical] ~61-~61: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep ...
(PLEASE_COMMA)
🪛 actionlint (1.7.4)
.github/workflows/pull-request.yml
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
🪛 yamllint (1.35.1)
.github/workflows/pull-request.yml
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 63-63: trailing spaces
(trailing-spaces)
[error] 92-92: trailing spaces
(trailing-spaces)
[error] 128-128: trailing spaces
(trailing-spaces)
[error] 131-131: trailing spaces
(trailing-spaces)
[error] 152-152: trailing spaces
(trailing-spaces)
[error] 159-159: trailing spaces
(trailing-spaces)
[error] 199-199: trailing spaces
(trailing-spaces)
[error] 203-203: trailing spaces
(trailing-spaces)
[error] 206-206: trailing spaces
(trailing-spaces)
[error] 207-207: trailing spaces
(trailing-spaces)
[error] 215-215: trailing spaces
(trailing-spaces)
[error] 245-245: trailing spaces
(trailing-spaces)
[error] 256-256: trailing spaces
(trailing-spaces)
[error] 258-258: trailing spaces
(trailing-spaces)
🔇 Additional comments (18)
ISSUE_GUIDELINES.md (2)
9-20
: Well-structured TOC implementation
The Table of Contents is properly implemented with correct markdown linking and clear hierarchy.
1-63
: Overall well-structured and comprehensive guidelines
The document provides clear and thorough guidance for issue management. The structure is logical, and the content is informative. The suggested changes are minor improvements to an already solid document.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[typographical] ~26-~26: Consider adding a comma here.
Context: ... --- ## Issue Management In all cases please use the [GitHub open issue search](http...
(PLEASE_COMMA)
[style] ~33-~33: Consider using a different verb for a more formal wording.
Context: ...e. 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...
(FIX_RESOLVE)
[uncategorized] ~35-~35: Possible missing preposition found.
Context: ...lawa-admin/issues/new/choose) button 1. Use the templates to create a standardized ...
(AI_HYDRA_LEO_MISSING_TO)
[style] ~38-~38: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...
(MAKE_STYLE_BETTER)
[grammar] ~47-~47: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa
slack channel. Working on these types of exi...
(ON_SKYPE)
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github
slack channel for automatic issue and pull re...
(ON_SKYPE)
[grammar] ~61-~61: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...
(ON_SKYPE)
[typographical] ~61-~61: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep ...
(PLEASE_COMMA)
package.json (2)
141-144
: Remove Jest-related dependencies
Since we're migrating to Vitest, these Jest-related dependencies should be removed to avoid confusion and reduce package bloat.
- "jest": "^27.4.5",
- "jest-localstorage-mock": "^2.4.19",
- "jest-location-mock": "^2.0.0",
- "jest-preview": "^0.3.1",
77-78
: Add main test script using Vitest
While Vitest-specific scripts are added, there should be a main "test" script that uses Vitest for consistency.
+ "test": "vitest run",
"test:vitest": "vitest run",
"test:watch": "vitest watch",
.github/workflows/pull-request.yml (3)
97-119
: LGTM! Comprehensive sensitive file protection
The sensitive file protection is well-implemented with a comprehensive list of protected files.
241-241
: Use Node.js LTS version instead of development version
Using Node.js 22.x which is currently in development could lead to instability in the CI pipeline. Consider using LTS version 20.x instead.
268-272
: LGTM! Clear branch protection
The target branch check is well-implemented with clear error messages.
.eslintrc.json (4)
4-6
: Environment configuration looks good!
The environment configuration correctly includes vitest
, which aligns with the migration from Jest to Vitest.
14-16
: Configuration looks good!
The extends configuration properly includes TypeScript and Prettier configurations.
32-38
: Plugins configuration is well-structured!
The configuration includes all necessary plugins for TypeScript, React, imports, TSDoc, and Prettier.
Line range hint 40-138
: Comprehensive rules configuration!
The configuration includes:
- Strict TypeScript rules for type safety
- Consistent React patterns
- Well-defined naming conventions
- Proper Prettier integration
schema.graphql (2)
1096-1096
: 🛠️ Refactor suggestion
Fix inconsistent return type in venue query
The venue
query accepts an ID parameter but returns an optional type. When querying by ID, it should either return a non-null type or include an error type.
Consider updating the return type:
- venue(id: ID!): Venue
+ venue(id: ID!): Venue!
Likely invalid or redundant comment.
612-619
: 🛠️ Refactor suggestion
Standardize parameter naming in mutations
The createAdvertisement
mutation uses mediaUrl
while the input type uses mediaFile
. This inconsistency could lead to confusion.
Standardize the parameter naming:
createAdvertisement(
endDate: Date!
- mediaUrl: URL!
+ mediaFile: String!
name: String!
orgId: ID!
startDate: Date!
type: AdvertisementType!
): Advertisement!
Likely invalid or redundant comment.
setup.ts (5)
1-11
: LGTM! Well-organized imports and clear function declaration.
The imports are properly organized, and the main function is correctly declared as async.
32-60
: LGTM! Robust port configuration implementation.
The port configuration is well-implemented with proper async file operations and error handling.
221-224
: LGTM! Proper error handling for main function execution.
The main function execution is well-implemented with proper error handling.
24-26
:
Add missing await for checkEnvFile()
The checkEnvFile()
call should be awaited to prevent potential race conditions.
Apply this diff:
- checkEnvFile();
+ await checkEnvFile();
Likely invalid or redundant comment.
95-117
: 🛠️ Refactor suggestion
Improve API URL setup with consistent async operations and connection timeout
Several improvements needed:
- Replace sync file operations with async ones
- Add timeout to connection check
- Combine multiple file writes into one operation
Apply this diff:
- isConnected = await checkConnection(url.origin);
+ isConnected = await Promise.race([
+ checkConnection(url.origin),
+ new Promise((_, reject) =>
+ setTimeout(() => reject(new Error('Connection timeout')), 5000)
+ )
+ ]);
}
- const envPath = '.env';
- const currentEnvContent = fs.readFileSync(envPath, 'utf8');
+ const currentEnvContent = await fs.promises.readFile('.env', 'utf8');
const talawaApiUrl = dotenv.parse(currentEnvContent).REACT_APP_TALAWA_URL;
const websocketUrl = endpoint.replace(/^http(s)?:\/\//, 'ws$1://');
- const updatedEnvContent = currentEnvContent.replace(
- `REACT_APP_TALAWA_URL=${talawaApiUrl}`,
- `REACT_APP_TALAWA_URL=${endpoint}`,
- );
- fs.writeFileSync(envPath, updatedEnvContent, 'utf8');
-
- const currentWebSocketUrl =
- dotenv.parse(updatedEnvContent).REACT_APP_BACKEND_WEBSOCKET_URL;
-
- const finalEnvContent = updatedEnvContent.replace(
- `REACT_APP_BACKEND_WEBSOCKET_URL=${currentWebSocketUrl}`,
- `REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`,
- );
- fs.writeFileSync(envPath, finalEnvContent, 'utf8');
+ let content = currentEnvContent
+ .replace(
+ `REACT_APP_TALAWA_URL=${talawaApiUrl}`,
+ `REACT_APP_TALAWA_URL=${endpoint}`
+ )
+ .replace(
+ `REACT_APP_BACKEND_WEBSOCKET_URL=${dotenv.parse(currentEnvContent).REACT_APP_BACKEND_WEBSOCKET_URL}`,
+ `REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`
+ );
+
+ await fs.promises.writeFile('.env', content, 'utf8');
Likely invalid or redundant comment.
"test:vitest": "vitest run", | ||
"test:watch": "vitest watch", |
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.
💡 Codebase verification
Jest-specific code still exists in multiple files
Several files still contain Jest-specific code and configurations:
src/utils/useSession.test.tsx
: Contains extensive Jest mocking and testing utilitiessrc/setupTests.ts
: Contains Jest configuration and global mockssrc/utils/getRefreshToken.test.ts
: Uses Jest mocking- Multiple other test files using Jest-specific functions like
jest.mock()
,jest.fn()
,jest.spyOn()
The migration to Vitest appears incomplete. The following actions are needed:
- Replace all Jest-specific mocking utilities with Vitest equivalents
- Update test files to use Vitest's API instead of Jest's
- Remove Jest configuration files and dependencies
- Update any remaining Jest-specific test helpers and utilities
🔗 Analysis chain
Verify complete removal of Jest-specific code
Let's verify that all Jest-specific code has been removed from the test files.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for any remaining Jest-specific code
echo "=== Checking for Jest-specific imports ==="
rg "from ['|\"]@testing-library/jest" || echo "No Jest testing-library imports found"
rg "from ['|\"]jest" || echo "No direct Jest imports found"
echo -e "\n=== Checking for Jest-specific function calls ==="
rg "describe\(|test\(|it\(|expect\(|jest\." || echo "No Jest-specific function calls found"
echo -e "\n=== Checking for Jest configuration files ==="
fd "jest.config" || echo "No Jest config files found"
Length of output: 75271
CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} | ||
run: npx eslint "${CHANGED_FILES}" && python .github/workflows/eslint_disable_check.py |
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.
Fix incorrect reference to changed files output
The changed_files
output variable is incorrectly referenced. It should be changed-files
.
- CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }}
+ CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} | |
run: npx eslint "${CHANGED_FILES}" && python .github/workflows/eslint_disable_check.py | |
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: npx eslint "${CHANGED_FILES}" && python .github/workflows/eslint_disable_check.py |
🧰 Tools
🪛 actionlint (1.7.4)
61-61: property "changed_files" is not defined in object type {changed-files: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }} | ||
run: | | ||
echo "Source Branch ${{ github.event.pull_request.head.ref }}" | ||
echo "Target Branch ${{ github.event.pull_request.base.ref }}" | ||
echo "Error: Source and Target Branches are the same. Please ensure they are different." | ||
exit 1 |
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.
Add input validation for branch names
The branch names from GitHub context are used directly without validation.
- name: Check if the source and target branches are different
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.head.ref }}
run: |
+ # Validate branch names
+ if [[ ! ${{ github.event.pull_request.head.ref }} =~ ^[a-zA-Z0-9_/-]+$ ]] ||
+ [[ ! ${{ github.event.pull_request.base.ref }} =~ ^[a-zA-Z0-9_/-]+$ ]]; then
+ echo "Invalid branch name detected"
+ exit 1
+ fi
echo "Source Branch ${{ github.event.pull_request.head.ref }}"
echo "Target Branch ${{ github.event.pull_request.base.ref }}"
echo "Error: Source and Target Branches are the same. Please ensure they are different."
exit 1
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 actionlint (1.7.4)
79-79: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details
(expression)
type AdvertisementEdge { | ||
cursor: String | ||
node: Advertisement | ||
} | ||
|
||
type AdvertisementsConnection { | ||
edges: [AdvertisementEdge] | ||
pageInfo: DefaultConnectionPageInfo | ||
totalCount: Int | ||
} |
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.
🛠️ Refactor suggestion
Standardize pagination implementation
The schema uses different pagination patterns:
- Relay-style connections (e.g.,
EventConnection
) - Offset-based pagination with
first
/skip
- Direct array returns
Consider standardizing on Relay-style connections for better scalability and consistency. For example:
type Query {
- eventsByOrganization(id: ID, orderBy: EventOrderByInput): [Event]
+ eventsByOrganization(
+ after: String
+ first: Int
+ before: String
+ last: Int
+ orderBy: EventOrderByInput
+ ): EventConnection!
}
Also applies to: 1024-1032
This PR has too many submitted files. Please ensure the following:
Closing |
What kind of change does this PR introduce?
This PR migrates the test cases in src/screens/UserPortal/Volunteer/Actions from Jest to Vitest, ensuring compatibility with Vitest and maintaining 100% test coverage.
Checklist:
src/screens/UserPortal/Volunteer/Actions
Jest test cases to Vitest.Issue Number:
#2586
Screencast.from.2024-12-06.06-40-40.webm
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Chores