docs: update contribution guidelines (#1666)
* docs: update contribution guidelines * add release commit message type * update none/empty scope definition * add go mod tidy post update optionpull/1646/head
parent
6eda7d5c00
commit
e091032279
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:base",
|
"config:base",
|
||||||
":semanticCommitTypeAll(chore)",
|
":semanticCommitTypeAll(build)",
|
||||||
":separatePatchReleases"
|
":separatePatchReleases"
|
||||||
],
|
],
|
||||||
"ignorePresets": [
|
"ignorePresets": [
|
||||||
|
@ -54,5 +54,8 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"postUpdateOptions": [
|
||||||
|
"gomodTidy"
|
||||||
|
],
|
||||||
"rebaseWhen": "never"
|
"rebaseWhen": "never"
|
||||||
}
|
}
|
|
@ -1,11 +1,54 @@
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
Anybody willing to contribute to the project either with code,
|
Anybody willing to contribute to the project either with code, documentation, security reviews or whatever, are very welcome to create or review pull requests and take part to discussions in our public chatroom on [Matrix](https://riot.im/app/#/room/#authelia:matrix.org).
|
||||||
documentation, security reviews or whatever, are very welcome to create
|
|
||||||
or review pull requests and take part to discussions in our public chatroom
|
|
||||||
on [Matrix](https://riot.im/app/#/room/#authelia:matrix.org).
|
|
||||||
|
|
||||||
It's also possible to contribute financially in order to support the
|
It's also possible to contribute financially in order to support the community.
|
||||||
community.
|
|
||||||
|
|
||||||
Don't hesitate to come help us improve Authelia! See you soon!
|
Don't hesitate to come help us improve Authelia! See you soon!
|
||||||
|
|
||||||
|
## Bug Reports and Feature Requests
|
||||||
|
|
||||||
|
If you've found a **bug** or have a **feature request** then please create an issue in this repository (but search first in case a similar issue already exists).
|
||||||
|
|
||||||
|
## Code
|
||||||
|
|
||||||
|
If you would like to fix a bug or implement a feature, please fork the repository and create a Pull Request.
|
||||||
|
More information on getting set up locally can be found [here](https://www.authelia.com/docs/contributing/).
|
||||||
|
|
||||||
|
Before you start any Pull Request, it's recommended that you create an issue to discuss first if you have any doubts about requirement or implementation.
|
||||||
|
That way you can be sure that the maintainer(s) agree on what to change and how, and you can hopefully get a quick merge afterwards.
|
||||||
|
Also, let the maintainers know that you plan to work on a particular issue so that no one else starts any duplicate work.
|
||||||
|
|
||||||
|
Pull Requests can only be merged once all status checks are green, which means `authelia-scripts --log-level debug ci` passes, and coverage does not regress.
|
||||||
|
|
||||||
|
## Do not force push to your pull request branch
|
||||||
|
|
||||||
|
Please do not force push to your PR's branch after you have created your PR, as doing so makes it harder for us to review your work.
|
||||||
|
PRs will always be squashed by us when we merge your work.
|
||||||
|
Commit as many times as you need in your pull request branch.
|
||||||
|
|
||||||
|
## Re-requesting a review
|
||||||
|
|
||||||
|
Please do not ping your reviewer(s) by mentioning them in a new comment.
|
||||||
|
Instead, use the re-request review functionality.
|
||||||
|
Read more about this in the [GitHub docs, Re-requesting a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#re-requesting-a-review).
|
||||||
|
|
||||||
|
## Collaboration with maintainers
|
||||||
|
|
||||||
|
Sometimes the codebase can be a challenge to navigate, especially for a first-time contributor.
|
||||||
|
We don't want you spending an hour trying to work out something that would take us only a minute to explain.
|
||||||
|
|
||||||
|
For that reason, we have [Matrix](#matrix) and [Discord](#discord) channels dedicated to helping anyone who's working on Pull Requests for Authelia.
|
||||||
|
|
||||||
|
## Contact Options
|
||||||
|
|
||||||
|
### Matrix
|
||||||
|
|
||||||
|
Join the [Matrix Room](https://riot.im/app/#/room/#authelia:matrix.org) and locate one of the maintainers.
|
||||||
|
You can identify them as they are the room administrators. Alternatively you can just ask for one of the
|
||||||
|
maintainers.
|
||||||
|
|
||||||
|
### Discord
|
||||||
|
|
||||||
|
Join the [Discord Server](https://discord.authelia.com) and message the
|
||||||
|
[#contributing](https://discord.com/channels/707844280412012608/804943261265297408) chat and contact a maintainer.
|
|
@ -152,11 +152,9 @@ Internet (your reverse proxies are) however, it's still the control plane for yo
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
If you want to contribute to Authelia, check the documentation available
|
If you want to contribute to Authelia, please read our [contribution guidelines](./CONTRIBUTING.md).
|
||||||
[here](https://docs.authelia.com/contributing/).
|
|
||||||
|
|
||||||
Authelia exists thanks to all the people who contribute so don't be shy,
|
Authelia exists thanks to all the people who contribute so don't be shy, come chat with us on [Matrix](#matrix) and start contributing too.
|
||||||
come chat with us on [Matrix](#matrix) and start [contributing](./CONTRIBUTING.md) too.
|
|
||||||
|
|
||||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,15 @@ Join the [Matrix Room](https://riot.im/app/#/room/#authelia:matrix.org) and loca
|
||||||
You can identify them as they are the room administrators. Alternatively you can just ask for one of the
|
You can identify them as they are the room administrators. Alternatively you can just ask for one of the
|
||||||
maintainers. Once you've made contact we ask you privately message the maintainer to communicate the vulnerability.
|
maintainers. Once you've made contact we ask you privately message the maintainer to communicate the vulnerability.
|
||||||
|
|
||||||
|
### Discord
|
||||||
|
|
||||||
|
Join the [Discord Server](https://discord.authelia.com) and message the
|
||||||
|
[#support](https://discord.com/channels/707844280412012608/707844280412012612) chat which links to [Matrix](#matrix)
|
||||||
|
and contact a maintainer.
|
||||||
|
|
||||||
### Email
|
### Email
|
||||||
|
|
||||||
You can contact any of the maintainers for security vulnerability related issues by emailing
|
You can contact any of the maintainers for security vulnerability related issues by emailing
|
||||||
[security@authelia.com](mailto:security@authelia.com). This email is strictly reserved for security and vulnerability
|
[security@authelia.com](mailto:security@authelia.com). This email is strictly reserved for security and vulnerability
|
||||||
disclosure related matters. If you need to contact us for another reason please use [Matrix](#matrix) or
|
disclosure related matters. If you need to contact us for another reason please use [Matrix](#matrix) or
|
||||||
[team@authelia.com](mailto:security@authelia.com).
|
[team@authelia.com](mailto:team@authelia.com).
|
|
@ -2,6 +2,7 @@
|
||||||
layout: default
|
layout: default
|
||||||
title: Authelia Scripts
|
title: Authelia Scripts
|
||||||
parent: Contributing
|
parent: Contributing
|
||||||
|
nav_order: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
# Authelia Scripts
|
# Authelia Scripts
|
||||||
|
|
|
@ -13,7 +13,7 @@ running `source bootstrap.sh`. This CLI provides many useful tools
|
||||||
to help you during development.
|
to help you during development.
|
||||||
|
|
||||||
In order to build and contribute to **Authelia**, you need to make
|
In order to build and contribute to **Authelia**, you need to make
|
||||||
sure Go v1.13, Docker, docker-compose and Node v12 are installed on
|
sure Go >= v1.13, Docker, docker-compose and Node >= v12 are installed on
|
||||||
your machine.
|
your machine.
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
|
@ -84,7 +84,7 @@ test the *Standalone* suite.
|
||||||
$ authelia-scripts suites test Standalone
|
$ authelia-scripts suites test Standalone
|
||||||
|
|
||||||
The suite will be spawned, tests will be run and then the suite
|
The suite will be spawned, tests will be run and then the suite
|
||||||
will be teared down automatically.
|
will be torn down automatically.
|
||||||
|
|
||||||
|
|
||||||
[suites]: ./suites.md
|
[suites]: ./suites.md
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: Commit Message Guidelines
|
||||||
|
parent: Contributing
|
||||||
|
nav_order: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# Commit Message Guidelines
|
||||||
|
|
||||||
|
## The reasons for these conventions:
|
||||||
|
|
||||||
|
- simple navigation though and easier to read git history
|
||||||
|
|
||||||
|
## Format of the commit message:
|
||||||
|
|
||||||
|
Each commit message consists of a **header**, a **body**, and a **footer**.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
<header>
|
||||||
|
<BLANK LINE>
|
||||||
|
<body>
|
||||||
|
<BLANK LINE>
|
||||||
|
<footer>
|
||||||
|
```
|
||||||
|
|
||||||
|
The `header` is mandatory and must conform to the [Commit Message Header](#commit-message-header) format.
|
||||||
|
|
||||||
|
The `body` is mandatory for all commits except for those of type "docs".
|
||||||
|
When the body is present it must be at least 20 characters long and must conform to the [Commit Message Body](#commit-message-body) format.
|
||||||
|
|
||||||
|
The `footer` is optional. The [Commit Message Footer](#commit-message-footer) format describes what the footer is used for, and the structure it must have.
|
||||||
|
|
||||||
|
Any line of the commit message cannot be longer than 100 characters.
|
||||||
|
|
||||||
|
### Commit Message Header
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>(<scope>): <summary>
|
||||||
|
│ │ │
|
||||||
|
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
|
||||||
|
│ │
|
||||||
|
│ └─⫸ Commit Scope: api|authentication|authorization|cmd|commands|configuration|duo|
|
||||||
|
│ handlers|logging|middlewares|mocks|models|notification|regulation|
|
||||||
|
│ server|session|storage|suites|templates|utils|web
|
||||||
|
│
|
||||||
|
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|release|test
|
||||||
|
```
|
||||||
|
|
||||||
|
The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is optional.
|
||||||
|
|
||||||
|
#### Allowed `<type>` values:
|
||||||
|
|
||||||
|
* **build** Changes that affect the build system or external dependencies (example scopes: bundler, deps, docker, go, npm)
|
||||||
|
* **ci** Changes to our CI configuration files and scripts (example scopes: autheliabot, buildkite, codecov, golangci-lint, renovate, reviewdog)
|
||||||
|
* **docs** Documentation only changes
|
||||||
|
* **feat** A new feature
|
||||||
|
* **fix** A bug fix
|
||||||
|
* **perf** A code change that improves performance
|
||||||
|
* **refactor** A code change that neither fixes a bug nor adds a feature
|
||||||
|
* **release** Releasing a new version of Authelia
|
||||||
|
* **test** Adding missing tests or correcting existing tests
|
||||||
|
|
||||||
|
#### Allowed `<scope>` values:
|
||||||
|
|
||||||
|
The scope should be the name of the package affected (as perceived by the person reading the changelog generated from commit messages).
|
||||||
|
|
||||||
|
* authentication
|
||||||
|
* authorization
|
||||||
|
* commands
|
||||||
|
* configuration
|
||||||
|
* duo
|
||||||
|
* handlers
|
||||||
|
* logging
|
||||||
|
* middlewares
|
||||||
|
* mocks
|
||||||
|
* models
|
||||||
|
* notification
|
||||||
|
* regulation
|
||||||
|
* server
|
||||||
|
* session
|
||||||
|
* storage
|
||||||
|
* suites
|
||||||
|
* templates
|
||||||
|
* utils
|
||||||
|
|
||||||
|
There are currently a few exceptions to the "use package name" rule:
|
||||||
|
|
||||||
|
* `api`: used for changes that change the openapi specification
|
||||||
|
|
||||||
|
* `cmd`: used for changes to the `authelia|authelia-scripts|authelia-suites` top level binaries
|
||||||
|
|
||||||
|
* `web`: used for changes to the React based frontend
|
||||||
|
|
||||||
|
* none/empty string: useful for `test`, `refactor` and changes that are done across multiple packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
|
||||||
|
|
||||||
|
#### Summary
|
||||||
|
|
||||||
|
Use the summary field to provide a succinct description of the change:
|
||||||
|
|
||||||
|
* use the imperative, present tense: "change" not "changed" nor "changes"
|
||||||
|
* don't capitalize the first letter
|
||||||
|
* no dot (.) at the end
|
||||||
|
|
||||||
|
|
||||||
|
### Commit Message Body
|
||||||
|
|
||||||
|
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
|
||||||
|
|
||||||
|
Explain the motivation for the change in the commit message body. This commit message should explain _why_ you are making the change.
|
||||||
|
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
|
||||||
|
|
||||||
|
|
||||||
|
### Commit Message Footer
|
||||||
|
|
||||||
|
The footer can contain information about breaking changes and is also the place to reference GitHub issues and other PRs that this commit closes or is related to.
|
||||||
|
|
||||||
|
```
|
||||||
|
BREAKING CHANGE: <breaking change summary>
|
||||||
|
<BLANK LINE>
|
||||||
|
<breaking change description + migration instructions>
|
||||||
|
<BLANK LINE>
|
||||||
|
<BLANK LINE>
|
||||||
|
Fixes #<issue number>
|
||||||
|
```
|
||||||
|
|
||||||
|
Breaking Change section should start with the phrase "BREAKING CHANGE: " followed by a summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
|
||||||
|
|
||||||
|
|
||||||
|
### Revert commits
|
||||||
|
|
||||||
|
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
|
||||||
|
|
||||||
|
The content of the commit message body should contain:
|
||||||
|
|
||||||
|
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
|
||||||
|
- a clear description of the reason for reverting the commit message.
|
||||||
|
|
||||||
|
|
||||||
|
## Example commit message:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
fix(logging): disabled colored logging outputs when file is specified
|
||||||
|
|
||||||
|
In some scenarios if a user has a log_file_path specified and a TTY seems to be detected this causes terminal coloring outputs to be written to the file.
|
||||||
|
This in turn will cause issues when attempting to utilise the log with the provided fail2ban regexes.
|
||||||
|
|
||||||
|
We now override any TTY detection/logging treatments and disable coloring/removal of the timestamp when a user is utilising the text based logger to a file.
|
||||||
|
|
||||||
|
Fixes #1480.
|
||||||
|
```
|
||||||
|
|
||||||
|
This document is based on [AngularJS Git Commit Message Format].
|
||||||
|
|
||||||
|
[AngularJS Git Commit Message Format]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
|
|
@ -11,8 +11,7 @@ has_children: true
|
||||||
|
|
||||||
**Authelia** and its development workflow can be tested with Docker and docker-compose on Linux.
|
**Authelia** and its development workflow can be tested with Docker and docker-compose on Linux.
|
||||||
|
|
||||||
In order to deploy the current version of Authelia locally, run the following command and
|
In order to deploy the current version of Authelia locally, run the following command and follow the instructions of bootstrap.sh:
|
||||||
follow the instructions of bootstrap.sh:
|
|
||||||
|
|
||||||
$ source bootstrap.sh
|
$ source bootstrap.sh
|
||||||
|
|
||||||
|
@ -38,7 +37,7 @@ Here are the versions used for testing in Buildkite:
|
||||||
### How can I serve my application under example.com?
|
### How can I serve my application under example.com?
|
||||||
|
|
||||||
Don't worry, you don't need to own the domain *example.com* to test Authelia.
|
Don't worry, you don't need to own the domain *example.com* to test Authelia.
|
||||||
Copy the following lines in your /etc/hosts.
|
Copy the following lines in your `/etc/hosts`.
|
||||||
|
|
||||||
192.168.240.100 home.example.com
|
192.168.240.100 home.example.com
|
||||||
192.168.240.100 login.example.com
|
192.168.240.100 login.example.com
|
||||||
|
@ -48,8 +47,6 @@ Copy the following lines in your /etc/hosts.
|
||||||
192.168.240.100 mail.example.com
|
192.168.240.100 mail.example.com
|
||||||
192.168.240.100 mx1.mail.example.com
|
192.168.240.100 mx1.mail.example.com
|
||||||
|
|
||||||
`192.168.240.100` is the IP attributed by Docker to the reverse proxy. Once done
|
`192.168.240.100` is the IP attributed by Docker to the reverse proxy. Once added you can access the listed sub-domains from your browser, and they will target the reverse proxy.
|
||||||
you can access the listed sub-domains from your browser and they will target
|
|
||||||
the reverse proxy.
|
|
||||||
|
|
||||||
[suite]: ./suites.md
|
[suite]: ./suites.md
|
Loading…
Reference in New Issue