Skip to content

Conversation

@eligutovsky
Copy link
Member

@eligutovsky eligutovsky commented Jan 29, 2024

User description

Description of Changes

This PR is a result of a series of changes #93, #91, #90, #89, #87
that contains:

  • Rewrite Notification Service Extension with Codable model
  • Add notification fixtures and tests
  • Merge Kumulos storage with Optimove storage

Breaking Changes

  • the minimum supported iOS version set to iOS 13

Release Checklist

Prepare:

  • Detail any breaking changes. Breaking changes require a new major version number
  • Check pod lib lint passes
  • Update any relevant sections of the repository wiki pages on a branch

Bump versions in:

  • OptimoveCore.podspec

  • OptimoveNotificationServiceExtension.podspec

  • OptimoveSDK.podspec

  • OptimoveCore/Sources/Classes/Constants/SDKVersion.swift

  • README.md

  • CHANGELOG.md

  • Update major version numbers in wiki (basic integration + push guides)

Integration tests

T&T Only

  • Init SDK with only T&T credentials
  • Associate customer
  • Associate email
  • Track events

Mobile Only

  • Init SDK with all credentials
  • Track events
  • Associate customer (verify both backends)
  • Register for push
  • Opt-in for In-App
  • Send test push
  • Send test In-App
  • Receive / trigger deep link handler (In-App/Push)
  • Receive / trigger the content extension, render image and action buttons for push
  • Verify push opened handler

Deferred Deep Links

  • With app installed, trigger deep link handler
  • With app uninstalled, follow deep link, install test bundle, verify deep link read from Clipboard, trigger deep link handler

Combined

  • Track event for T&T, verify push received
  • Trigger scheduled campaign, verify push received
  • Trigger scheduled campaign, verify In-App received

Release:

  • Squash and merge to master
  • Delete branch once merged
  • Create tag from master matching chosen version
  • Run pod trunk push to publish to CocoaPods

Post Release:

  • Push wiki pages to master

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Refactor the SDK's data persistence by introducing a unified KeyValueStorage system and migrating existing user data, ensuring seamless upgrades and consistent data access. Rewrite the Notification Service Extension to utilize modern Swift Codable models and async/await for improved push notification handling, including badge management and media attachments. Modernize internal APIs and code structure by adjusting access controls and removing redundant components, aligning the SDK with iOS 13+ requirements.

TopicDetails
Unified Storage System Unify data persistence by introducing a new KeyValueStorage protocol and StorageKey enum, consolidating UserDefaults usage across standard and app group containers. This includes a significant migration (MigrationWork_6_0_0) to move existing data from the old Kumulos UserDefaults keys to the new Optimove StorageKey system, ensuring seamless upgrades and consistent data access throughout the SDK.
Modified files (40)
  • OptimobileShared/OptimobileHelper.swift
  • OptimoveSDK/Tests/Sources/Storage/KeyValueStorageTests.swift
  • OptimoveCore/Sources/Classes/OptimobileUserDefaultsKey.swift
  • OptimoveCore/Sources/Classes/OptimobileHelper.swift
  • OptimoveCore/Sources/Classes/OptimobileHelper.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+Analytics.swift
  • OptimoveSDK/Sources/Classes/Migration/Version.swift
  • OptimoveSDK/Sources/Classes/Migration/Version.swift
  • OptimoveCore/Sources/Classes/Storage/FileManager+AppGroup.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile.swift
  • OptimoveSDK/Sources/Classes/Optimobile/AnalyticsHelper.swift
  • OptimoveSDK/Sources/Classes/Migration/MigrationWork.swift
  • OptimoveSDK/Sources/Classes/Migration/MigrationWork.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+DeepLinking.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+DeepLinking.swift
  • OptimoveSDK/Sources/Classes/Storage/UserDefaults+Optimove.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Network/UrlBuilder.swift
  • OptimobileShared/AppGroupsHelper.swift
  • OptimoveCore/Sources/Classes/PendingNotificationHelper.swift
  • OptimoveSDK/Sources/Classes/DI/Assembly.swift
  • OptimoveSDK/Sources/Classes/DI/Assembly.swift
  • OptimoveSDK/Sources/Classes/OptimoveConfig.swift
  • OptimoveSDK/Sources/Classes/OptimoveConfig.swift
  • OptimoveSDK/Tests/Sources/OptimoveConfigBuilderTests.swift
  • OptimoveCore/Sources/Classes/Storage/KeyValueStorage.swift
  • OptimoveCore/Sources/Classes/Storage/KeyValueStorage.swift
  • OptimoveSDK/Sources/Classes/Optimobile/InApp/InAppManager.swift
  • OptimoveSDK/Sources/Classes/Optimobile/InApp/InAppManager.swift
  • OptimoveSDK/Tests/Sources/Storage/OptimoveStorageFacadeTests.swift
  • OptimoveSDK/Sources/Classes/Optimobile/OptimoveInApp.swift
  • OptimoveSDK/Sources/Classes/Optimobile/OptimoveInApp.swift
  • OptimoveCore/Sources/Classes/Storage/UserDefaults+AppGroup.swift
  • OptimoveCore/Sources/Classes/Extension/Bundle+HostApp.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+Stats.swift
  • OptimoveSDK/Sources/Classes/Optimove.swift
  • OptimoveSDK/Sources/Classes/Optimove.swift
  • OptimoveSDK/Sources/Classes/Storage/OptimoveStorage.swift
  • OptimoveSDK/Sources/Classes/Storage/OptimoveStorage.swift
  • OptimobileShared/KeyValPersistenceHelper.swift
