From 6c3c5d85be4da63513751f0dcd85eda246ed8d4d Mon Sep 17 00:00:00 2001 From: Robin Quintero Date: Fri, 16 Jun 2023 15:31:17 -0500 Subject: [PATCH] feat(build): #1108 document contributing Add new sections to the contributing.md file to help newcomers. - Running your local changes - Adding yourself to the mailmap - Validating commit message - DCO - Adding and rendering documentation Update lintMarkdown config. Signed-off-by: Robin Quintero --- docs/src/api/extensions/others.md | 5 +++- docs/src/contributing.md | 43 +++++++++++++++++++++++++++++++ test/lint-markdown/config.rb | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/src/api/extensions/others.md b/docs/src/api/extensions/others.md index 2e249535..fca234dc 100644 --- a/docs/src/api/extensions/others.md +++ b/docs/src/api/extensions/others.md @@ -39,7 +39,10 @@ Example: ```bash $ m . /example - {"score": {"base": 6.5, "temporal": 6.0, "environmental": 5.3}, "severity": {"base": "Medium", "temporal": "Medium", "environmental": "Medium"}} + { + "score": {"base": 6.5, "temporal": 6.0, "environmental": 5.3}, + "severity": {"base": "Medium", "temporal": "Medium", "environmental": "Medium"} + } ``` ## chunks diff --git a/docs/src/contributing.md b/docs/src/contributing.md index 293d005d..896da642 100644 --- a/docs/src/contributing.md +++ b/docs/src/contributing.md @@ -38,6 +38,49 @@ Examples: - [feat(build): #252 aws secrets from env](https://github.com/fluidattacks/makes/commit/1c9f06a809bd92d56939d5809ce46058856fdf0a) - [feat(build): #232 make parallel utils](https://github.com/fluidattacks/makes/commit/99e9f77482a6cbc9858a7a928a91a8a8aa9ff353) +### Testing your local changes + +You can run local changes by simply running `m . `. +If you're adding new files, make sure to `git add` them so Makes can recognize +them. + +### Adding yourself to the mailmap + +When contributing is important to add yourself to the +[.mailmap](https://github.com/fluidattacks/makes/blob/main/.mailmap) file. +Make sure to test it with `m . /lintGitMailMap`. + +### Validating commit message + +Once you have your commit ready to be pushed, you can verify if your commit +have the proper structure with `m . /lintGitCommitMsg`. + +### DCO + +Contributors sign-off that they adhere to these requirements by adding a +`Signed-off-by` line to commit messages. + +Example: + +``` +This is my commit message + +Signed-off-by: Robin Quintero +``` + +### Adding documentation + +All added features must be commented in the same PR. +You can run `m . /docs/dev` to serve the [doc site](https://makes.fluidattacks.com) +on localhost. + +### Other PR rules + +A PR must: + +- Only be one commit ahead of main. +- Have a title and body equal to its commmit message. + ### The legal side of contributions All of the code diff --git a/test/lint-markdown/config.rb b/test/lint-markdown/config.rb index 3b7086f9..ded10fc7 100644 --- a/test/lint-markdown/config.rb +++ b/test/lint-markdown/config.rb @@ -9,7 +9,7 @@ rule 'MD010' rule 'MD011' rule 'MD012' -rule 'MD013', :tables => false, :code_blocks => false +rule 'MD013', :tables => false, :ignore_code_blocks => true rule 'MD018' rule 'MD019' rule 'MD020'