From 7405b15468156701adf30697aff5b4895f9498b5 Mon Sep 17 00:00:00 2001 From: Ricardo Dalarme Date: Mon, 20 Feb 2023 17:30:42 -0300 Subject: [PATCH] docs(contributing): add a contributing guide --- .github/PULL_REQUEST_TEMPLATE.md | 26 +++++++++ CONTRIBUTING.md | 94 ++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d380708 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +## Description + + + +## Related Issues + +- Closes #(add issue number) + +## Pre-launch Checklist + +- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. +- [ ] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. +- [ ] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style]. +- [ ] I updated/added relevant documentation (doc comments with `///`). +- [ ] All existing and new tests are passing. + + +[Contributor Guide]: https://github.com/ricardodalarme/flutter_card_swiper/blob/main/CONTRIBUTING.md +[pub versioning philosophy]: https://dart.dev/tools/pub/versioning +[exempt from version changes]: https://github.com/ricardodalarme/flutter_card_swiper/blob/chore/add-a-contributing-guide/CONTRIBUTING.md#version +[following repository CHANGELOG style]:https://github.com/ricardodalarme/flutter_card_swiper/blob/chore/add-a-contributing-guide/CONTRIBUTING.md#changelog + +## Visual reference + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..da70a6e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,94 @@ +# Contributing to this package + +## Table of Contents + +- [Contributing to this package](#contributing-to-this-package) + - [Table of Contents](#table-of-contents) + - [Version and CHANGELOG updates](#version-and-changelog-updates) + - [Version](#version) + - [CHANGELOG](#changelog) + - [Style](#style) + - [Example](#example) + - [Updating a CHANGELOG that has a NEXT](#updating-a-changelog-that-has-a-next) + +## Version and CHANGELOG updates + +### Version + +Any change that needs to be published in order to take effect must update the version in pubspec.yaml. There are very few exceptions: + +- PRs that only affect tests. +- PRs that only affect example apps. +- PRs that only affect local development (e.g., changes to ignored lints). +- PRs that only make symbolic changes to the docs (e.g. typo). + +And the new version must follow the [pub versioning philosophy]. + +### CHANGELOG + +All version changes must have an accompanying CHANGELOG update. Even version-exempt changes should usually update CHANGELOG by adding a special `NEXT` entry at the top of `CHANGELOG.md` (unless they only affect development of the package, such as test-only changes): + +```md +## NEXT + +* Description of the change. + +## 1.0.2 +... +``` + +This policy exists because some changes (e.g., updates to examples) that do not need to be published may still be of interest to clients of a package. + +#### Style + +For consistency, all CHANGELOG entries should follow a common style: + +- Use `##` for the version line. A version line should have a blank line before and after it. +- Use `-` for individual items. +- Entries should use present tense indicative for verbs, with "this version" as an implied subject. For example, "Adds cool new feature.", not "Add" or "Added". +- Entries should end with a `.`. +- Breaking changes should be introduced with **BREAKING CHANGE**:, or **BREAKING CHANGES**: if there is a sub-list of changes. + +#### Example + +```md +## 2.0.0 + +- Adds the ability to fetch data from the future. +- **BREAKING CHANGES**: + - Removes the deprecated `neverCallThis` method. + - URLs parameters are now `Uri`s rather than `String`s. + +## 1.0.3 + +- Fixes a crash when the device teleports during a network operation. +``` + +#### Updating a CHANGELOG that has a NEXT + +If you are adding a version change to a CHANGELOG that starts with `NEXT`, and your change also doesn't require a version update, just add a description to the existing `NEXT` list: + +```md +## NEXT + +* Description of your new change. +* Existing entry. + +## 1.0.2 +... +``` + +If your change does require a version change, do the same, but then replace `NEXT` with the new version. For example: + +```md +## 1.0.3 + +* Description of your new change. +* Existing entry. + +## 1.0.2 +... +``` + + +[pub versioning philosophy]: https://dart.dev/tools/pub/versioning