Latest Contributors(2)
UserCommitDate
konstantin_a@optimove.comEmbedded-related-fixesJune 11, 2025
adamball1Changes-as-a-result-of...April 24, 2025
Internal API Refinements Improve the internal architecture and maintainability of the SDK by adjusting access control (public to internal), removing redundant code, and updating various internal components to align with modern Swift practices and the new iOS 13+ minimum version. This includes changes to configuration models, network clients, and utility classes, enhancing encapsulation and preparing for future development.
Modified files (62)
  • OptimoveSDK/Sources/Classes/Configuration/RemoteConfiguration/RemoteConfigurationRequestBuilder.swift
  • OptimoveSDK/Tests/Sources/Storage/OptimoveFileManagerTests.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkError.swift
  • Shared/Sources/Mocks/MockOptimoveStorage.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkClient.swift
  • OptimoveSDK/Sources/Classes/Storage/FileManager+Optimove.swift
  • OptimoveSDK/Sources/Classes/JSON/Querying.swift
  • OptimoveSDK/Sources/Classes/Operations/AsyncOperation.swift
  • OptimoveSDK/Sources/Classes/Configuration/Global/GlobalConfig.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkResult.swift
  • OptimoveSDK/Sources/Classes/Configuration/Configuration.swift
  • OptimoveSDK/Sources/Classes/Coding/RuntimeCodingKey.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Network/AuthorizationMediator.swift
  • OptimoveSDK/Sources/Classes/Optimobile/SessionHelper.swift
  • OptimoveSDK/Tests/Resources/configs.json
  • OptimoveSDK/Tests/Sources/Mocks/MockConfigurationRepository.swift
  • Shared/Sources/Fixture/GlobalConfigFixture.swift
  • OptimoveSDK/Sources/Classes/Optistream/OptistreamEvent.swift
  • OptimoveCore/Sources/Classes/Configurations/Tenant/RealtimeMetaData.swift
  • OptimoveSDK/Sources/Classes/JSON/Merging.swift
  • OptimoveSDK/Tests/Resources/dev.tid.107.optipush.json
  • OptimoveSDK/Sources/Classes/Configuration/Tenant/OptitrackMetaData.swift
  • OptimoveSDK/Sources/Classes/Optistream/OptistreamEventBuilder.swift
  • OptimoveSDK/Sources/Classes/Configuration/ConfigurationBuilder.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+Location.swift
  • Shared/Sources/OptimoveTestCase.swift
  • Shared/Sources/OptimoveTestCase.swift
  • OptimoveSDK/Sources/Classes/Repository/ConfigurationRepository.swift
  • OptimoveSDK/Sources/Classes/Configuration/Tenant/Parameter.swift
  • OptimoveSDK/Sources/Classes/Events/Event.swift
  • OptimoveSDK/Sources/Classes/DataStructs/RingBuffer.swift
  • OptimoveSDK/Sources/Classes/Components/OptiTrack/OptiTrack.swift
  • Shared/Sources/StubEvent.swift
  • OptimoveSDK/Tests/Sources/Configurations/Tenant/TenantConfigTests.swift
  • OptimoveSDK/Tests/Sources/NetworkClientTests.swift
  • OptimoveSDK/Sources/Classes/Factories/MainFactory.swift
  • OptimoveCore/Sources/Classes/Extension/utsname+DeviceModel.swift
  • OptimoveCore/Sources/Classes/Extension/Result+Successful.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Credentials.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkRequest.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkRequest.swift
  • OptimoveSDK/Sources/Classes/States/SdkState.swift
  • OptimoveSDK/Sources/Classes/States/SdkState.swift
  • OptimoveSDK/Sources/Assets/.gitkeep
  • OptimoveSDK/Sources/Classes/Optimobile/InApp/InAppModels.swift
  • OptimoveSDK/Sources/Classes/Configuration/Tenant/TenantConfig.swift
  • OptimoveSDK/Sources/Classes/JSON/Initialization.swift
  • OptimoveSDK/Sources/Classes/Optistream/OptistreamNetworking.swift
  • OptimoveSDK/Sources/Classes/Extensions/Bundle+AppVersion.swift
  • OptimoveSDK/Sources/Classes/Extensions/Bundle+AppVersion.swift
  • OptimoveCore/Sources/Assets/.gitkeep
  • Shared/Sources/Fixture/TenantConfigFixture.swift
  • OptimoveSDK/Tests/Sources/Configurations/Global/GlobalConfigTests.swift
  • OptimoveSDK/Tests/Sources/Configurations/ConfigurationBuilderTests.swift
  • OptimoveSDK/Sources/Classes/Configuration/Tenant/EventConfig.swift
  • Shared/Sources/Mocks/OptistreamNetworkingMock.swift
  • Shared/Sources/Fixture/ConfigurationFixture.swift
  • OptimoveSDK/Sources/Classes/Configuration/Tenant/RealtimeMetaData.swift
  • OptimoveSDK/Sources/Classes/Optimobile/CwlSysctl.swift
  • OptimoveSDK/Sources/Classes/NetworkClient/NetworkResponse.swift
  • OptimoveSDK/Sources/Classes/JSON/JSON.swift
  • OptimoveSDK/Sources/Classes/Storage/FileStorage.swift
