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

Gmail: restructure #872

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Gmail: restructure #872

merged 1 commit into from
Jan 7, 2025

Conversation

josephjclark
Copy link
Collaborator

@decarteret I've done a little restructure here with the following changes:

  • Adaptors.js now only contains user facing Operations
  • Utils.js contains all the support

I know a lot of our adaptors don't look like this, but it's a pattern I'm trying to push us towards. I think it's just neater.

In addition I've made a couple of little tweaks:

  • I've added expandReferences to the top of getContentsFrom Messages
  • I've removed some code that it unused (like the request function, which is generated for you in the original template)
  • I've removed unused unit tests

The expandReferences thing is what makes lazy state ($) work. Basically it means users can pass a function as an argument, and that function will be called by the adaptor, with the latest state, to get a value for that argument. This is really important to enable users to pass values from state into queries

I haven't tested any of this, but your test workflows should all work without any changes. Please check and then merge this down 🙏

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

@decarteret decarteret merged commit 3418920 into nhgh/gmail Jan 7, 2025
2 of 3 checks passed
@decarteret decarteret deleted the nhgh/gmail-structure branch January 7, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants