Skip to content

Commit fbc09ec

Browse files
authored
Add CONTRIBUTING.md file (#8)
* Add a contributing.md file * Update the README with contributing and compatibilities * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Add a contributing.md file * Update the README with contributing and compatibilities
1 parent 21d558c commit fbc09ec

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

CONTRIBUTING.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Contributing
2+
3+
First of all, thank you for contributing to MeiliSearch! The goal of this document is to provide everything you need to know in order to contribute to MeiliSearch and its different integrations.
4+
5+
<!-- MarkdownTOC autolink="true" style="ordered" indent=" " -->
6+
7+
- [Assumptions](#assumptions)
8+
- [How to Contribute](#how-to-contribute)
9+
- [Development Workflow](#development-workflow)
10+
- [Git Guidelines](#git-guidelines)
11+
12+
<!-- /MarkdownTOC -->
13+
14+
## Assumptions
15+
16+
1. **You're familiar with [GitHub](https://github.com) and the [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR) workflow.**
17+
2. **You've read the MeiliSearch [documentation](https://docs.meilisearch.com) and the [README](/README.md).**
18+
3. **You know about the [MeiliSearch community](https://docs.meilisearch.com/resources/contact.html). Please use this for help.**
19+
20+
## How to Contribute
21+
22+
1. Make sure that the contribution you want to make is explained or detailed in a GitHub issue! Find an [existing issue](https://github.com/meilisearch/instant-meilisearch/issues/) or [open a new one](https://github.com/meilisearch/instant-meilisearch/issues/new).
23+
2. Once done, [fork the instant-meilisearch repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) in your own GitHub account. Ask a maintainer if you want your issue to be checked before making a PR.
24+
3. [Create a new Git branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository).
25+
4. Review the [Development Workflow](#workflow) section that describes the steps to maintain the repository.
26+
5. Make your changes.
27+
6. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `master` branch of the main instant-meilisearch repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer.<br>
28+
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/instant-meilisearch/releases/).
29+
30+
## Development Workflow
31+
32+
### Setup
33+
34+
```bash
35+
$ yarn --dev
36+
```
37+
38+
### Tests and Linter
39+
40+
Each PR should pass the tests and the linter to be accepted.
41+
42+
```bash
43+
# Tests
44+
$ docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
45+
$ docker run -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey --no-analytics
46+
$ yarn test
47+
# Linter
48+
$ yarn lint
49+
# Linter with fixing
50+
$ yarn lint:fix
51+
# Build the project
52+
$ yarn build
53+
```
54+
55+
### Release Process
56+
57+
MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).
58+
59+
#### Automated Changelogs
60+
61+
For each PR merged on `master`, a GitHub Action is running and updates the next release description as a draft release in the [GitHub interface](https://github.com/meilisearch/instant-meilisearch/releases). If you don't have the right access to this repository, you will not be able to see the draft release until the release is published.
62+
63+
The draft release description is therefore generated and corresponds to all the PRs titles since the previous release. This means each PR should only do one change and the title should be descriptive of this change.
64+
65+
About this automation:
66+
- As the draft release description is generated on every push on `master`, don't change it manually until the final release publishment.
67+
- If you don't want a PR to appear in the release changelogs: add the label `skip-changelog`. We suggest removing PRs updating the README or the CI (except for big changes).
68+
- If the changes you are doing in the PR are breaking: add the label `breaking-change`. In the release tag, the minor will be increased instead of the patch. The major will never be changed until [MeiliSearch](https://github.com/meilisearch/MeiliSearch) is stable.
69+
- If you did any mistake, for example the PR is already closed but you forgot to add a label or you misnamed your PR, don't panic: change what you want in the closed PR and run the job again.
70+
71+
*More information about the [Release Drafter](https://github.com/release-drafter/release-drafter), used to automate these steps.*
72+
73+
#### How to Publish the Release
74+
75+
Make a PR modifying the file [`package.json`](/package.json) with the right version.
76+
77+
```javascript
78+
"version": X.X.X
79+
```
80+
81+
Once the changes are merged on `master`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/instant-meilisearch/releases).
82+
83+
A GitHub Action will be triggered and push the package to [npm](https://www.npmjs.com/package/@meilisearch/instant-meilisearch).
84+
85+
## Git Guidelines
86+
87+
### Git Branches
88+
89+
All changes must be made in a branch and submitted as PR.
90+
We do not enforce any branch naming style, but please use something descriptive of your changes.
91+
92+
### Git Commits
93+
94+
As minimal requirements, your commit message should:
95+
- be capitalized
96+
- not finish by a dot or any other punctuation character (!,?)
97+
- start with a verb so that we can read your commit message this way: "This commit will ...", where "..." is the commit message.
98+
e.g.: "Fix the home page button" or "Add more tests for create_index method"
99+
100+
We don't follow any other convention, but if you want to use one, we recommend [this one](https://chris.beams.io/posts/git-commit/).
101+
102+
### GitHub Pull Requests
103+
104+
Some notes on GitHub PRs:
105+
- [Convert your PR as a draft](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request) if your changes are a work in progress: no one will review it until you pass your PR as ready for review.<br>
106+
The draft PR can be very useful if you want to show that you are working on something and make your work visible.
107+
- The branch related to the PR must be **up-to-date with `master`** before merging. You need to [rebase your branch](https://gist.github.com/curquiza/5f7ce615f85331f083cd467fc4e19398) if it is not.
108+
- All PRs must be reviewed and approved by at least one maintainer.
109+
- All PRs have to be **squashed and merged**.
110+
- The PR title should be accurate and descriptive of the changes. The title of the PR will be indeed automatically added to the next [release changlogs](https://github.com/meilisearch/instant-meilisearch/releases/).
111+
112+
Thank you again for reading this through, we can not wait to begin to work with you if you made your way through this contributing guide ❤️

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ search.start();
131131
- The open-source InstantSearch library is widely used and well documented in the [Algolia documentation](https://www.algolia.com/doc/api-reference/widgets/js/). It provides all the widgets to customize and improve your search bar environment in your website.
132132
- The [MeiliSearch documentation](https://docs.meilisearch.com/).
133133

134+
## Compatibility with MeiliSearch
135+
136+
This package is compatible with the following MeiliSearch versions:
137+
138+
- `v0.12.X`
139+
140+
## Development Workflow and Contributing
141+
142+
Any new contribution is more than welcome in this project!
143+
144+
If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
145+
134146
<hr>
135147

136148
**MeiliSearch** provides and maintains many **SDKs and Integration tools** like this one. We want to provide everyone with an **amazing search experience for any kind of project**. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the [integration-guides](https://github.com/meilisearch/integration-guides) repository.

0 commit comments

Comments
 (0)