Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

Commit 4b88b19

Browse files
authored
Add CONTRIBUTING.md (#32)
1 parent 39808d0 commit 4b88b19

File tree

2 files changed

+107
-28
lines changed

2 files changed

+107
-28
lines changed

CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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/meilisearch-laravel-scout/issues/) or [open a new one](https://github.com/meilisearch/meilisearch-laravel-scout/issues/new).
23+
2. Once done, [fork the meilisearch-laravel-scout 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 meilisearch-laravel-scout 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/meilisearch-laravel-scout/releases/).
29+
30+
## Development Workflow
31+
32+
### Setup
33+
34+
```bash
35+
$ composer install
36+
```
37+
38+
### Tests and Linter
39+
40+
Each PR should pass the tests to be accepted.
41+
42+
```bash
43+
$ vendor/bin/phpunit --color tests/
44+
```
45+
46+
### Release Process
47+
48+
MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).
49+
50+
#### Automated Changelogs
51+
52+
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/meilisearch-laravel-scout/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.
53+
54+
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.
55+
56+
About this automation:
57+
- As the draft release description is generated on every push on `master`, don't change it manually until the final release publishment.
58+
- 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).
59+
- 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.
60+
- 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.
61+
62+
*More information about the [Release Drafter](https://github.com/release-drafter/release-drafter), used to automate these steps.*
63+
64+
#### How to Publish the Release
65+
66+
Once the changes are merged on `master`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/meilisearch-laravel-scout/releases).
67+
68+
A WebHook will be triggered and push the package to [Packagist](https://packagist.org/packages/meilisearch/meilisearch-laravel-scout).
69+
70+
## Git Guidelines
71+
72+
### Git Branches
73+
74+
All changes must be made in a branch and submitted as PR.
75+
We do not enforce any branch naming style, but please use something descriptive of your changes.
76+
77+
### Git Commits
78+
79+
As minimal requirements, your commit message should:
80+
- be capitalized
81+
- not finish by a dot or any other punctuation character (!,?)
82+
- start with a verb so that we can read your commit message this way: "This commit will ...", where "..." is the commit message.
83+
e.g.: "Fix the home page button" or "Add more tests for create_index method"
84+
85+
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/).
86+
87+
### GitHub Pull Requests
88+
89+
Some notes on GitHub PRs:
90+
- [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>
91+
The draft PR can be very useful if you want to show that you are working on something and make your work visible.
92+
- 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.
93+
- All PRs must be reviewed and approved by at least one maintainer.
94+
- All PRs have to be **squashed and merged**.
95+
- 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/meilisearch-laravel-scout/releases/).
96+
97+
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: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828

2929
- [Installation](#installation)
3030
- [Getting started](#getting-started)
31+
- [Indexes](#indexes)
32+
- [Search](#search)
3133
- [Compatibility with MeiliSearch](#compatibility-with-meilisearch)
32-
- [Development Workflow](#development-workflow)
3334
- [Additional notes](#additional-notes)
35+
- [Development Workflow and Contributing](#development-workflow-and-contributing)
3436

3537
## Installation
3638

@@ -190,41 +192,21 @@ class BookController extends Controller
190192
## Compatibility with MeiliSearch
191193

192194
This package is compatible with the following MeiliSearch versions:
195+
- `v0.12.X`
193196
- `v0.11.X`
194197

195-
## Development Workflow
196-
197-
If you want to contribute, this section describes the steps to follow.
198-
199-
Thank you for your interest in a MeiliSearch tool! ♥️
200-
201-
### Install dependencies
202-
203-
```bash
204-
$ composer install
205-
```
206-
207-
### Tests and Linter
208-
209-
Each PR should pass the tests to be accepted.
210-
211-
```bash
212-
$ vendor/bin/phpunit --color tests/
213-
```
214-
215-
### Release
216-
217-
MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).
218-
219-
Once the changes are merged into `master`, you must create a release (with this name `vX.X.X`) via the GitHub interface.<br>
220-
A webhook will be triggered and push the new package on [Packagist](https://packagist.org/packages/meilisearch/meilisearch-laravel-scout).
221-
222198
## Additional notes
223199

224200
You can use more advance function by reading the documentation of [MeiliSearch PHP Client](https://github.com/meilisearch/meilisearch-php)
225201

226202
This package is a custom engine of [Laravel Scout](https://laravel.com/docs/master/scout)
227203

204+
## Development Workflow and Contributing
205+
206+
Any new contribution is more than welcome in this project!
207+
208+
If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
209+
228210
<hr>
229211

230212
**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)