[go: nahoru, domu]

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

Update PULL_REQUEST_TEMPLATE.md #3801

merged 12 commits into from
Apr 20, 2021

Conversation

cyanglaz
Copy link
Contributor
@cyanglaz cyanglaz commented Apr 8, 2021

@@ -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].
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo.)
Copy link
Member

Choose a reason for hiding this comment

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

[ ] I have formatted this PR with `dartfmt -w .`, read the [Flutter Style Guide] and followed the [C++, Objective-C, Java style guides].

Is there a plugins command that we can provide so users can quickly format all the source they might have touched in their PR? Something that guarantees that the format step will pass?

Copy link

Choose a reason for hiding this comment

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

does it make sense to say dart run ./script/tool/lib/src/main.dart format this those all of those.

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

@@ -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 not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo.)
- [ ] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. (Note that not like the flutter/flutter repo, we do use dart formatter in the flutter/plugins repo. Run `dart run ./script/tool/lib/src/main.dart format` under plugins/ to auto format all source code.)
Copy link

Choose a reason for hiding this comment

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

not like the -> unlike the

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This will only work if they have done a pub get there. I think we should put instructions in CONTRIBUTING.md, and then link directly to that part of it from here.

@cyanglaz
Copy link
Contributor Author

@stuartmorgan @ditman @blasten I updated the contribution guide to reflect the new tooling process we use, and updated the template to point user there.

@cyanglaz cyanglaz requested review from ditman and blasten April 14, 2021 18:11
@@ -48,6 +48,14 @@ for any of the following plugins, we encourage you to submit it
fetch from the master repository, not your clone, when running `git fetch`
et al.)


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

CONTRIBUTING.md Outdated

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.
See [plugin_tools](./script/tool/README.MD) for more details
Copy link

Choose a reason for hiding this comment

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

Suggested change
See [plugin_tools](./script/tool/README.MD) for more details
See [plugin_tools](./script/tool/README.MD) for more details.

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

CONTRIBUTING.md Outdated
pub global run flutter_plugin_tools format --plugins plugin_name
pub global run flutter_plugin_tools analyze --plugins plugin_name
pub global run flutter_plugin_tools test --plugins plugin_name
$ cd script/tool & pub get
Copy link

Choose a reason for hiding this comment

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

nit: no need for $

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


``sh
cd <path_to_plugins>/packages
dart run ./script/tool/lib/src/main.dart publish-plugin --package $package
Copy link

Choose a reason for hiding this comment

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

what is $package? did you mean <package>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, done

Comment on lines 47 to 48
By default the tool tries to push tags to the `upstream` remote, but that and
some additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information.
Copy link

Choose a reason for hiding this comment

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

"but that and some additional settings".

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

Copy link
Contributor Author
@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

@blasten Updated per your comments!

CONTRIBUTING.md Outdated
pub global run flutter_plugin_tools format --plugins plugin_name
pub global run flutter_plugin_tools analyze --plugins plugin_name
pub global run flutter_plugin_tools test --plugins plugin_name
$ cd script/tool & pub get
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

@@ -48,6 +48,14 @@ for any of the following plugins, we encourage you to submit it
fetch from the master repository, not your clone, when running `git fetch`
et al.)


## Setting up tools

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

CONTRIBUTING.md Outdated

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.
See [plugin_tools](./script/tool/README.MD) for more details
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


``sh
cd <path_to_plugins>/packages
dart run ./script/tool/lib/src/main.dart publish-plugin --package $package
Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, done

Comment on lines 47 to 48
By default the tool tries to push tags to the `upstream` remote, but that and
some additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information.
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

@@ -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].
- [ ] 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))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: `dart format`

@@ -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].
- [ ] 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))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: The structure would work better here if this said "Note that unlike the flutter/flutter repo, the flutter/plugins repo does use `dart format`."

CONTRIBUTING.md Outdated
## Setting up tools

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about just: "There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR.". It seems odd to frame it in terms of CI first when that's not the use case for most readers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense! Done

CONTRIBUTING.md Outdated
pub global run flutter_plugin_tools test --plugins plugin_name
* Verify changes with [plugin_tools](./script/tool/README.MD).
```sh
cd script/tool && pub get
Copy link
Contributor

Choose a reason for hiding this comment

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

This is missing a cd back to the repo root.

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

CONTRIBUTING.md Outdated
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these all be dart?

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

@@ -1,8 +1,60 @@
# Flutter Plugin Tools

Note: The commands in tools are designed to run under plugins/ or plugins/packages/.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/under plugins/at the root of the repository/ (and similar for the second part); there's no guarantee that the local checkout is called packages even if it's the most likely scenario.

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. The I assume you meant "there's no guarantee that the local checkout is called plugins". The packages folder is defined in the repo.

@@ -1,8 +1,60 @@
# Flutter Plugin Tools

Note: The commands in tools are designed to run under plugins/ or plugins/packages/.

To run the tool:

```sh
dart pub get
dart run lib/src/main.dart <args>
Copy link
Contributor

