Skip to content

Commit 0929a00

Browse files
authored
Merge branch 'master' into modular_5
2 parents eb9e805 + ae08d37 commit 0929a00

File tree

3 files changed

+175
-0
lines changed

3 files changed

+175
-0
lines changed

.github/pull_request_template.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Description
2+
3+
<!-- Provide a description of what this PR is doing.
4+
If you're modifying existing behavior, describe the existing behavior, how this PR is changing it,
5+
and what motivated the change. If this is a breaking change, specify explicitly which APIs have been
6+
changed. -->
7+
8+
## Checklist
9+
10+
<!-- Before you create this PR confirm that it meets all requirements listed below by checking the
11+
relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. -->
12+
13+
- [ ] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `docs:` etc).
14+
- [ ] I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
15+
- [ ] I have updated/added tests for ALL new/updated/fixed functionality.
16+
- [ ] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`.
17+
- [ ] I have updated/added relevant examples in `examples`.
18+
19+
## Breaking Change
20+
21+
<!-- Does your PR require Modular users to manually update their apps to accommodate your change?
22+
23+
If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
24+
-->
25+
26+
- [ ] Yes, this is a breaking change.
27+
- [ ] No, this is *not* a breaking change.
28+
29+
## Related Issues
30+
31+
<!-- Provide a list of issues related to this PR from the [issue database].
32+
Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxxx* !-->
33+
34+
<!-- Links -->
35+
[issue database]: https://github.com/Flutterando/modular/issues
36+
[Contributor Guide]: https://github.com/Flutterando/modular/blob/main/CONTRIBUTING.md
37+
[Conventional Commit]: https://conventionalcommits.org
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: title-validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
validate-pr-title:
9+
name: Validate PR title
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: amannn/action-semantic-pull-request@v4
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Contribution Guidelines
2+
3+
**Note:** If these contribution guidelines are not followed your issue or PR might be closed, so
4+
please read these instructions carefully.
5+
6+
## Contribution types
7+
8+
### Bug Reports
9+
- If you find a bug, please first report it using [Github issues].
10+
- First check if there is not already an issue for it; duplicated issues will be closed.
11+
12+
### Bug Fix
13+
- If you'd like to submit a fix for a bug, please read the [How To](#how-to-contribute) for how to
14+
send a Pull Request.
15+
- Indicate on the open issue that you are working on fixing the bug and the issue will be assigned
16+
to you.
17+
- Write `Fixes #xxxx` in your PR text, where xxxx is the issue number (if there is one).
18+
- Include a test that isolates the bug and verifies that it was fixed.
19+
20+
### New Features
21+
- If you'd like to add a feature to the library that doesn't already exist, feel free to describe
22+
the feature in a new [GitHub issue].
23+
- You can also join us on [Discord] to discuss some initials
24+
thoughts.
25+
- If you'd like to implement the new feature, please wait for feedback from the project maintainers
26+
before spending too much time writing the code. In some cases, enhancements may not align well
27+
with the project objectives at the time.
28+
- Implement the code for the new feature and please read the [How To](#how-to-contribute).
29+
30+
### Documentation & Miscellaneous
31+
- If you have suggestions for improvements to the documentation, tutorial or examples (or something
32+
else), we would love to hear about it.
33+
- As always first file a [Github issue].
34+
- Implement the changes to the documentation, please read the [How To](#how-to-contribute).
35+
36+
## How To Contribute
37+
38+
### Requirements
39+
For a contribution to be accepted:
40+
41+
- Documentation should always be updated or added.*
42+
- Examples should always be updated or added.*
43+
- Tests should always be updated or added.*
44+
- Format the Dart code accordingly with `flutter format`.
45+
- Your code should pass the analyzer checks `melos run analyze`.
46+
- Your code should pass all tests `melos run test`.
47+
- Start your PR title with a [conventional commit] type
48+
(`feat:`, `fix:` etc).
49+
50+
*When applicable.
51+
52+
If the contribution doesn't meet these criteria, a maintainer will discuss it with you on the issue
53+
or PR. You can still continue to add more commits to the branch you have sent the Pull Request from
54+
and it will be automatically reflected in the PR.
55+
56+
## Open an issue and fork the repository
57+
- If it is a bigger change or a new feature, first of all
58+
[file a bug or feature report][GitHub issues], so that we can discuss what direction to follow.
59+
- [Fork the project][fork guide] on GitHub.
60+
- Clone the forked repository to your local development machine
61+
(e.g. `git clone [email protected]:<YOUR_GITHUB_USER>/modular.git`).
62+
63+
### Environment Setup
64+
Modular uses [Melos] to manage the project and dependencies.
65+
66+
To install Melos, run the following command from your terminal:
67+
68+
```bash
69+
flutter pub global activate melos
70+
```
71+
72+
Next, at the root of your locally cloned repository bootstrap the projects dependencies:
73+
74+
```bash
75+
melos bootstrap
76+
```
77+
78+
The bootstrap command locally links all dependencies within the project without having to
79+
provide manual [`dependency_overrides`][pubspec doc]. This allows all
80+
plugins, examples and tests to build from the local clone project. You should only need to run this
81+
command once.
82+
83+
> You do not need to run `flutter pub get` once bootstrap has been completed.
84+
85+
### Performing changes
86+
- Create a new local branch from `main` (e.g. `git checkout -b my-new-feature`)
87+
- Make your changes.
88+
- When committing your changes, make sure that each commit message is clear
89+
(e.g. `git commit -m '[modular_interface] Added BindContract.onDispose.'`).
90+
- Push your new branch to your own fork into the same remote branch
91+
(e.g. `git push origin my-username.my-new-feature`, replace `origin` if you use another remote.)
92+
93+
### Open a pull request
94+
Go to the [pull request page of modular][PRs] and in the top
95+
of the page it will ask you if you want to open a pull request from your newly created branch.
96+
97+
The title of the pull request should start with a [conventional commit] type.
98+
99+
Examples of such types:
100+
- `fix:` - patches a bug and is not a new feature.
101+
- `feat:` - introduces a new feature.
102+
- `docs:` - updates or adds documentation or examples.
103+
- `test:` - updates or adds tests.
104+
- `refactor:` - refactors code but doesn't introduce any changes or additions to the public API.
105+
106+
If you introduce a **breaking change** the conventional commit type MUST end with an exclamation
107+
mark (e.g. `feat!: The Bind.onDispose property for calls to destroy, close or dispose methods.`).
108+
109+
Examples of PR titles:
110+
- feat!: New auto-dispose configuration.
111+
- feat: Added Modular.setArguments.
112+
- docs: Add Contribution Guidelines.
113+
- test: Add Export bind test.
114+
- chore: Removed triple dependency.
115+
- refactor: Now the main constructor of Bind is @Protected.
116+
117+
[GitHub issue]: https://github.com/Flutterando/modular/issues/new
118+
[GitHub issues]: https://github.com/Flutterando/modular/issues/new
119+
[PRs]: https://github.com/Flutterando/modular/pulls
120+
[fork guide]: https://guides.github.com/activities/forking/#fork
121+
[Discord]: https://discord.gg/7qvSXRMMYw
122+
[Melos]: https://github.com/invertase/melos
123+
[pubspec doc]: https://dart.dev/tools/pub/pubspec
124+
[conventional commit]: https://www.conventionalcommits.org

0 commit comments

Comments
 (0)