diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f35b1d --- /dev/null +++ b/.gitignore @@ -0,0 +1,73 @@ +.DS_Store + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ +package-lock.json + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# local bundler files +.bundle +Gemfile.lock +vendor + +# local Jekyll files +_site +.jekyll-metadata diff --git a/.markdown-link-check.json b/.markdown-link-check.json new file mode 100644 index 0000000..2cb5410 --- /dev/null +++ b/.markdown-link-check.json @@ -0,0 +1,5 @@ +{ + "ignorePatterns": [ + "http://esdc*" + ] +} diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..7b1ebc9 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,5 @@ +{ + "default": true, + "MD013": false, + "MD041": false +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..272aa26 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js + +node_js: +- "node" \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d4f4854..0fc0811 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,4 +1,10 @@ -# Contributor Covenant Code of Conduct +# Contributor Covenant Code of Conduct for the `Welcome` project + +Contributors to repositories hosted in `Welcome` are expected to follow the Contributor Covenant Code of Conduct, and those working within Government are also expected to follow the Values and Ethics Code for the Public Sector + +## Values and Ethics Code for the Public Sector + +The [Values and Ethics Code for the Public Sector](https://www.tbs-sct.gc.ca/pol/doc-eng.aspx?id=25049) ## Our Pledge @@ -30,20 +36,25 @@ Project maintainers have the right and responsibility to remove, edit, or reject ## Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project, members or ESDC. -Examples of representing a project, members or ESDC include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project, members or ESDC. +Examples of representing a project, members or ESDC include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + Representation of a project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at EDSC.DGIIT.SCS-SDS.IITB.ESDC@hrsdc-rhdcc.gc.ca. -All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at EDSC.DGIIT.SCS-SDS.IITB.ESDC@hrsdc-rhdcc.gc.ca. +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. -## Attribution +## Attribution [EN] This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) + +[homepage]: https://www.contributor-covenant.org + +This Code of Conduct is also inspired by GDS' `alphagov` [Code of conduct](https://github.com/alphagov/code-of-conduct) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3efa6af..ef52623 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,24 +1,21 @@ -# How to contribute +# Contributing -Helping keep this project up to date, helps others know what's going on in the IITB world and where to find needed information. So thank you for helping to maintain it! +## How to Contribute -## Getting involved +When contributing, post comments and discuss changes you wish to make via Issues. -If you're new to GitHub or Git don't worry, open an issue asking for some help and what you want to do. We'll be happy to help. +Feel free to propose changes by creating Pull Requests. If you don't have write access, editing a file will create a Fork of this project for you to save your proposed changes to. Submitting a change to a file will write it to a new Branch in your Fork, so you can send a Pull Request. -### Reporting +If this is your first time contributing on GitHub, don't worry! Let us know if you have any questions. -Reporting new additions though issues is key. This helps us keep track of all the work that is needed and wanted for this project. +### Recommendations and Guides -When opening new issues please use the template provided if they fit your request. -Templates avaliable: +The “Welcome” project in ESDC org (master branch) used to publish recommendations and guides (how to). +Draft documents can be created either in a branch in ESDC or a branch in the Fork on DevCoP (prefix with `draft-`). +Initial draft doesn’t require review, but any changes to the draft require review via a PR. +The publish of the doc will also have a final review via a PR. -* **List Team Group** - We have a separate team group that should be added to the list. +### Security -### Developing +**Do not post any security issues on the public repository!** See [SECURITY.md](SECURITY.md) -#### Contributors - -You can fork the project, and make a pull request with your changes. - -Please use the **Gernal** pull request template. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d43dae2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Her Majesty the Queen in Right of Canada, as represented by the Employment and Social Development Canada, 2019 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 6d1c804..91771ea 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,13 @@ ESDC Teams that have their own organization in GitHub. * [GCDevOps League](https://github.com/gcdevops) * [Canada.ca](https://github.com/canada-ca/) + +## How to Contribute + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +Unless otherwise noted, the source code of this project is covered under Crown Copyright, Government of Canada, and is distributed under the [MIT License](LICENSE). + +The Canada wordmark and related graphics associated with this distribution are protected under trademark law and copyright law. No permission is granted to use them outside the parameters of the Government of Canada's corporate identity program. For more information, see [Federal identity requirements](https://www.canada.ca/en/treasury-board-secretariat/topics/government-communications/federal-identity-requirements.html). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..75b8b29 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +**Do not post any security issues on the public repository!** Security vulnerabilities must be reported by email to EDSC.DGIIT.SCS-SDS.IITB.ESDC@hrsdc-rhdcc.gc.ca diff --git a/link-check.js b/link-check.js new file mode 100644 index 0000000..a98acc0 --- /dev/null +++ b/link-check.js @@ -0,0 +1,45 @@ +#!/usr/bin/env node + +'use strict'; + +var markdownLinkCheck = require('markdown-link-check'); +var fs = require("fs"); +var glob = require("glob"); +var path = require("path"); +var chalk = require("chalk"); + + +var files = glob.sync("**/*.md", {ignore: ["node_modules/**/*.md"]}) + +var config = JSON.parse(fs.readFileSync(".markdown-link-check.json")); +config.timeout = '30s' + +var opts = JSON.parse(fs.readFileSync(".markdown-link-check.json")); + +files.forEach(function(file) { + var markdown = fs.readFileSync(file).toString(); + let opts = Object.assign({}, config); + + opts.baseUrl = path.dirname(path.resolve(file)) + '/'; + + markdownLinkCheck(markdown, opts, function (err, results) { + if (err) { + console.error('Error', err); + return; + } + + console.log(chalk.green("Reading: " + file)); + + results.forEach(function (result) { + if(result.status === "dead") { + if (result.statusCode == 500) { + console.log(chalk.yellow("Server error on target: " + result.link)); + } + else { + process.exitCode = 1 + console.log(chalk.red("Dead: " + result.link)); + } + } + }); + }); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..371ac1f --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "scripts": { + "link-check": "node link-check.js", + "lint": "markdownlint -i node_modules \"**/*.md\"", + "test": "npm run lint && npm run link-check" + }, + "repository": { + "type": "git", + "url": "https://github.com/canada-ca/template-gabarit" + }, + "license": "MIT", + "devDependencies": { + "chalk": "^2.4.2", + "cspell": "^4.0.28", + "glob": "^7.1.2", + "markdown-link-check": "^3.7.2", + "markdownlint-cli": "^0.18.0" + } +}