Latest Contributors(2)
UserCommitDate
konstantin_a@optimove.comInvalidating-sessions-...January 04, 2025
eli_g@optimove.comtests-fix-testsJanuary 02, 2024
Push Notification Modernization Rewrite the Notification Service Extension and core push notification handling to leverage Swift's Codable protocol for robust payload parsing and async/await for asynchronous operations. This includes introducing new PushNotification and MediaHelper models, updating badge management, and ensuring compatibility with iOS 13+ features, while also adding comprehensive unit tests for the new components.
Modified files (31)
  • OptimoveNotificationServiceExtension/Sources/CategoryManager.swift
  • OptimobileShared/PendingNotification.swift
  • OptimoveNotificationServiceExtension/Sources/OptimobileShared
  • OptimoveCore/Tests/Resources/notification-buttons.json
  • OptimoveNotificationServiceExtension/Sources/OptimoveNotificationService.swift
  • OptimoveNotificationServiceExtension/Sources/OptimoveNotificationService.swift
  • Package.swift
  • OptimoveSDK/Sources/Classes/Extensions/Notification.swift
  • OptimoveSDK/Sources/Classes/OptimobileShared
  • OptimoveSDK/Sources/Classes/Optimobile/InApp/InAppPresenter.swift
  • OptimoveCore/Tests/Resources/notification-background.json
  • OptimoveCore/Sources/Classes/OptimobileEvent.swift
  • OptimoveNotificationServiceExtension/Tests/Sources/CategoryManagerTests.swift
  • OptimoveNotificationServiceExtension/Tests/Sources/OptimoveNotificationServiceExtensionTests.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+Push.swift
  • OptimoveSDK/Sources/Classes/Optimobile/Optimobile+Push.swift
  • OptimoveCore/Tests/Sources/PushNotificationTests.swift
  • OptimoveCore/Tests/Sources/PushNotificationTests.swift
  • OptimoveSDK/Sources/Classes/Optimobile/OptimoveUserNotificationCenterDelegate.swift
  • OptimoveCore/Sources/Classes/PendingNotification.swift
  • OptimoveCore/Sources/Classes/PushNotification.swift
  • OptimoveCore/Sources/Classes/PushNotification.swift
  • OptimobileShared/MediaHelper.swift
  • OptimoveCore/Tests/Resources/notification-image.json
  • OptimoveCore/Tests/Resources/notification-badge.json
  • OptimoveCore/Tests/Sources/MediaHelperTests.swift
  • OptimoveCore/Tests/Resources/notification-url.json
  • OptimoveCore/Sources/Classes/MediaHelper.swift
  • OptimoveCore/Tests/Resources/notification-deeplink.json
  • OptimobileShared/Extensions/Notifications.swift
  • OptimoveCore/Tests/Resources/notification-message.json
