Skip to content
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

Enhance link checker with updated bank URLs #521

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

guibranco
Copy link
Owner

@guibranco guibranco commented Sep 13, 2024

Description

  • Enhanced link checker by updating URLs for banks.
  • Added new entry to ignore list for link checking.
  • Updated documentation and SQL inserts to reflect the new URLs.

Changes walkthrough 📝

Relevant files
Configuration changes
.lycheeignore
Update link checker ignore list                                                   

.lycheeignore

  • Added bancopan.com.br to the ignore list.
+1/-0     
Enhancement
bancos.json
Update bank URL in JSON data                                                         

data/bancos.json

  • Updated URL from https://www.mercantil.com.br to
    https://www.bancomercantil.com.br.
  • +2/-2     
    bancos.md
    Update bank URL in markdown documentation                               

    data/bancos.md

  • Updated URL for Banco Mercantil do Brasil S.A. to
    https://www.bancomercantil.com.br.
  • +1/-1     
    bancos.sql
    Update bank URL in SQL insert statements                                 

    data/bancos.sql

  • Updated SQL insert statement for Banco Mercantil do Brasil S.A. to
    reflect new URL.
  • +1/-1     

    Summary by CodeRabbit

    • New Features

      • Added bancopan.com.br to the list of ignored domains in the application.
    • Bug Fixes

      • Updated the URL for "Banco Mercantil do Brasil S.A." to reflect its rebranding, ensuring users have the correct link for accessing the bank's online services.

    @guibranco guibranco linked an issue Sep 13, 2024 that may be closed by this pull request
    @gstraccini gstraccini bot added ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) good first issue A issue for someone self assign and help me =D hacktoberfest Participation in the Hacktoberfest event help wanted Feel free to take this issue for you and help me! 🐛 bug Issues related to bugs or errors 🔗 link checker Link checker report 🚦 awaiting triage Items that are awaiting triage or categorization labels Sep 13, 2024
    Copy link

    coderabbitai bot commented Sep 13, 2024

    Walkthrough

    The changes involve updating the .lycheeignore file to include the domain bancopan.com.br, indicating it should be ignored by the Lychee application. Additionally, the URL for "Banco Mercantil do Brasil S.A." has been updated across multiple files, changing it from https://www.mercantil.com.br to https://www.bancomercantil.com.br. These modifications ensure that the application correctly handles the exclusion of specified domains and reflects the bank's current online presence.

    Changes

    File Change Summary
    .lycheeignore Added bancopan.com.br to the ignore list.
    data/bancos.json Updated URL for "Banco Mercantil do Brasil S.A." from https://www.mercantil.com.br to https://www.bancomercantil.com.br.
    data/bancos.md Updated URL for "Banco Mercantil do Brasil S.A." from https://www.mercantil.com.br to https://www.bancomercantil.com.br.
    data/bancos.sql Modified SQL insert statement for "Banco Mercantil do Brasil S.A." with the new URL.

    Poem

    In the land of banks where rabbits hop,
    A new URL made us stop.
    “Bancopan” joins the list to hide,
    While “Bancomercantil” takes a ride.
    Hooray for changes, quick and bright,
    We’ll bounce along with pure delight! 🐇✨


    Recent review details

    Configuration used: CodeRabbit UI
    Review profile: CHILL

    Commits

    Files that changed from the base of the PR and between e35b539 and 0d9752b.

    Files ignored due to path filters (1)
    • data/bancos.csv is excluded by !**/*.csv
    Files selected for processing (4)
    • .lycheeignore (1 hunks)
    • data/bancos.json (2 hunks)
    • data/bancos.md (1 hunks)
    • data/bancos.sql (1 hunks)
    Files skipped from review due to trivial changes (1)
    • .lycheeignore
    Additional context used
    Markdownlint
    data/bancos.md

    219-219: null
    Bare URL used

    (MD034, no-bare-urls)

    Additional comments not posted (4)
    data/bancos.md (1)

    219-219: LGTM!

    The URL update for "Banco Mercantil do Brasil S.A." from https://www.mercantil.com.br to https://www.bancomercantil.com.br looks good.

    Tools
    Markdownlint

    219-219: null
    Bare URL used

    (MD034, no-bare-urls)

    data/bancos.sql (1)

    215-215: LGTM! The URL change looks good.

    The URL for "Banco Mercantil do Brasil S.A." has been updated as mentioned in the summary. No other changes to the SQL insert statement.

    Verify the new URL loads successfully:

    Verification successful

    URL change verified successfully

    The new URL (https://www.bancomercantil.com.br) for Banco Mercantil do Brasil S.A. has been confirmed to be accessible and working correctly. This validates the URL update in the SQL insert statement.

    Scripts executed

    The following scripts were executed for the analysis:

    Script:

    #!/bin/bash
    # Check if the new URL returns a 200 OK status code
    if curl -s -o /dev/null -w "%{http_code}" https://www.bancomercantil.com.br | grep -q 200; then 
      echo "URL check passed: https://www.bancomercantil.com.br loads successfully"
    else
      echo "URL check failed: https://www.bancomercantil.com.br did not return a 200 OK status"
    fi
    

    Length of output: 239

    data/bancos.json (2)

    5342-5342: LGTM!

    The URL change from "https://www.mercantil.com.br" to "https://www.bancomercantil.com.br" looks good.


    Line range hint 10276-10277: Looks good!

    The JSON file is properly closed with an empty array.


    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?

    Share
    Tips

    Chat

    There are 3 ways to chat with CodeRabbit:

    • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
      • I pushed a fix in commit <commit_id>.
      • Generate unit testing code for this file.
      • Open a follow-up GitHub issue for this discussion.
    • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
      • @coderabbitai generate unit testing code for this file.
      • @coderabbitai modularize this function.
    • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
      • @coderabbitai generate interesting stats about this repository and render them as a table.
      • @coderabbitai show all the console.log statements in this repository.
      • @coderabbitai read src/utils.ts and generate unit testing code.
      • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
      • @coderabbitai help me debug CodeRabbit configuration file.

    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)

    • @coderabbitai pause to pause the reviews on a PR.
    • @coderabbitai resume to resume the paused reviews.
    • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
    • @coderabbitai full review to do a full review from scratch and review all the files again.
    • @coderabbitai summary to regenerate the summary of the PR.
    • @coderabbitai resolve resolve all the CodeRabbit review comments.
    • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
    • @coderabbitai help to get help.

    Other keywords and placeholders

    • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
    • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
    • Add @coderabbitai anywhere in the PR title to generate the title automatically.

    CodeRabbit Configuration File (.coderabbit.yaml)

    • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
    • Please see the configuration documentation for more information.
    • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

    Documentation and Community

    • Visit our Documentation for detailed information on how to use CodeRabbit.
    • Join our Discord Community to get help, request features, and share feedback.
    • Follow us on X/Twitter for updates and announcements.

    @github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 13, 2024
    @penify-dev penify-dev bot added the enhancement A enhancement to the project label Sep 13, 2024
    @penify-dev penify-dev bot changed the title Fix some links in link checker report Enhance link checker with updated bank URLs Sep 13, 2024
    @guibranco guibranco removed the 🚦 awaiting triage Items that are awaiting triage or categorization label Sep 13, 2024
    Copy link
    Contributor

    penify-dev bot commented Sep 13, 2024

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are straightforward updates to URLs and an ignore list entry, which do not introduce complex logic or significant alterations.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    No

    🔒 Security concerns

    No

    Copy link
    Contributor

    penify-dev bot commented Sep 13, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Validation
    Ensure the new SQL insert statement aligns with the database schema

    Confirm that the new SQL insert statement correctly matches the database schema and
    constraints.

    data/bancos.sql [215]

    -INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.bancomercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');
    +INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.bancomercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');  # Validate against schema
     
    Suggestion importance[1-10]: 8

    Why: This suggestion addresses a crucial aspect of database integrity and ensures that the new entry adheres to the expected schema, which is important for application stability.

    8
    Validate the new URL to ensure it points to the correct bank

    Ensure that the new URL is valid and points to the correct bank website.

    data/bancos.json [5342]

    -"Url": "https://www.bancomercantil.com.br",
    +"Url": "https://www.bancomercantil.com.br",  # Verify URL validity
     
    Suggestion importance[1-10]: 7

    Why: While it's important to validate URLs, the suggestion does not provide a method for verification and is somewhat vague. It addresses a minor issue related to data integrity.

    7
    Validate the format of the newly added domain

    Check if the newly added domain is correctly formatted and follows the expected pattern
    for URLs.

    .lycheeignore [19]

    -+bancopan\.com\.br
    ++bancopan\.com\.br  # Confirm URL format
     
    Suggestion importance[1-10]: 5

    Why: While validating the format of the domain is useful, this suggestion does not indicate any specific issues or checks, making it a minor improvement.

    5
    Maintainability
    Verify the formatting of the new bank entry for consistency

    Ensure that the new entry for Banco Mercantil do Brasil S.A. is correctly formatted and
    consistent with other entries.

    data/bancos.md [219]

    -+389 | 17184037 | 17.184.037/0001-10 | Banco Mercantil do Brasil S.A. | BCO MERCANTIL DO BRASIL S.A. | RSFN | Banco Múltiplo | DRCT | Sim | Sim | Não | Não | Sim | Sim | Banco folha e Destinatário | Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos | https://www.bancomercantil.com.br | 2002-04-22 | 2020-11-03 06:30:00 | 2021-05-05T09:11:12.7114881-03:00 | 2024-05-15T16:49:45.7323096+00:00
    ++389 | 17184037 | 17.184.037/0001-10 | Banco Mercantil do Brasil S.A. | BCO MERCANTIL DO BRASIL S.A. | RSFN | Banco Múltiplo | DRCT | Sim | Sim | Não | Não | Sim | Sim | Banco folha e Destinatário | Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos | https://www.bancomercantil.com.br | 2002-04-22 | 2020-11-03 06:30:00 | 2021-05-05T09:11:12.7114881-03:00 | 2024-05-15T16:49:45.7323096+00:00  # Check formatting consistency
     
    Suggestion importance[1-10]: 6

    Why: The suggestion is relevant for maintainability, but it lacks specific details on what formatting issues to check, making it less impactful.

    6

    Copy link

    @@ -212,7 +212,7 @@
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('385','03844699','03.844.699/0001-64','COOPERATIVA DE ECONOMIA E CREDITO MUTUO DOS TRABALHADORES PORTUARIOS DA GRANDE VITORIA - CREDESTIVA.','CECM DOS TRAB.PORT. DA G.VITOR',NULL,NULL,'Internet',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,'2022-03-08',NULL,'2022-03-16T07:58:41.1136389+00:00','2023-09-25T12:28:23.0760465+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('386','30680829','30.680.829/0001-43','NU FINANCEIRA S.A. - Sociedade de Crédito, Financiamento e Investimento','NU FINANCEIRA S.A. CFI',NULL,NULL,'RSFN',NULL,NULL,0,0,NULL,NULL,NULL,'Consignado,Pessoal,Troca de Modalidade',NULL,'2021-01-12',NULL,'2021-05-05T09:11:12.7115010-03:00','2023-10-21T12:05:56.9570288+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('387','03215790','03.215.790/0001-10','Banco Toyota do Brasil S.A.','BCO TOYOTA DO BRASIL S.A.','Banco Múltiplo',NULL,'RSFN',1,0,0,0,1,1,NULL,'Veículos','https://www.bancotoyota.com.br','2020-07-21',NULL,'2021-05-05T09:11:12.7114501-03:00','2024-05-15T16:49:45.7364295+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.mercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.bancomercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');

    Check warning

    Code scanning / Tsqllint (reported by Codacy)

    Use of unicode characters in a non unicode string Warning

    Use of unicode characters in a non unicode string
    @@ -212,7 +212,7 @@
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('385','03844699','03.844.699/0001-64','COOPERATIVA DE ECONOMIA E CREDITO MUTUO DOS TRABALHADORES PORTUARIOS DA GRANDE VITORIA - CREDESTIVA.','CECM DOS TRAB.PORT. DA G.VITOR',NULL,NULL,'Internet',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,'2022-03-08',NULL,'2022-03-16T07:58:41.1136389+00:00','2023-09-25T12:28:23.0760465+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('386','30680829','30.680.829/0001-43','NU FINANCEIRA S.A. - Sociedade de Crédito, Financiamento e Investimento','NU FINANCEIRA S.A. CFI',NULL,NULL,'RSFN',NULL,NULL,0,0,NULL,NULL,NULL,'Consignado,Pessoal,Troca de Modalidade',NULL,'2021-01-12',NULL,'2021-05-05T09:11:12.7115010-03:00','2023-10-21T12:05:56.9570288+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('387','03215790','03.215.790/0001-10','Banco Toyota do Brasil S.A.','BCO TOYOTA DO BRASIL S.A.','Banco Múltiplo',NULL,'RSFN',1,0,0,0,1,1,NULL,'Veículos','https://www.bancotoyota.com.br','2020-07-21',NULL,'2021-05-05T09:11:12.7114501-03:00','2024-05-15T16:49:45.7364295+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.mercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');
    INSERT INTO Banks (COMPE,ISPB,Document,LongName,ShortName,Network,Type,PixType,Charge,CreditDocument,LegalCheque,DetectaFlow,PCR,PCRP,SalaryPortability,Products,Url,DateOperationStarted,DatePixStarted,DateRegistered,DateUpdated) VALUES('389','17184037','17.184.037/0001-10','Banco Mercantil do Brasil S.A.','BCO MERCANTIL DO BRASIL S.A.','Banco Múltiplo','DRCT','RSFN',1,1,0,0,1,1,'Banco folha e Destinatário','Capital de Giro,Cheque Especial,Consignado,Outros Créditos,Pessoal,Troca de Modalidade,Veículos','https://www.bancomercantil.com.br','2002-04-22','2020-11-03 06:30:00','2021-05-05T09:11:12.7114881-03:00','2024-05-15T16:49:45.7323096+00:00');

    Check warning

    Code scanning / Tsqllint (reported by Codacy)

    Object name not schema qualified Warning

    Object name not schema qualified
    @guibranco guibranco merged commit 119e377 into main Sep 13, 2024
    44 checks passed
    @guibranco guibranco deleted the feature/519-link-checker-report branch September 13, 2024 10:56
    @coderabbitai coderabbitai bot mentioned this pull request Nov 22, 2024
    6 tasks
    @coderabbitai coderabbitai bot mentioned this pull request Dec 12, 2024
    6 tasks
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) 🐛 bug Issues related to bugs or errors enhancement A enhancement to the project good first issue A issue for someone self assign and help me =D hacktoberfest Participation in the Hacktoberfest event help wanted Feel free to take this issue for you and help me! 🔗 link checker Link checker report Review effort [1-5]: 2 size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    🔗✅ Link checker report
    1 participant