Skip to content

Commit d8b3770

Browse files
committed
feat(plugin): Initial commit
0 parents  commit d8b3770

16 files changed

Lines changed: 6806 additions & 0 deletions

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Created by https://www.gitignore.io/api/node,visualstudiocode
2+
3+
### Node ###
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
*.pid.lock
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Coverage directory used by tools like istanbul
21+
coverage
22+
23+
# nyc test coverage
24+
.nyc_output
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# node-waf configuration
33+
.lock-wscript
34+
35+
# Compiled binary addons (http://nodejs.org/api/addons.html)
36+
build/Release
37+
38+
# Dependency directories
39+
node_modules/
40+
jspm_packages/
41+
42+
# Typescript v1 declaration files
43+
typings/
44+
45+
# Optional npm cache directory
46+
.npm
47+
48+
# Optional eslint cache
49+
.eslintcache
50+
51+
# Optional REPL history
52+
.node_repl_history
53+
54+
# Output of 'npm pack'
55+
*.tgz
56+
57+
# Yarn Integrity file
58+
.yarn-integrity
59+
60+
# dotenv environment variables file
61+
.env
62+
63+
# Generated code
64+
dist/
65+
66+
### VisualStudioCode ###
67+
.vscode/*
68+
!.vscode/settings.json
69+
!.vscode/tasks.json
70+
!.vscode/launch.json
71+
!.vscode/extensions.json
72+
73+
# End of https://www.gitignore.io/api/node,visualstudiocode

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.babelrc
2+
.editorconfig
3+
.esdoc.json
4+
.travis.yml
5+
yarn.lock
6+
node_modules/
7+
src/
8+
types/*
9+
!types/index.d.ts

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: node_js
2+
cache:
3+
directories:
4+
- ~/.npm
5+
notifications:
6+
email: false
7+
node_js:
8+
- '9'
9+
- '8'
10+
- '6'
11+
after_success:
12+
- npm run semantic-release
13+
branches:
14+
except:
15+
- /^v\d+\.\d+\.\d+$/

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"prettier.singleQuote": false,
3+
"prettier.trailingComma": "es5",
4+
"prettier.semi": false,
5+
"prettier.printWidth": 120,
6+
"files.exclude": {
7+
"**/.git": true,
8+
"**/dist": true,
9+
"**/node_modules": true
10+
}
11+
}

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community 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.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at ny.fanilo@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems 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.
38+
39+
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.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Development
2+
3+
Install [Yarn](https://yarnpkg.com/en/), and install the dependencies - `yarn install`.
4+
5+
Run the [Jest](https://facebook.github.io/jest/) test suite with `yarn test`.
6+
7+
This project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated NPM package publishing.
8+
9+
The main caveat: instead of running `git commit`, run `yarn commit` and follow the prompts to input a conventional changelog message via [commitizen](https://github.com/commitizen/cz-cli).
10+
11+
:heart:

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2017 Ny Fanilo Andrianjafy
2+
3+
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:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
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.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# danger-plugin-complete-pr
2+
3+
[![Build Status](https://travis-ci.org/nylo-andry/danger-plugin-complete-pr.svg?branch=master)](https://travis-ci.org/nylo-andry/danger-plugin-complete-pr)
4+
[![npm version](https://badge.fury.io/js/danger-plugin-complete-pr.svg)](https://badge.fury.io/js/danger-plugin-complete-pr)
5+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6+
7+
> A Danger plugin to verify the completion of a pull request on GitHub.
8+
9+
## Usage
10+
11+
Install:
12+
13+
```sh
14+
yarn add danger-plugin-complete-pr --dev
15+
```
16+
17+
At a glance:
18+
19+
_dangerfile.js_
20+
```js
21+
import * as completePr from 'danger-plugin-complete-pr'
22+
23+
completePr.checkAssignees();
24+
completePr.checkDescription(10);
25+
completePr.checkTitle(/^\[[A-Za-z]+-\d+\]/);
26+
```
27+
28+
## API
29+
30+
### checkAssignees([reporter])
31+
Checks is the current pull request has any assignees.
32+
33+
Arguments:
34+
35+
- [`reporter`] (_Function_): The reporter (`message`, `warn` or `fail`) to call if the pull request has no assignees.
36+
- Default value: `fail`
37+
38+
### checkDescription(minimumLength, [reporter])
39+
Checks if the description of the pull request is long enough.
40+
41+
Arguments:
42+
43+
- `minimumLength` (_Number_): The minimum length for a description to be valid.
44+
- [`reporter`] (_Function_): The reporter (`message`, `warn` or `fail`) to call if the pull request's description is too short.
45+
- Default value: `fail`
46+
47+
### checkTitle(pattern, [reporter])
48+
Checks if the title of the pull request matches a given pattern.
49+
50+
Arguments:
51+
52+
- `pattern` (_RegExp_): The pattern to test the title with.
53+
- [`reporter`] (_Function_): The reporter (`message`, `warn` or `fail`) to call if the pull request's title is invalid.
54+
- Default value: `fail`
55+
56+
## Changelog
57+
58+
See the GitHub [release history](https://github.com/nylo-andry/danger-plugin-complete-pr/releases).
59+
60+
## Contributing
61+
62+
See [CONTRIBUTING.md](CONTRIBUTING.md).

0 commit comments

Comments
 (0)