Latest Contributors(2)
UserCommitDate
konstantin_a@optimove.comRemoved-redundant-if-s...June 03, 2025
daniela_t@optimove.comAdd-some-testsMay 05, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@eligutovsky eligutovsky marked this pull request as ready for review January 29, 2024 22:26
@k-antipochkin
Copy link
Contributor

Can we change the version to 6.0 as part of this PR? Maybe makes sense to change the target branch. Should we add the Changelog as well? are there any docs we need to change in the wiki?

@eligutovsky
Copy link
Member Author

Can we change the version to 6.0 as part of this PR? Maybe makes sense to change the target branch. Should we add the Changelog as well? are there any docs we need to change in the wiki?

I don't think we have breaking changes here for a major version.
The CHANGELOG must be updated.

@k-antipochkin
Copy link
Contributor

Can we change the version to 6.0 as part of this PR? Maybe makes sense to change the target branch. Should we add the Changelog as well? are there any docs we need to change in the wiki?

I don't think we have breaking changes here for a major version. The CHANGELOG must be updated.

Won't a client targeting a lower then iOS version 13 be forced to upgrade?

@eligutovsky
Copy link
Member Author

Can we change the version to 6.0 as part of this PR? Maybe makes sense to change the target branch. Should we add the Changelog as well? are there any docs we need to change in the wiki?

I don't think we have breaking changes here for a major version. The CHANGELOG must be updated.

Won't a client targeting a lower then iOS version 13 be forced to upgrade?

You're right. I'm going to change it asap.

@eligutovsky eligutovsky changed the base branch from rc/5.7.0 to rc/6.0.0 February 6, 2024 07:38
@optivadim
Copy link

@CodiumAI-Agent /review

@QodoAI-Agent
Copy link

PR Analysis

  • 🎯 Main theme: Refactoring and merging storage systems
  • 📝 PR summary: This PR is a significant refactor of the Optimove SDK, primarily focusing on merging the Kumulos and Optimove storage systems. It also includes a rewrite of the Notification Service Extension with a Codable model, the addition of notification fixtures and tests, and a change in the minimum supported iOS version to iOS 13.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: Yes
  • ⏱️ Estimated effort to review [1-5]: 5, because the PR contains a large number of changes across multiple files, including significant refactoring and functionality changes. It requires a deep understanding of the codebase to review effectively.

PR Feedback

💡 General suggestions: The PR is well-structured and includes a comprehensive list of changes. The refactor appears to be well thought out and the addition of tests is commendable. However, it would be beneficial to ensure that all changes are thoroughly tested, especially given the scale of the refactor. It would also be beneficial to ensure that the changes are backward compatible where possible, or to provide clear migration paths where not.

🤖 Code feedback:
relevant fileOptimoveSDK/Sources/Classes/Optimobile/Optimobile+Push.swift
suggestion      

Consider adding error handling for the case where the PushNotification initialization fails. Currently, the error is logged but the function continues to execute which may lead to unexpected behavior. [important]

relevant line"+ } catch {"

relevant fileOptimoveSDK/Sources/Classes/Optimobile/Optimobile+Push.swift
suggestion      

