Skip to content

Commit

Permalink
Add templates (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-laugh authored Sep 20, 2019
1 parent eb878cf commit f77b273
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 22 deletions.
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ignorePatterns": [
"http://esdc*"
]
}
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"default": true,
"MD013": false,
"MD041": false
}
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: node_js

node_js:
- "node"
25 changes: 18 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 [email protected].
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 [email protected].
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)
27 changes: 12 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security

**Do not post any security issues on the public repository!** Security vulnerabilities must be reported by email to [email protected]
45 changes: 45 additions & 0 deletions link-check.js
Original file line number Diff line number Diff line change
@@ -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));
}
}
});
});
});
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit f77b273

Please sign in to comment.