CONTRIBUTING.md 2.75 KB
Newer Older
Nathanaël's avatar
Nathanaël committed
1
2
3
4
5
6
# Contributing

Hey, welcome to the party! 🎉

Thank you so much to contribute to MastoZap. 😘

Nathanaël's avatar
Nathanaël committed
7
## Asking questions, suggesting wonderful ideas or reporting bugs
Nathanaël's avatar
Nathanaël committed
8
9
10
11
12
13
14
15
16
17

You can [submit an issue️](https://framagit.org/roipoussiere/MastoZap/issues/new) on this GitLab repository.

If you are not familiar with the GitLab issue tracker, you can also:

- ️🐘 contact me [on Mastodon](https://mastodon.tetaneutral.net/@roipoussiere);
- 🗨 discuss [on the MastoZap group](https://framateam.org/mastozap/) on Framateam (Mattermost server provided by [Framasoft](https://framateam.org/mastozap/)).

## Coding

Nathanaël's avatar
Nathanaël committed
18
### 📦 Prerequies
Nathanaël's avatar
Nathanaël committed
19

20
You need node.js (>=8.10) and npm (>=5.6).
Nathanaël's avatar
Nathanaël committed
21

22
23
24
To install them on Debian-based systems:

```bash
Nathanaël's avatar
Nathanaël committed
25
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
26
27
28
sudo apt-get install -y nodejs
echo -e "nodejs version:\t$(nodejs -v) \nnpm version:\t$(npm -v)"
# check that you have node.js >=8.10 npm >=5.6
Nathanaël's avatar
Nathanaël committed
29
30
31
32
```

Then install the Zapier CLI tool:

33
```bash
Nathanaël's avatar
Nathanaël committed
34
sudo npm install -g zapier-platform-cli
35
36
zapier -v
# check that you have zapier CLI tool
Nathanaël's avatar
Nathanaël committed
37
38
39
40
41
42
43
44
```

### 📚 Interesting readings

- To be familiar with Zapier app development, you can follow [the Zapier getting started guide](https://zapier.github.io/zapier-platform-cli);
- you can also take a look to [the Mastodon API](https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md);
- I also write some notes for developers on [the MastaZap wiki](https://framagit.org/roipoussiere/MastoZap/wikis/home).

Nathanaël's avatar
Nathanaël committed
45
### 🏗️ Installation
Nathanaël's avatar
Nathanaël committed
46
47
48

Here we go! 🤠 First, clone this repository:

49
```bash
Nathanaël's avatar
Nathanaël committed
50
51
52
53
54
git clone https://framagit.org/roipoussiere/MastoZap.git
```

Then install the app with npm:

55
```bash
Nathanaël's avatar
Nathanaël committed
56
57
58
npm install
```

59
60
And check that everything works by running the tests:

61
```bash
62
63
64
zapier test
```

65
66
67
68
69
70
Yay! You are ready! 🍾

### ⤴️ Creating a merge request

- 1. First, [create a fork of this project](https://framagit.org/roipoussiere/MastoZap/forks/new), and copy the https URL (under the badges) of your project (something like https://framagit.org/YOUR_USERNAME/MastoZap.git );
- 2.a If you already cloned and worked on the project: `git remote add upstream https://framagit.org/YOUR_USERNAME/MastoZap.git`;
71
- 2.b otherwise, clone your fork: `git clone https://framagit.org/YOUR_USERNAME/MastoZap.git` and commit your work;
Nathanaël's avatar
Nathanaël committed
72
73
74
75
76
- 3. test your work:
  - check files against Zapier syntax: `zapier validate --debug`;
  - run unit tests: `zapier test`;
  - check eslint errors and warnings: `./node_modules/.bin/eslint .`;
  - check code coverage: `./node_modules/.bin/nyc ./node_modules/.bin/mocha`;
77
78
- 4. push it to a dedicated branch `git push origin myMergeRequest`;
- 5. got to the [main project page](https://framagit.org/roipoussiere/MastoZap) and click on the button *Send merge request*, then fill the description.
79

80
Thank you! 💜