creativecreatorormaybenot
Committed by GitHub

Create CONTRIBUTING.md

  1 +# Steps
  2 +
  3 +The following steps are based on [flutter/plugin's contributing guide](https://github.com/flutter/plugins/blob/2ea66626c245a4373a6e07706ab2e7d471e25bd6/CONTRIBUTING.md).
  4 +
  5 +## Creating a fork
  6 +
  7 + * If you have not yet configured your machine with an SSH key that is known to GitHub, then follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/) to generate an SSH key.
  8 + * Fork [this repository](https://github.com/creativecreatorormaybenot/wakelock/new) using the "Fork" button in the upper right corner of the repository on the GitHub page.
  9 + * `git clone git@github.com:<github_user_name>/wakelock.git`
  10 + * `cd wakelock`
  11 + * `git remote add upstream git@github.com:creativecreatorormaybenot/wakelock.git`
  12 + This ensures that `git fetch` fetches from this remote repository instead of from your own fork to get the latest changes.
  13 +
  14 +## Creating a patch
  15 +
  16 + * `git fetch upstream`
  17 + * `git checkout upstream/master -b <name_of_your_branch>`
  18 + * Now, you can change the code necessary for your patch.
  19 +
  20 + Make sure that you bump the version in [`pubspec.yaml`](https://github.com/creativecreatorormaybenot/wakelock/blob/master/pubspec.yaml) and add an entry to [`CHANGELOG.md`](https://github.com/creativecreatorormaybenot/wakelock/blob/master/CHANGELOG.md).
  21 + The version format is `r.M.m+p`. You will want to increment one of these values and which one you increment depends on the impact of your patch: `p` for simple patches, `m` for minor versions, `M` for major versions, and `r` for released. Do not forget to reset the values to the right of the value you incremented to 0. You should omit `+0`.
  22 + * `git commit -am "<commit_message>"`
  23 + * `git push origin <name_of_your_branch>`
  24 +
  25 +After having followed these steps, you are ready to [create a pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork).
  26 +The GitHub interface makes this very easy by providing a button on your fork page that creates a pull request with changes from a recently pushed branch.
  27 +Alternatively, you can also use `git pull-request` when using [GitHub hub](https://hub.github.com/).
  28 +
  29 +# Notes
  30 +
  31 + * You should remember to exlcude all files and directories your IDE might generate using the `.gitignore` files (if they do not already inlcude them for your IDE).
  32 + If you feel like you can make a usefule additions to any of the `.gitignore` files, you can include them in your pull request, potentially with an explanation.
  33 +
  34 + * It is probably easier for you if you run the integration tests for the plugin locally before opening a pull request using `flutter drive --target=test_driver/app.dart` in the `example` directory.
  35 + This way you can ensure that any changes you have made work properly. Furthermore, you might also want to add some tests if you implement new functionality.