Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Update PULL_REQUEST_TEMPLATE.md #3801

Merged
merged 12 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
review
  • Loading branch information
Chris Yang committed Apr 19, 2021
commit f7fe93550902ce9e15ad1c66e60cfd7ffade1104
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that unlike the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo. See [plugin_tool format](../script/tool/README.md#format-code))
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use `dart format`. See [plugin_tool format](../script/tool/README.md#format-code))
- [ ] I signed the [CLA].
- [ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. `[shared_preferences]`
- [ ] I listed at least one issue that this PR fixes in the description above.
Expand Down
18 changes: 8 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ for any of the following plugins, we encourage you to submit it
## Setting up tools

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.)
Your are likely to use some of the tooling script locally in your contributing journey.
There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You replied Done to the comment about rewriting this, but it doesn't seem to have been applied here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, done.

See [plugin_tools](./script/tool/README.MD) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you scrub this for all instances of .MD and replace them with .md? I just got a 404 from one of these links due to the incorrect capitalization.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks! Fix is here: #3815


## Running the examples
Expand Down Expand Up @@ -158,10 +158,10 @@ To start working on a patch:
* Hack away.
* Verify changes with [plugin_tools](./script/tool/README.MD).
```sh
cd script/tool && pub get
dart run ./script/tool/lib/src/main.dart format --plugins plugin_name
pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name
pub run ./script/tool/lib/src/main.dart test --plugins plugin_name
cd script/tool && pub get && cd ../../
dart ./script/tool/lib/src/main.dart format --plugins plugin_name
dart ./script/tool/lib/src/main.dart analyze --plugins plugin_name
dart ./script/tool/lib/src/main.dart test --plugins plugin_name
```
* `git commit -a -m "<your informative commit message>"`
* `git push origin <name_of_your_branch>`
Expand Down Expand Up @@ -191,8 +191,6 @@ You may also add it to the AUTHORS file for [the repository](AUTHORS).

### The review process

* This is a new process we are currently experimenting with, feedback on the process is welcomed at the Gitter contributors channel. *

Reviewing PRs often requires a non trivial amount of time. We prioritize issues, not PRs, so that we use our maintainers' time in the most impactful way. Issues pertaining to this repository are managed in the [flutter/flutter issue tracker and are labeled with "plugin"](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Aplugin+sort%3Areactions-%2B1-desc). Non trivial PRs should have an associated issue that will be used for prioritization. See the [prioritization section](https://github.com/flutter/flutter/wiki/Issue-hygiene#prioritization) in the Flutter wiki to understand how issues are prioritized.

Newly opened PRs first go through initial triage which results in one of:
Expand Down Expand Up @@ -234,12 +232,12 @@ Some things to keep in mind before publishing the release:
from people that immediately adopt it, and uncovering and resolving those
support issues will take more time if you're unavailable.

Releasing a package is a two-step process.
To release a package, a [publish-plugin](./script/tool/README.MD#publish-and-tag-release) tool script should be used. This command publishes the new version to pub.dev, and tags the commit in the format of `<package_name>-v<package_version>` then pushes it to upstream.

Alternatively, one can release a package in the below 2-step process.

1. Push the package update to [pub.dev](https://pub.dev) using `pub publish`.
2. Tag the commit with git in the format of `<package_name>-v<package_version>`,
and then push the tag to the `flutter/plugins` master branch. This can be
done manually with `git tag $tagname && git push upstream $tagname` while
checked out on the commit that updated `version` in `pubspec.yaml`.

For convenience, a [publish-plugin](./script/tool/README.MD#publish-and-tag-release) tool script could be used to do both step at once.
21 changes: 11 additions & 10 deletions script/tool/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# Flutter Plugin Tools

Note: The commands in tools are designed to run under plugins/ or plugins/packages/.
Note: The commands in tools are designed to run at the root of the repository or `<repository-root>/packages/`.

To run the tool:

```sh
dart pub get
dart run lib/src/main.dart <args>
cd <path_to_plugins>/script/tool && dart pub get && cd ../../
dart run ./script/tool/lib/src/main.dart <args>
```

## Format Code

```sh
cd <path_to_plugins>/packages
dart run ./script/tool/lib/src/main.dart format --plugins plugin_name
cd <path_to_plugins>
dart run /script/tool/lib/src/main.dart format --plugins plugin_name
```

## Run static analyzer

```sh
cd <path_to_plugins>/packages
cd <path_to_plugins>
pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name
```

## Run dart unit tests
## Run Dart unit tests

```sh
cd <path_to_plugins>/packages
cd <path_to_plugins>
pub run ./script/tool/lib/src/main.dart test --plugins plugin_name
```

## Run XCTests

```sh
cd <path_to_plugins>/packages
cd <path_to_plugins>
dart run lib/src/main.dart xctest --target RunnerUITests --skip <plugins_to_skip>
```

## Publish and tag release

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention here that you should be at the commit of the change being published? I was doing this wrong for quite a while.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. added a git checkout command in the sh sample

``sh
cd <path_to_plugins>/packages
cd <path_to_plugins>
git checkout <commit_hash_need_to_publish>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/need_to/to/

dart run ./script/tool/lib/src/main.dart publish-plugin --package <package>
``

Expand Down