Skip to content

Commit 96f44d5

Browse files
committed
PASSBOLT-1718 Tidy up the documentation
1 parent f3a1a40 commit 96f44d5

File tree

3 files changed

+867
-101
lines changed

3 files changed

+867
-101
lines changed

CONTRIBUTING.md

+209
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
# Contributing to passbolt
2+
3+
## Introduction
4+
5+
Thank you for your interest in passbolt. We welcome contributions from everyone, this guide is here to help you get started!
6+
7+
### How can you help?
8+
9+
There are several ways you can help out:
10+
11+
* Create an [issue](https://github.com/passbolt/passbolt/issues) on GitHub, if you have found a bug or want to propose a new feature or a change request.
12+
* Review [enhancement or new feature requests](https://github.com/passbolt/passbolt/issues) and contribute to the functional or technical specifications in the issues.
13+
* Write patches for open bug/feature issues, preferably with test cases included
14+
* Contribute to the [documentation](https://passbolt.com/help).
15+
* Help design the proposed changes by editing the [styleguide](https://github.com/passbolt/passbolt_styleguide) or by submitting changes in the [wireframes](https://github.com/passbolt/passbolt_wireframes).
16+
* Write unit test cases to help increase [test coverage](https://coveralls.io/github/passbolt/passbolt).
17+
* Extend the [selenium test suite](https://github.com/passbolt/passbolt_selenium) for any open bug or change requests
18+
19+
If you have any suggestions or want to get involved in other ways feel free to get in touch with us at [[email protected]](mailto:[email protected])!
20+
21+
### Code of Conduct
22+
23+
First things first, please read our [Code of Conduct](https://www.passbolt.com/code_of_conduct).
24+
Help us keep Passbolt open and inclusive!
25+
26+
## High level guidelines
27+
28+
There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things.
29+
30+
### Reporting a security Issue
31+
32+
If you've found a security related issue in Passbolt, please don't open an issue in GitHub.
33+
Instead contact us at [email protected]. In the spirit of responsible disclosure we ask that the reporter keep the
34+
issue confidential until we announce it.
35+
36+
The passbolt team will take the following actions:
37+
- Try to first reproduce the issue and confirm the vulnerability.
38+
- Acknowledge to the reporter that we’ve received the issue and are working on a fix.
39+
- Get a fix/patch prepared and create associated automated tests.
40+
- Prepare a post describing the vulnerability, and the possible exploits.
41+
- Release new versions of all affected major versions.
42+
- Prominently feature the problem in the release announcement.
43+
- Provide credits in the release announcement to the reporter if they so desire.
44+
45+
### Reporting regular issues
46+
47+
* Make sure you have a [GitHub account](https://github.com/signup/free).
48+
* If you are planning to start a new functionality or create a major change request, write down the functional and technical specifications first.
49+
* Create a document that is viewable by everyone
50+
* Define the problem you are trying to solve, who is impacted, why it is important, etc.
51+
* Present a solution. Explaining your approach gives an opportunity for other people to contribute and avoid frictions down the line.
52+
* Submit an [issue](https://github.com/passbolt/passbolt/issues)
53+
* Check first that a similar issue does not already exist.
54+
* Make sure you fill in the earliest version that you know has the issue if it is a bug.
55+
* Clearly describe the issue including steps to reproduce when it is a bug and/or a link to the specification document
56+
* If applicable, allow people to visualize your proposed changes via changes to the [styleguide](https://github.com/passbolt/passbolt_styleguide)
57+
58+
### Making code changes
59+
60+
#### Which branch to base the work?
61+
62+
* Bugfix branches will be based on master.
63+
* New features that are backwards compatible will be based on next minor release branch.
64+
* New features or other non backwards compatible changes will go in the next major release branch.
65+
66+
#### Make changes locally first
67+
* Fork the repository on GitHub.
68+
* Create a feature branch from where you want to base your work.
69+
* This is usually the master branch.
70+
* Only target release branches if you are certain your fix must be on that
71+
branch.
72+
* To quickly create a feature branch based on master; `git branch
73+
feature/ID_feature_description master` then checkout the new branch with `git
74+
checkout feature/ID_feature_description`. Better avoid working directly on the
75+
`master` branch, to avoid conflicts if you pull in updates from origin.
76+
* Make commits of logical units.
77+
78+
#### Before submiting changes
79+
* Check for unnecessary whitespace with `git diff --check` before committing.
80+
* Use descriptive commit messages and reference the #issue number.
81+
* Browser extension unit test cases should continue to pass.
82+
* Selenium tests should continue to pass. See [passbolt selenium test suite](https://github.com/passbolt/passbolt_selenium) (see faq bellow).
83+
84+
85+
# Tools & Workflow FAQ
86+
87+
If you are a programmer and wish to contribute / extend passbolt extension, here is what you need to know.
88+
## Prerequisite
89+
90+
You will need:
91+
1. Nodejs
92+
2. JPM the Node base Firefox Addon SDK (jetpack), see. [Official documentation](https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm#Installation)
93+
3. This code
94+
```
95+
git clone [email protected]:passbolt/passbolt_firefox.git
96+
sudo npm install jpm -g
97+
```
98+
99+
## Launch the browser with a custom version of the plugin
100+
101+
To launch an instance of Firefox with your local version of the add-on installed,
102+
you will need make sure you run an instance that allowed unsigned extension (the developer edition for example)
103+
```
104+
jpm run -b /path/to/FirefoxAllowingUnsignedExtension
105+
```
106+
On MacOS that will be something like this:
107+
```
108+
jpm run -b /Applications/FirefoxDeveloperEdition.app
109+
```
110+
111+
## Runs the add-on's unit tests.
112+
113+
The test suite is rather slim at the moment but you can run it here:
114+
```
115+
jpm test
116+
```
117+
Contributions are welcomed if you want to extend it!
118+
119+
## Packaging the addon
120+
121+
Package your add-on as an XPI file, which is the install file format for Firefox add-ons.
122+
The default grunt job will create two XPI, one with a debug mode set and another one to be used in production.
123+
```
124+
grunt
125+
```
126+
You can also do the following:
127+
```
128+
jpm xpi
129+
```
130+
131+
## Push a new version
132+
133+
To push a new version of the plugin, and before submitting it to mozilla,
134+
it is important to tag it :
135+
```
136+
git commit -am 'X.X.X'
137+
git tag -a X.X.X -m 'X.X.X'
138+
git push origin X.X.X
139+
git push origin develop
140+
```
141+
142+
## Productivity
143+
144+
While developing you'll frequently need to update your firefox plugin to test
145+
it. Install the firefox "Extension Auto-Installer" which makes the testing process
146+
lighter if you want to reuse an existing firefox instance and profile.
147+
148+
https://addons.mozilla.org/en-us/firefox/addon/autoinstaller/
149+
150+
By default it is disabled, go on the configuration page and activate it.
151+
152+
To compile the plugin in both non-debug and debug version, use the following command :
153+
```
154+
grunt [jpmxpi]
155+
```
156+
It will create the debug and non debug versions, as well as a symbolic link [email protected] pointing to the non debug version.
157+
158+
To udpate your plugin in firefox after a change, go on your projet root and execute the following:
159+
```
160+
jpm xpi ; wget --post-file=passbolt.xpi http://localhost:8888/
161+
```
162+
or
163+
```
164+
grunt xpiinstall
165+
```
166+
167+
## How to install / update openpgp
168+
169+
By default, openpgpjs as provided in the official repository cannot work
170+
in the add-on environment. So we have developed some scripts to patch it.
171+
172+
To install or update openpgp:
173+
```
174+
grunt lib-openpgp-deploy
175+
```
176+
177+
The command will take care of downloading the version defined in package.json,
178+
patch it, and deploy it in /lib/vendors. Look at Gruntfile.js to see in details what it does.
179+
180+
181+
## How to edit the CSS files?
182+
183+
All the less and css files of passbolt are managed through a styleguide.
184+
https://github.com/passbolt/passbolt_styleguide
185+
186+
You can also develop an alternative stylesheet and include it manually if you only want some styling changes for your own version of the browser add-on.
187+
If you want your changes to be included in an official release, you will have to submit the changes in the official styleguide.
188+
189+
### How to update the styleguide?
190+
191+
The styelguide version number is located in package.json. To deploy a new version of the styleguide, first you need to install grunt:
192+
```
193+
npm install -g grunt-cli
194+
```
195+
196+
Install the needed modules defined in package.json
197+
```
198+
npm install
199+
```
200+
201+
Install the styleguide
202+
```
203+
grunt styleguide-update
204+
```
205+
206+
## Distributing the add-on
207+
208+
In order to distribute the addon you will need to get it reviewed and signed by Mozilla.
209+
See. https://addons.mozilla.org/

0 commit comments

Comments
 (0)