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

Use the maximum access validity time provided by GoCardless #551

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

matt-fidd
Copy link
Contributor

@matt-fidd matt-fidd commented Jan 14, 2025

Follow up to #541, removes institution-specific accessValidForDays overrides in favour of the the maximum provided by GoCardless. This lets users who use institutions with longer access validity take advantage of it without needing a custom handler.

Tested this with all of my institutions and had no issues, but getting some testing from someone with non-UK institutions would be good.

@actual-github-bot actual-github-bot bot changed the title Use the maximum access validity time provided by GoCardless [WIP] Use the maximum access validity time provided by GoCardless Jan 14, 2025
@matt-fidd matt-fidd changed the title [WIP] Use the maximum access validity time provided by GoCardless Use the maximum access validity time provided by GoCardless Jan 14, 2025
Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

Walkthrough

The pull request introduces a comprehensive modification across multiple files in the GoCardless integration, focusing on the removal of the accessValidForDays property and the introduction of a new max_access_valid_for_days property. This change affects bank integration configurations, type definitions, and service implementations. The modifications span across bank-specific files, interface definitions, test suites, and service logic. The primary objective appears to be standardizing how access validity duration is represented and managed within the application, shifting from a bank-level configuration to an institution-level property. The changes involve removing the existing accessValidForDays property from various bank integration files and adding a new max_access_valid_for_days property to institution-related type definitions and test fixtures.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4bb59fd and 59c965e.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/551.md is excluded by !**/*.md
📒 Files selected for processing (45)
  • src/app-gocardless/bank-factory.js (0 hunks)
  • src/app-gocardless/banks/abanca_caglesmm.js (0 hunks)
  • src/app-gocardless/banks/abnamro_abnanl2a.js (0 hunks)
  • src/app-gocardless/banks/american_express_aesudef1.js (0 hunks)
  • src/app-gocardless/banks/bancsabadell_bsabesbbb.js (0 hunks)
  • src/app-gocardless/banks/bank.interface.ts (0 hunks)
  • src/app-gocardless/banks/bank_of_ireland_b365_bofiie2d.js (0 hunks)
  • src/app-gocardless/banks/bankinter_bkbkesmm.js (0 hunks)
  • src/app-gocardless/banks/belfius_gkccbebb.js (0 hunks)
  • src/app-gocardless/banks/berliner_sparkasse_beladebexxx.js (0 hunks)
  • src/app-gocardless/banks/bnp_be_gebabebb.js (0 hunks)
  • src/app-gocardless/banks/cbc_cregbebb.js (0 hunks)
  • src/app-gocardless/banks/danskebank_dabno22.js (0 hunks)
  • src/app-gocardless/banks/easybank_bawaatww.js (0 hunks)
  • src/app-gocardless/banks/entercard_swednokk.js (0 hunks)
  • src/app-gocardless/banks/fortuneo_ftnofrp1xxx.js (0 hunks)
  • src/app-gocardless/banks/hanseatic_hstbdehh.js (0 hunks)
  • src/app-gocardless/banks/hype_hyeeit22.js (0 hunks)
  • src/app-gocardless/banks/ing_ingbrobu.js (0 hunks)
  • src/app-gocardless/banks/ing_ingddeff.js (0 hunks)
  • src/app-gocardless/banks/ing_pl_ingbplpw.js (0 hunks)
  • src/app-gocardless/banks/integration-bank.js (0 hunks)
  • src/app-gocardless/banks/isybank_itbbitmm.js (0 hunks)
  • src/app-gocardless/banks/kbc_kredbebb.js (0 hunks)
  • src/app-gocardless/banks/mbank_retail_brexplpw.js (0 hunks)
  • src/app-gocardless/banks/nbg_ethngraaxxx.js (0 hunks)
  • src/app-gocardless/banks/norwegian_xx_norwnok1.js (0 hunks)
  • src/app-gocardless/banks/revolut_revolt21.js (0 hunks)
  • src/app-gocardless/banks/sandboxfinance_sfin0000.js (0 hunks)
  • src/app-gocardless/banks/seb_kort_bank_ab.js (0 hunks)
  • src/app-gocardless/banks/seb_privat.js (0 hunks)
  • src/app-gocardless/banks/sparnord_spnodk22.js (0 hunks)
  • src/app-gocardless/banks/spk_karlsruhe_karsde66.js (0 hunks)
  • src/app-gocardless/banks/spk_marburg_biedenkopf_heladef1mar.js (0 hunks)
  • src/app-gocardless/banks/spk_worms_alzey_ried_malade51wor.js (0 hunks)
  • src/app-gocardless/banks/ssk_dusseldorf_dussdeddxxx.js (0 hunks)
  • src/app-gocardless/banks/swedbank_habalv22.js (0 hunks)
  • src/app-gocardless/banks/tests/ing_ingddeff.spec.js (2 hunks)
  • src/app-gocardless/banks/tests/ing_pl_ingbplpw.spec.js (2 hunks)
  • src/app-gocardless/banks/tests/mbank_retail_brexplpw.spec.js (2 hunks)
  • src/app-gocardless/banks/tests/sandboxfinance_sfin0000.spec.js (2 hunks)
  • src/app-gocardless/banks/tests/spk_marburg_biedenkopf_heladef1mar.spec.js (2 hunks)
  • src/app-gocardless/gocardless-node.types.ts (1 hunks)
  • src/app-gocardless/services/gocardless-service.js (1 hunks)
  • src/app-gocardless/services/tests/fixtures.js (1 hunks)
💤 Files with no reviewable changes (37)
  • src/app-gocardless/banks/ing_pl_ingbplpw.js
  • src/app-gocardless/banks/bankinter_bkbkesmm.js
  • src/app-gocardless/banks/bank.interface.ts
  • src/app-gocardless/banks/norwegian_xx_norwnok1.js
  • src/app-gocardless/banks/revolut_revolt21.js
  • src/app-gocardless/banks/danskebank_dabno22.js
  • src/app-gocardless/banks/abanca_caglesmm.js
  • src/app-gocardless/banks/spk_worms_alzey_ried_malade51wor.js
  • src/app-gocardless/banks/berliner_sparkasse_beladebexxx.js
  • src/app-gocardless/banks/spk_marburg_biedenkopf_heladef1mar.js
  • src/app-gocardless/banks/nbg_ethngraaxxx.js
  • src/app-gocardless/banks/belfius_gkccbebb.js
  • src/app-gocardless/banks/ing_ingbrobu.js
  • src/app-gocardless/banks/ing_ingddeff.js
  • src/app-gocardless/banks/cbc_cregbebb.js
  • src/app-gocardless/banks/bnp_be_gebabebb.js
  • src/app-gocardless/banks/entercard_swednokk.js
  • src/app-gocardless/banks/american_express_aesudef1.js
  • src/app-gocardless/banks/mbank_retail_brexplpw.js
  • src/app-gocardless/banks/bank_of_ireland_b365_bofiie2d.js
  • src/app-gocardless/banks/sparnord_spnodk22.js
  • src/app-gocardless/banks/swedbank_habalv22.js
  • src/app-gocardless/banks/ssk_dusseldorf_dussdeddxxx.js
  • src/app-gocardless/banks/sandboxfinance_sfin0000.js
  • src/app-gocardless/banks/seb_privat.js
  • src/app-gocardless/banks/bancsabadell_bsabesbbb.js
  • src/app-gocardless/banks/easybank_bawaatww.js
  • src/app-gocardless/banks/spk_karlsruhe_karsde66.js
  • src/app-gocardless/banks/integration-bank.js
  • src/app-gocardless/banks/hanseatic_hstbdehh.js
  • src/app-gocardless/banks/fortuneo_ftnofrp1xxx.js
  • src/app-gocardless/bank-factory.js
  • src/app-gocardless/banks/abnamro_abnanl2a.js
  • src/app-gocardless/banks/hype_hyeeit22.js
  • src/app-gocardless/banks/isybank_itbbitmm.js
  • src/app-gocardless/banks/seb_kort_bank_ab.js
  • src/app-gocardless/banks/kbc_kredbebb.js
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build Docker image (alpine)
🔇 Additional comments (8)
src/app-gocardless/banks/tests/sandboxfinance_sfin0000.spec.js (1)

25-25: LGTM! Consistent implementation of max_access_valid_for_days

The addition of max_access_valid_for_days and its snapshot test update are consistent with the PR objectives.

Also applies to: 36-57

src/app-gocardless/services/tests/fixtures.js (1)

107-107: LGTM! Consistent mock data implementation

The addition of max_access_valid_for_days to the mockInstitution fixture maintains consistency with other test files.

src/app-gocardless/banks/tests/mbank_retail_brexplpw.spec.js (1)

29-29: LGTM! Consistent implementation in mBank test

The addition of max_access_valid_for_days and its snapshot test update align with the changes in other files.

Also applies to: 46-74

src/app-gocardless/banks/tests/ing_pl_ingbplpw.spec.js (1)

29-29: Verify the difference between transaction_total_days and max_access_valid_for_days

While the implementation is consistent with other files, I notice that transaction_total_days is set to '365' while max_access_valid_for_days is '90'. Please confirm this difference is intentional, as these values serve different purposes:

  • transaction_total_days: Historical transaction data availability (365 days)
  • max_access_valid_for_days: Access token validity period (90 days)

Also applies to: 47-75

src/app-gocardless/gocardless-node.types.ts (1)

256-261: LGTM!

The new property max_access_valid_for_days is well-documented and follows the existing naming convention in the Institution type.

src/app-gocardless/services/gocardless-service.js (1)

323-323: LGTM!

The change to use institution.max_access_valid_for_days aligns with the PR objectives by removing bank-specific overrides and using the maximum access validity time provided by GoCardless.

src/app-gocardless/banks/tests/spk_marburg_biedenkopf_heladef1mar.spec.js (1)

25-25: LGTM!

The test data and expected output are correctly updated to include the new max_access_valid_for_days property.

Also applies to: 61-61

src/app-gocardless/banks/tests/ing_ingddeff.spec.js (1)

23-23: LGTM!

The test data and expected output are correctly updated to include the new max_access_valid_for_days property, maintaining consistency with other test files.

Also applies to: 63-63

Finishing Touches

  • 📝 Generate Docstrings (Beta)

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

@matt-fidd matt-fidd merged commit 45d53ff into actualbudget:master Jan 15, 2025
8 checks passed
@matt-fidd matt-fidd deleted the gcl-maxvalidfor branch January 15, 2025 23:34
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