Skip to content

feat(flags): Allow specifying flags to evaluate #67

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 1 commit into from
Mar 17, 2025

Conversation

haacked
Copy link
Collaborator

@haacked haacked commented Mar 16, 2025

This adds support for PostHog/posthog#29493 which allows specifying a set of flag keys to evaluate.

Fixes #62

This adds support for PostHog/posthog#29493 which allows specifying a set of flag keys to evaluate.

Fixes #62
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

Added support for specifying a subset of feature flags to evaluate via the /decide endpoint, allowing for more efficient feature flag evaluation by only requesting specific flags instead of all flags.

  • Added FlagKeysToEvaluate property to AllFeatureFlagsOptions class, initialized with empty list for backward compatibility
  • Updated GetFeatureFlagsFromDecideAsync in PostHogApiClient to include flag keys in request payload when specified
  • Added predicate-based request handling in FakeHttpMessageHandler to support testing flag key evaluation
  • Added comprehensive test coverage for both local and remote flag evaluation scenarios with specific keys

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

@haacked haacked merged commit ea321c6 into main Mar 17, 2025
4 checks passed
@haacked haacked deleted the haacked/62-specify-flags branch March 17, 2025 15:53
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.

chore(flags): Add support for specifying a set of keys to evaluate
1 participant