It seems that the pushHandleOpen and pushHandleDismissed functions have similar error handling logic. Consider refactoring this into a separate function to avoid code duplication. [medium]

relevant line"+ } catch {"

relevant fileOptimoveSDK/Sources/Classes/Optimobile/CwlSysctl.swift
suggestion      

The sysctlString and sysctlInt functions are using try! which will cause a runtime error if an exception is thrown. Consider replacing try! with try? and providing a default value or error handling. [important]

relevant line"+ static var hostName: String { return try! sysctlString(levels: CTL_KERN, KERN_HOSTNAME)


✨ Usage guide:

Overview:
The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...

With a configuration file, use the following template:

[pr_reviewer]
some_config1=...
some_config2=...
Utilizing extra instructions

The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

Examples for extra instructions:

[pr_reviewer] # /review #
extra_instructions="""
In the code feedback section, emphasize the following:
- Does the code logic cover relevant edge cases?
- Is the code logic clear and easy to understand?
- Is the code logic efficient?
...
"""

Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

How to enable\disable automation
  • When you first install PR-Agent app, the default mode for the review tool is:
pr_commands = ["/review", ...]

meaning the review tool will run automatically on every PR, with the default configuration.
Edit this field to enable/disable the tool, or to change the used configurations

About the 'Code feedback' section

The review tool provides several type of feedbacks, one of them is code suggestions.
If you are interested only in the code suggestions, it is recommended to use the improve feature instead, since it dedicated only to code suggestions, and usually gives better results.
Use the review tool if you want to get a more comprehensive feedback, which includes code suggestions as well.

Auto-labels

The review tool can auto-generate two specific types of labels for a PR:

  • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
  • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
Extra sub-tools

The review tool provides a collection of possible feedbacks about a PR.
It is recommended to review the possible options, and choose the ones relevant for your use case.
Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
require_score_review, require_soc2_review, enable_review_labels_effort, and more.

More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

  • /review: Request a review of your Pull Request.
  • /describe: Update the PR title and description based on the contents of the PR.
  • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
  • /ask <QUESTION>: Ask a question about the PR.
  • /update_changelog: Update the changelog based on the PR's contents.
  • /add_docs 💎: Generate docstring for new components introduced in the PR.
  • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
  • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the review usage page for a comprehensive guide on using this tool.

@QodoAI-Agent
Copy link

PR Review

⏱️ Estimated effort to review [1-5]

4, due to the extensive changes across multiple files, including refactoring, feature enhancements, and the introduction of new functionalities. The migration of UserDefaults and integration of new Codable models for push notifications require careful review to ensure data integrity and correct functionality. Additionally, the modifications in the notification service extension and the analytics helper suggest significant logic changes that need thorough testing.

🧪 Relevant tests

Yes

🔍 Possible issues

Possible Bug: The migration process from Kumulos UserDefaults to Optimove UserDefaults in MigrationWork_6_0_0 does not handle potential failures or exceptions, which might lead to data loss or inconsistencies.

Code Duplication: Similar code patterns are used in OptimoveUserNotificationCenterDelegate and OptimoveNotificationServiceExtensionTests for handling push notifications, suggesting a potential for refactoring into a shared utility or service.

Performance Concern: The CategoryManager's method maybePruneCategories could potentially lead to performance issues with a large number of categories due to its computational complexity.

🔒 Security concerns

No

Code feedback:
relevant fileOptimoveSDK/Sources/Classes/Optimobile/Optimove+DeepLinking.swift
suggestion      

Consider adding error handling for UserDefaults operations to prevent potential crashes or undefined behaviors during the deep link handling process. [important]

relevant linestorage.set(value: true, key: .deferredLinkChecked)

relevant fileOptimoveSDK/Sources/Classes/Migration/MigrationWork.swift
suggestion      

Implement error handling for the migration process from Kumulos UserDefaults to Optimove UserDefaults to ensure data integrity and handle any exceptions that may occur. [important]

relevant linelet optimoveStorage = try! UserDefaults.optimove()

relevant fileOptimoveSDK/Sources/Classes/Optimobile/AnalyticsHelper.swift
suggestion      

Refactor the AnalyticsHelper to use dependency injection for the OptimobileHelper, improving testability and reducing coupling. [medium]

