Skip to content

chore: add api key preset for extension / editor #30934

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

Merged
merged 4 commits into from
Apr 8, 2025
Merged

Conversation

joshsny
Copy link
Contributor

@joshsny joshsny commented Apr 8, 2025

Problem

We want to make it easy enough to create an API key for the editor / extension.

Changes

Add a preset with read access to a bunch of things we'll use in the extension. In future, this might need a seperate max scope.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Ran locally

@joshsny joshsny requested a review from a team April 8, 2025 12:58
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds a new "editor" API key preset with focused scopes and integrates environment filtering to show cloud-only presets only in Cloud or development mode.

  • frontend/src/scenes/settings/user/personalAPIKeysLogic.tsx: Introduced the "editor" preset with required scopes marked as cloud-only.
  • frontend/src/scenes/settings/user/PersonalAPIKeys.tsx: Updated the preset dropdown to filter presets based on the isCloudOrDev flag.

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@joshsny
Copy link
Contributor Author

joshsny commented Apr 8, 2025

@kappa90 do you want me to close this or are we happy to merge?

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Size Change: -20 B (0%)

Total Size: 13.2 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 13.2 MB -20 B (0%)

compressed-size-action

@kappa90
Copy link
Contributor

kappa90 commented Apr 8, 2025

@kappa90 do you want me to close this or are we happy to merge?

merge!

@joshsny joshsny enabled auto-merge (squash) April 8, 2025 13:50
@joshsny joshsny merged commit 32cc17b into master Apr 8, 2025
109 checks passed
@joshsny joshsny deleted the editor-api-key-preset branch April 8, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants