PluginProbe
Stream – Activity Log & Audit Trail / 3.9.3
Stream – Activity Log & Audit Trail v3.9.3
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / contributing.md

contributing.md in Stream – Activity Log & Audit Trail 3.9.3, at contributing.md

164 lines 8.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Contribute to Stream
2
3
4 ## Development Environment
5
6 Stream uses [](https://npmjs.comnpm](https://npmjs.com](https://npmjs.com) for javascript dependencies, [](https://getcomposer.orgComposer](https://getcomposer.org](https://getcomposer.org) for PHP dependencies and the [](https://gruntjs.comGrunt](https://gruntjs.com](https://gruntjs.com) task runner to minimize and compile scripts and styles and to deploy to the WordPress.org plugin repository.
7
8 Included is a local development environment built with [](https://www.docker.comDocker](https://www.docker.com](https://www.docker.com) which can be optionally run inside [](https://www.vagrantup.comVagrant](https://www.vagrantup.com](https://www.vagrantup.com) for network isolation and better performance.
9
10 ### Requirements
11
12 - [](https://www.virtualbox.orgVirtualBox](https://www.virtualbox.org](https://www.virtualbox.org)
13 - [](https://www.vagrantup.comVagrant](https://www.vagrantup.com](https://www.vagrantup.com)
14 - [](https://nodejs.orgNode.js](https://nodejs.org](https://nodejs.org)
15 - [](https://getcomposer.orgComposer](https://getcomposer.org](https://getcomposer.org)
16
17 We suggest using the [](https://brew.shHomebrew package manager](https://brew.sh](https://brew.sh) on macOS to install the dependencies:
18
19 brew install node@16 composer
20 brew cask install virtualbox vagrant
21
22 For setups with local Docker environment you don't need Vagrant and VirtualBox.
23
24 ### Environment Setup
25
26 1. See the [](#git-flowGit Flow](#git-flow](#git-flow) section below for how to fork the repository.
27 2. Run `npm install` to install all project dependencies.
28 3. Run `vagrant up` to start the development environment.
29 4. Visit [](http://stream.localstream.local](http://stream.local](http://stream.local) and login using `admin` / `password`.
30 5. Activate the Stream plugin.
31
32 ### PHP Xdebug
33
34 The WordPress container includes the [](https://xdebug.orgXdebug PHP extension](https://xdebug.org](https://xdebug.org). It is configured to [](https://xdebug.org/docs/remote#remote_autostartautostart](https://xdebug.org/docs/remote#remote_autostart](https://xdebug.org/docs/remote#remote_autostart) and to [](https://xdebug.org/docs/remote#remote_connect_backautomatically detect the IP address of the connecting client](https://xdebug.org/docs/remote#remote_connect_back](https://xdebug.org/docs/remote#remote_connect_back) running in your code editor. See [](.vscode/launch.json`.vscode/launch.json`](.vscode/launch.json](.vscode/launch.json) for the directory mapping from the WordPress container to the project directory in your code editor.
35
36 ### Mail Catcher
37
38 We use a [](https://github.com/mailhog/MailHogMailHog](https://github.com/mailhog/MailHog](https://github.com/mailhog/MailHog) container to capture all emails sent by the WordPress container, available at [](https://stream.local:8025stream.local:8025](https://stream.local:8025](https://stream.local:8025).
39
40 ### Scripts and Commands
41
42 We use npm as the canonical task runner for the project. The following commands are available:
43
44 - `npm run build` to build the plugin JS and CSS files.
45
46 - `npm run lint` to check JS and PHP files for syntax and style issues.
47
48 - `npm run deploy` to deploy the plugin to the WordPress.org repository.
49
50 - `npm run cli -- wp info` where `wp info` is the CLI command to run inside the WordPress container. For example, use `npm run cli -- ls -lah` to list all files in the root of the WordPress installation.
51
52 - `npm run compose -- up -d` where `up -d` is the `docker-compose` command for the WordPress container. For example, use `npm run compose -- down` and `npm run compose -- up -d` to restart the WordPres container.
53
54 - `npm run phpunit` to run PHPunit tests inside the WordPress container.
55
56 All `npm` commands running inside Vagrant are prefixed with `v`, for example, `npm run vcli` and `npm run vcompose`.
57
58
59 ## Issues Tracker
60
61 Support issues or usage questions should be posted on the [](https://wordpress.org/support/plugin/streamPlugin Support Forum](https://wordpress.org/support/plugin/stream](https://wordpress.org/support/plugin/stream).
62
63 The [](https://github.com/xwp/stream/issuesissue tracker on GitHub](https://github.com/xwp/stream/issues](https://github.com/xwp/stream/issues) is the preferred channel for [](#bugsbug reports](#bugs](#bugs), [](#featuresfeatures requests](#features](#features) and [](#pull-requestssubmitting pull requests](#pull-requests](#pull-requests).
64
65
66 <a name="bugs"></a>
67
68 ## Reporting Bugs
69
70 A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports with complete error messages, environment details and screenshots are extremely helpful &mdash; thank you!
71
72 Guidelines for bug reports:
73
74 1. **Check if the bug has already been fixed** &mdash; Someone may already be on top of it, so try to reproduce it using the latest from the `master` branch.
75
76 2. **Use the [](https://github.com/xwp/stream/search?type=IssuesGitHub issue search](https://github.com/xwp/stream/search?type=Issues](https://github.com/xwp/stream/search?type=Issues)** &mdash; Someone might already know about it, so please check if the issue has already been reported.
77
78 3. **Isolate the problem** &mdash; The better you can determine exactly what behavior(s) cause the issue, the faster and more effectively it can be resolved. “I’m getting an error message.” is not a good bug report. A good bug report shouldn't leave others needing to contact you for more information.
79
80 Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) experience the problem? What outcome did you expect, and how did it differ from what you actually saw? All these details will help people to fix any potential bugs.
81
82 Example:
83
84 > Short and descriptive example bug report title
85 >
86 > A summary of the issue and the environment/browser in which it occurs. If
87 > suitable, include the steps required to reproduce the bug.
88 >
89 > 1. This is the first step
90 > 2. This is the second step
91 > 3. Further steps, etc.
92 >
93 > Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).
94
95 **Note:** In an effort to keep open issues to a manageable number, we will close any issues that do not provide enough information for us to be able to work on a solution. You will be encouraged to provide the necessary details, after which we will reopen the issue.
96
97
98 <a name="features"></a>
99
100 ## Feature Requests
101
102 Feature requests are very welcome! But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
103
104 Building something great means choosing features carefully especially because it is much, much easier to add features than it is to take them away. Additions to Stream will be evaluated on a combination of scope (how well it fits into the project), maintenance burden and general usefulness to users.
105
106
107 <a name="pull-requests"></a>
108
109 ## Pull Requests
110
111 Good pull requests &mdash; patches, improvements, new features &mdash; are a fantastic help.
112 They should remain focused in scope and avoid containing unrelated commits.
113
114 **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. You can solicit feedback and opinions in an open enhancement issue, or [](https://github.com/xwp/stream/issues/newcreate a new one](https://github.com/xwp/stream/issues/new](https://github.com/xwp/stream/issues/new).
115
116 Please use the [](#git-flowgit flow for pull requests](#git-flow](#git-flow) and follow [](https://make.wordpress.org/core/handbook/coding-standards/WordPress Coding Standards](https://make.wordpress.org/core/handbook/coding-standards/](https://make.wordpress.org/core/handbook/coding-standards/) before submitting your work.
117
118
119 <a name="git-flow"></a>
120
121 ### Git Flow for Pull Requests
122
123 1. [](https://help.github.com/fork-a-repo/Fork](https://help.github.com/fork-a-repo/](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
124
125 ```bash
126 # Clone your fork of the repo into the current directory
127 git clone git@github.com:<YOUR_USERNAME>/stream.git
128 # Navigate to the newly cloned directory
129 cd stream
130 # Assign the original repo to a remote called "upstream"
131 git remote add upstream https://github.com/xwp/stream
132 ```
133
134 2. If you cloned a while ago, get the latest changes from upstream:
135
136 ```bash
137 git checkout master
138 git pull upstream master
139 ```
140
141 3. Create a new topic branch (off the `master` branch) to contain your feature, change, or fix:
142
143 ```bash
144 git checkout -b <topic-branch-name>
145 ```
146
147 4. Commit your changes in logical chunks. Please adhere to these [](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.htmlgit commit message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). Use Git's [](https://help.github.com/articles/interactive-rebaseinteractive rebase](https://help.github.com/articles/interactive-rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.
148
149 5. Locally merge (or rebase) the upstream development branch into your topic branch:
150
151 ```bash
152 git pull [--rebase] upstream master
153 ```
154
155 6. Push your topic branch up to your fork:
156
157 ```bash
158 git push origin <topic-branch-name>
159 ```
160
161 7. [](https://help.github.com/articles/using-pull-requests/Open a Pull Request](https://help.github.com/articles/using-pull-requests/](https://help.github.com/articles/using-pull-requests/) (with a clear title and description) to the `develop` branch.
162
163 **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the [](https://www.gnu.org/licenses/gpl-2.0.htmlGPL v2 license](https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html).
164