relevant linelet optimobileHelper: OptimobileHelper

relevant fileOptimoveNotificationServiceExtension/Sources/CategoryManager.swift
suggestion      

Optimize the maybePruneCategories method to handle a large set of categories more efficiently, potentially using more performant data structures or algorithms. [medium]

relevant linelet (prunedCategories, prunedCategoryIds) = CategoryManager.maybePruneCategories(


✨ Review tool usage guide:

Overview:
The review tool scans the PR code changes, and generates a PR review. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:

/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...

With a configuration file, use the following template:

[pr_reviewer]
some_config1=...
some_config2=...
Utilizing extra instructions

The review tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project.

Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize.

Examples for extra instructions:

[pr_reviewer] # /review #
extra_instructions="""
In the 'possible issues' section, emphasize the following:
- Does the code logic cover relevant edge cases?
- Is the code logic clear and easy to understand?
- Is the code logic efficient?
...
"""

Use triple quotes to write multi-line instructions. Use bullet points to make the instructions more readable.

How to enable\disable automation
  • When you first install PR-Agent app, the default mode for the review tool is:
pr_commands = ["/review", ...]

meaning the review tool will run automatically on every PR, with the default configuration.
Edit this field to enable/disable the tool, or to change the used configurations

Auto-labels

The review tool can auto-generate two specific types of labels for a PR:

  • a possible security issue label, that detects possible security issues (enable_review_labels_security flag)
  • a Review effort [1-5]: x label, where x is the estimated effort to review the PR (enable_review_labels_effort flag)
Extra sub-tools

The review tool provides a collection of possible feedbacks about a PR.
It is recommended to review the possible options, and choose the ones relevant for your use case.
Some of the feature that are disabled by default are quite useful, and should be considered for enabling. For example:
require_score_review, require_soc2_ticket, and more.

Auto-approve PRs

By invoking:

/review auto_approve

The tool will automatically approve the PR, and add a comment with the approval.

To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following:

[pr_reviewer]
enable_auto_approval = true

(this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository)

You can also enable auto-approval only if the PR meets certain requirements, such as that the estimated_review_effort is equal or below a certain threshold, by adjusting the flag:

[pr_reviewer]
maximal_review_effort = 5
More PR-Agent commands

To invoke the PR-Agent, add a comment using one of the following commands:

  • /review: Request a review of your Pull Request.
  • /describe: Update the PR title and description based on the contents of the PR.
  • /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
  • /ask <QUESTION>: Ask a question about the PR.
  • /update_changelog: Update the changelog based on the PR's contents.
  • /add_docs 💎: Generate docstring for new components introduced in the PR.
  • /generate_labels 💎: Generate labels for the PR based on the PR's contents.
  • /analyze 💎: Automatically analyzes the PR, and presents changes walkthrough for each component.

See the tools guide for more details.
To list the possible configuration parameters, add a /config comment.

See the review usage page for a comprehensive guide on using this tool.

eligutovsky and others added 5 commits March 26, 2024 21:19
…/notification-service-extension-2

# Conflicts:
#	CHANGELOG.md
#	OptimoveSDK/Sources/Classes/Optimobile/Optimobile+DeepLinking.swift
…/notification-service-extension-2

# Conflicts:
#	OptimoveSDK/Sources/Classes/Optimobile/Optimobile.swift
…/notification-service-extension-2

# Conflicts:
#	OptimoveSDK/Sources/Classes/DI/Assembly.swift
#	OptimoveSDK/Sources/Classes/Migration/MigrationWork.swift
#	OptimoveSDK/Sources/Classes/Migration/Version.swift
#	OptimoveSDK/Sources/Classes/Storage/OptimoveStorage.swift
@dsellick-opti dsellick-opti changed the base branch from rc/6.0.0 to master September 6, 2024 14:47
@pr-work-item-validator
Copy link

👋 Hey @eligutovsky,

❗️ Work Item link check failed: There is no Work Item linked to this PR.

🧩 Please add the Work Item ID to the PR title or description using the "Edit" option in the format below:
AB#XXXXX - replace X with a valid Work Item ID.

🟢 Once added, the validation will automatically run again!

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.

5 participants