Skip to content

Commit 214bd71

Browse files
authored
Merge branch 'main' into fear/firebase-feature-flags
2 parents e147a00 + 3f8357e commit 214bd71

File tree

5 files changed

+26
-7
lines changed

5 files changed

+26
-7
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Get auth token
2121
id: token
22-
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v1.12.0
22+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
2323
with:
2424
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2525
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Sentry.addFeatureFlag('my-feature', true);
2121

2222
### Dependencies
2323

24-
- Bump Android SDK from v8.2.0 to v8.6.0 ([#2819](https://github.com/getsentry/sentry-dart/pull/2819), [#2831](https://github.com/getsentry/sentry-dart/pull/2831))
25-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#860)
26-
- [diff](https://github.com/getsentry/sentry-java/compare/8.2.0...8.6.0)
24+
- Bump Android SDK from v8.2.0 to v8.7.0 ([#2819](https://github.com/getsentry/sentry-dart/pull/2819), [#2831](https://github.com/getsentry/sentry-dart/pull/2831), [#2848](https://github.com/getsentry/sentry-dart/pull/2848))
25+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#870)
26+
- [diff](https://github.com/getsentry/sentry-java/compare/8.2.0...8.7.0)
2727
- Bump Cocoa SDK from v8.46.0 to v8.48.0 ([#2820](https://github.com/getsentry/sentry-dart/pull/2820))
2828
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8480)
2929
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.46.0...8.48.0)

dart/lib/src/sentry.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ class Sentry {
360360
/// Gets the current active transaction or span bound to the scope.
361361
static ISentrySpan? getSpan() => _hub.getSpan();
362362

363-
static Future<void> addFeatureFlag(String name, bool value) async {
363+
static Future<void> addFeatureFlag(String name, dynamic value) async {
364+
if (value is! bool) {
365+
return;
366+
}
367+
364368
final featureFlagsIntegration = currentHub.options.integrations
365369
.whereType<FeatureFlagsIntegration>()
366370
.firstOrNull;

dart/test/sentry_test.dart

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void main() {
301301
);
302302
}, onPlatform: {'vm': Skip()});
303303

304-
test('should add feature flagg FeatureFlagsIntegration', () async {
304+
test('should add feature flag FeatureFlagsIntegration', () async {
305305
await Sentry.init(
306306
options: defaultTestOptions(),
307307
(options) => options.dsn = fakeDsn,
@@ -321,6 +321,21 @@ void main() {
321321
);
322322
});
323323

324+
test('addFeatureFlag should ignore non-boolean values', () async {
325+
await Sentry.init(
326+
options: defaultTestOptions(),
327+
(options) => options.dsn = fakeDsn,
328+
);
329+
330+
await Sentry.addFeatureFlag('foo1', 'some string');
331+
await Sentry.addFeatureFlag('foo2', 123);
332+
await Sentry.addFeatureFlag('foo3', 1.23);
333+
334+
final featureFlagsContext =
335+
Sentry.currentHub.scope.contexts[SentryFeatureFlags.type];
336+
expect(featureFlagsContext, isNull);
337+
});
338+
324339
test('should close integrations', () async {
325340
final integration = MockIntegration();
326341

flutter/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ android {
6060
}
6161

6262
dependencies {
63-
api 'io.sentry:sentry-android:8.6.0'
63+
api 'io.sentry:sentry-android:8.7.0'
6464
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
6565

6666
// Required -- JUnit 4 framework

0 commit comments

Comments
 (0)