Skip to content
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

Add more information to CONTRIBUTING.MD #2413

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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] <command you want to test>`.

## Debugging patrol_cli

Changes to Patrol CLI can be debugged using the following configuration:

### Visual Studio Code
Expand Down Expand Up @@ -44,3 +67,15 @@ project you want to test and updating paths to the target tests in `arguments`.
</configuration>
</component>
```

## 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.
Loading