Choose a reason for hiding this comment

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

This command is misleading, given that as we've just said above this isn't the directory you should be in when running the tool.

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

## Format Code

```sh
cd <path_to_plugins>/packages
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove "packages" from all of these examples; it's not necessary to be there, and it makes the next line wrong.

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

pub run ./script/tool/lib/src/main.dart analyze --plugins plugin_name
```

## Run dart unit tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Dart

```

## 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>
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/

additional settings can be configured. Run `dart run ./script/tool/lib/src/main.dart publish-plugin --help` for more usage information.

The tool wraps `pub publish` for pushing the package to pub, and then will
automatically use git to try and create and push tags. It has some additional
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: "to try to create"

## Setting up tools

We use a range of tooling script to do varies of things on CI. (testing, formatting, etc.)
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.

Copy link
Contributor
@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM!

@cyanglaz cyanglaz added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Apr 19, 2021
Copy link
Member
@ditman ditman left a comment

Choose a reason for hiding this comment

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

This is a fantastic overhauling of the contributing process docs! Great stuff!

## Setting up tools

There are scripts for many common tasks (testing, formatting, etc.) that will likely be useful in preparing a PR.
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

bhaveshptl pushed a commit to bhaveshptl/plugins that referenced this pull request Apr 23, 2021
* master: (397 commits)
  [in_app_purchase] Implementation of platform interface (flutter#3781)
  [google_sign_in] Add todo WRT correctly setting X-Goog-AuthUser header (flutter#3819)
  [tools] fix version check command not working for new packages (flutter#3818)
  [camera] android-rework part 1: Base classes to support Android Camera features (flutter#3795)
  fix MD (flutter#3815)
  Path provider windows crash fix (flutter#3814)
  [local_auth] docs update (flutter#3103)
  Update PULL_REQUEST_TEMPLATE.md (flutter#3801)
  [quick_actions] handle cold start on iOS correctly (flutter#3811)
  Replace path_provider_linux widget tests with simple unit tests (flutter#3812)
  [sensors] format dart code based on the new dart formatter (flutter#3809)
  [google_sign_in] Fix "pick account" on iOS (flutter#3805)
  [image_picker_platform_interface] Added pickMultiImage (flutter#3782)
  [in_app_purchase] Added currency code and numerical price to product detail model. (flutter#3794)
  [local_auth] Fix iOS crash when no localizedReason (flutter#3780)
  Fix and update version checks (flutter#3792)
  [in_app_purchase] Configured example app to use StoreKit Testing on iOS 14 (flutter#3772)
  [local_auth] Unnecessary reassignment in example removed (flutter#2983)
  [flutter_webview] Fix `allowsInlineMediaPlayback` ignored on iOS (flutter#3791)
  Switch script/tools over to the new analysis options (flutter#3777)
  ...
yasargil added a commit to yasargil/plugins that referenced this pull request Apr 28, 2021
* master: (79 commits)
  Fix grammatical error in contributing guide (flutter#3217)
  [google_sign_in_web] fix README typos.
  [tool] combine run and runAndExitOnError (flutter#3827)
  [camera] android-rework part 2: Android auto focus feature (flutter#3796)
  [in_app_purchase_platform_interface] Added additional fields to ProductDetails (flutter#3826)
  Move all null safety packages' min dart sdk to 2.12.0 (flutter#3822)
  [path_provider_*] code cleanup: sort directives (flutter#3823)
  [in_app_purchase] Implementation of platform interface (flutter#3781)
  [google_sign_in] Add todo WRT correctly setting X-Goog-AuthUser header (flutter#3819)
  [tools] fix version check command not working for new packages (flutter#3818)
  [camera] android-rework part 1: Base classes to support Android Camera features (flutter#3795)
  fix MD (flutter#3815)
  Path provider windows crash fix (flutter#3814)
  [local_auth] docs update (flutter#3103)
  Update PULL_REQUEST_TEMPLATE.md (flutter#3801)
  [quick_actions] handle cold start on iOS correctly (flutter#3811)
  Replace path_provider_linux widget tests with simple unit tests (flutter#3812)
  [sensors] format dart code based on the new dart formatter (flutter#3809)
  [google_sign_in] Fix "pick account" on iOS (flutter#3805)
  [image_picker_platform_interface] Added pickMultiImage (flutter#3782)
  ...
fotiDim pushed a commit to fotiDim/plugins that referenced this pull request Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
5 participants