Skip to content

Conversation

khendrikse
Copy link
Contributor

🎉 Thanks for submitting a pull request! 🎉

Summary

This allows netlify config to call jigsaw using a new token netlify-sdk-build-bot-token. This is behind the feature flag send_build_bot_token_to_jigsaw.

We also pass extensionMetaData to build event handlers. This will only be populated for extensions, so normal build-plugins will not receive this information.

All of this does the following:

  1. We do an authenticated call to jigsaw using the token, in buildbot this will be a buildbot token, in the CLI a user token
  2. Jigsaw checks if this token is allowed to get a list of installed extensions for this site
  3. We receive a list of extensions installed on the team, each extension has an extension-specific token that is later on passed along to the extensions build event handler.
  4. The SDK uses that extension token to do authenticated calls to other endpoints.

For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@khendrikse khendrikse requested a review from a team as a code owner February 20, 2025 15:20
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

getAccounts(api),
getAddons(api, siteId),
getIntegrations({ siteId, testOpts, offline, accountId }),
getIntegrations({ siteId, testOpts, offline, accountId, token, sendBuildBotTokenToJigsaw }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we pass along the whole featureFlags object down the chain?
Good or bad aside, this appears to be the pattern I'm seeing being used in general in this repo. I'm also thinking of the situation where you need to add another flag in for some reason, passing the object down means you don't need to make as many changes.

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@khendrikse khendrikse requested a review from mrstork February 21, 2025 11:44
Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

Copy link
Contributor

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@khendrikse khendrikse merged commit 7a2525f into main Feb 24, 2025
32 of 33 checks passed
@khendrikse khendrikse deleted the cpla-2459/use-extension-metadata-for-beh-and-authenticate-extensions-call branch February 24, 2025 11:16
This was referenced Sep 2, 2025
This was referenced Sep 24, 2025
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