Skip to content

Commit 5d74220

Browse files
committed
feat: initial implementation
1 parent c3ba6b1 commit 5d74220

File tree

6 files changed

+91
-0
lines changed

6 files changed

+91
-0
lines changed

index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var fs = require('fs')
2+
var path = require('path')
3+
4+
var _ = require('lodash')
5+
6+
module.exports = _(fs.readdirSync(path.join(__dirname, 'src')))
7+
8+
.filter(function (file) {
9+
return file.slice(-3) === '.md'
10+
})
11+
12+
.mapKeys(function (file) {
13+
return _.camelCase(file.replace(/\.md$/, ''))
14+
})
15+
16+
.mapValues(function (file) {
17+
return _.template(fs.readFileSync(path.join(__dirname, 'src', file), 'utf8'))
18+
})
19+
20+
.value()

src/diff-commits.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The new version differs by <%= total_commits %> commits <% if (behind_by) { %>(ahead by <%= ahead_by %>, behind by <%= behind_by %>)<% } %>.
2+
3+
<% _.forEach(_.take(commits.reverse(), 15), function (commit) { %>- [`<%= _.take(commit.sha, 7).join('') %>`](<%= commit.html_url %>) `<%= commit.commit.message.split('\n')[0] %>`
4+
<% }) %>
5+
<% if (commits.length > 15) { %>
6+
There are <%= commits.length %> commits in total. <% } %>See the [full diff](<%= html_url %>).

src/package-bump-body.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Hello :wave:
2+
3+
<% if (status === 'update') { %>:rocket::rocket::rocket:
4+
5+
<%= dependency_link %> just published its new version <%= version %>, which **is not covered by your current version range**.
6+
7+
If this pull request passes your tests you can publish your software with the latest version of <%= dependency %> – otherwise use this branch to work on adaptions and fixes.
8+
<% } else if (status === 'noci') { %>:warning::warning::warning:
9+
10+
<%= dependency_link %> just published its new version <%= version %>, which **is covered by your current version range**. **No automated tests** are configured for this project.
11+
12+
This means it’s now **unclear whether your software still works**. Manually check if that’s still the case
13+
and close this pull request – if it broke, use this branch to work on adaptions and fixes.
14+
15+
<sub>
16+
Do you think getting a pull request for every single new version of your dependencies is too noisy?
17+
Configure continuous integration and you will only receive them when tests fail. 
18+
</sub>
19+
<% } else if (status === 'failure') { %>:warning::warning::warning:
20+
21+
<%= dependency_link %> just published its new version <%= version %>, which **is covered by your current version range**. After updating it in your project **the build kept failing**.
22+
23+
This means **it’s possible that your software is malfunctioning**, because of this update. Use this branch to work on adaptions and fixes.
24+
<% } else { %>:rotating_light::rotating_light::rotating_light:
25+
26+
<%= dependency_link %> just published its new version <%= version %>, which **is covered by your current version range**. After updating it in your project **the build went from success to failure**.
27+
28+
This means **your software is now malfunctioning**, because of this update. Use this branch to work on adaptions and fixes.
29+
<% } %>
30+
31+
Happy fixing and merging :palm_tree:

src/package-pin-body.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Hello :wave:
2+
3+
This is the first automated pull requests to help reach the goal of up to date and stable software.
4+
It updates all of the dependencies in the `package.json` in one go, but from now on you’ll receive **pull requests** for each dependency update **in isolation and in real time**.
5+
6+
For updates that satisfy the existing version range you’ll get pull-requests only if it breaks your build.
7+
8+
Example:
9+
10+
```diff
11+
- "underscore": "^1.6.0"
12+
+ "underscore": "^1.7.0"
13+
```
14+
15+
When an update does not satisfy the existing range you’ll get the pull request right away.
16+
17+
Example:
18+
19+
```diff
20+
- "lodash": "^3.0.0"
21+
+ "lodash": "^4.0.0"
22+
```
23+
24+
Happy fixing and merging :palm_tree:

src/sponsor-message-commit.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
https://greenkeeper.io/

src/sponsor-message-pr.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This pull request was created by [greenkeeper.io](https://greenkeeper.io/).
2+
It keeps your software up to date, all the time.
3+
4+
<sub>
5+
Tired of seeing this sponsor message? Upgrade to the supporter plan!
6+
You'll also get your pull requests faster :zap:
7+
</sub>

0 commit comments

Comments
 (0)