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

Add "Eurobank Ergasias" bank (GR) to the list of banks with limited h… #501

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

giliopoulos
Copy link

Add "Eurobank Ergasias" bank (GR) to the list of banks with limited history

@actual-github-bot actual-github-bot bot changed the title Add "Eurobank Ergasias" bank (GR) to the list of banks with limited h… [WIP] Add "Eurobank Ergasias" bank (GR) to the list of banks with limited h… Nov 12, 2024
Copy link
Contributor

👋 Hi! It looks like this PR has not had any changes for a week now. Would you like someone to review this PR? If so - please remove the "[WIP]" prefix from the PR title. That will let the community know that this PR is open for a review.

@github-actions github-actions bot added the stale label Nov 20, 2024
@giliopoulos giliopoulos changed the title [WIP] Add "Eurobank Ergasias" bank (GR) to the list of banks with limited h… Add "Eurobank Ergasias" bank (GR) to the list of banks with limited h… Nov 20, 2024
Copy link
Contributor

coderabbitai bot commented Nov 20, 2024

Walkthrough

The pull request introduces a modification to the BANKS_WITH_LIMITED_HISTORY array in the src/app-gocardless/bank-factory.js file. Specifically, it adds the string 'EUROBANK_ERGASIAS_ERBKGRAA' to this array, which is utilized for processing or filtering banks with limited historical data. The change does not alter any existing logic associated with the banks array or the default export function responsible for locating a bank by its institutionId. The overall structure and functionality of the code remain unchanged, with the addition being the sole modification noted in this update.

Possibly related PRs

Suggested labels

:sparkles: Merged


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b1bf7ee and 21e8ff3.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/501.md is excluded by !**/*.md
📒 Files selected for processing (1)
  • src/app-gocardless/bank-factory.js (1 hunks)
🔇 Additional comments (2)
src/app-gocardless/bank-factory.js (2)

80-80: LGTM! The new bank entry follows the established conventions.

The addition of 'EUROBANK_ERGASIAS_ERBKGRAA' is properly formatted and correctly placed in alphabetical order within the array.


80-80: Verify if additional integration is needed.

The bank has been added to BANKS_WITH_LIMITED_HISTORY but doesn't have a corresponding import and entry in the banks array. While this appears to be a common pattern for some banks in the list, let's verify this is the intended implementation.

✅ Verification successful

Let me verify the implementation pattern by checking the bank factory code to understand how banks without specific implementations are handled.


Let me check the actual implementation of the bank factory to understand the fallback mechanism.


Implementation pattern is correct

The current implementation is following the intended pattern. The bank factory code shows that:

  1. Banks without specific implementations automatically fall back to IntegrationBank
  2. BANKS_WITH_LIMITED_HISTORY is a separate concern that only marks banks with limited transaction history
  3. Some banks in BANKS_WITH_LIMITED_HISTORY (like REVOLUT, BANKINTER) have specific implementations while others don't, confirming this is a valid pattern
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the pattern of banks with limited history to confirm if they typically have corresponding implementations

# Get all bank implementation files
echo "Bank implementation files:"
fd -e js . src/app-gocardless/banks

# Extract bank identifiers from implementation files
echo -e "\nBank identifiers from implementations:"
rg -l "institutionIds.*=" src/app-gocardless/banks | xargs rg "institutionIds.*="

# Compare with BANKS_WITH_LIMITED_HISTORY entries
echo -e "\nBanks with limited history:"
rg "BANKS_WITH_LIMITED_HISTORY.*=" -A 50

Length of output: 5898


Script:

#!/bin/bash
# Check bank factory implementation
rg -A 10 "export default function bankFactory" src/app-gocardless/bank-factory.js

# Check IntegrationBank usage
rg "IntegrationBank" src/app-gocardless/bank-factory.js

# Check if any banks in BANKS_WITH_LIMITED_HISTORY have specific implementations
rg "BANKINTER_BKBKESMM|REVOLUT_REVOLT21|SWEDBANK_HABALV22" src/app-gocardless/banks -l

Length of output: 444


Script:

#!/bin/bash
# Get the bank factory implementation
cat src/app-gocardless/bank-factory.js

# Check the integration bank implementation
cat src/app-gocardless/banks/integration-bank.js

Length of output: 7073


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 removed the stale label Nov 21, 2024
@twk3
Copy link
Contributor

twk3 commented Dec 16, 2024

Thanks @giliopoulos . Just to double check, the problem you are running into with this bank is the same as https://bankaccountdata.zendesk.com/hc/en-gb/articles/11529718632476-Extended-history-and-continuous-access-edge-cases were you don't get ongoing new data in bank sync because the request was for over 90 days.

@giliopoulos
Copy link
Author

giliopoulos commented Dec 16, 2024

@twk3 Actually i am able to get new transactions when i sync with the bank from day to day.. When i did my first sync i got the transactions for the last 90 days. So looking through the documentation, i thought this way i could extend the period for the fetched transactions to over 90 days.

Sorry for the misunderstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants