diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d673f824..b1f6cb447 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,29 @@ # Contributing -If you're thinking about contributing to Patrol, thank you! We appreciate your help. +If you're thinking about contributing to Patrol, thank you! We appreciate your help. Before you get started, we encourage you to read this document. It should make your contributing experience a bit better. + +## Opening a PR + +Before opening a PR with your changes, make sure you have updated the changelog for the package you modified. + +In the PR description mention the issue that this PR resolves. If that issue doesn't exist, create one or describe in detail the changes introduced by this PR. + +Use `## Unreleased` title if you're not sure what should be next version number. + +Be aware that `test android emulator` and `test android emulator webview` workflows will fails due to insufficient permission of a contributor. Those will have to be re-run by someone with the write access in the repository. + +## Running patrol_cli locally + +If you want to work with a local version of patrol_cli, you can pick one of two approaches: + +Activate patrol_cli locally by typing `dart pub global activate --source path [path to packages/patrol_cli]`. After that you can use `patrol` command exactly the same as any other pub package. + + OR + +Use `dart run [path to packages/patrol_cli] `. + +## Debugging patrol_cli + Changes to Patrol CLI can be debugged using the following configuration: ### Visual Studio Code @@ -44,3 +67,15 @@ project you want to test and updating paths to the target tests in `arguments`. ``` + +## Implementing native interactions + +Native methods API is generated from a schema. If you wish to modify any of these methods, follow steps from below: + +1. Go to `schema.dart` in the root directory of the repository. +2. Find a method or a request/response class that you wish to modify, apply your changes. +3. Run `./gen_from_schema` script to regenerate the contracts. + +## Working with patrol_devtools_extension + +If you plan to use the local version of Patrol to test/modify the Patrol DevTools extension, you need to deploy it first. To do this, navigate to the `patrol_devtools_extension` folder and run the `./publish_to_patrol_extension` script.