Skip to content

Commit 166b37c

Browse files
author
Matteo Crippa
committed
fix push script, now disabled
1 parent 20f903e commit 166b37c

File tree

4 files changed

+272
-0
lines changed

4 files changed

+272
-0
lines changed

.github/pushnotification/package-lock.json

+246
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/pushnotification/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "pushnotification",
3+
"version": "0.0.1",
4+
"description": "Send a push notification to subcribers if a PR is accepted",
5+
"main": "sendpush.js",
6+
"author": "Matteo Crippa",
7+
"license": "MIT",
8+
"dependencies": {
9+
"node-onesignal": "^0.3.1"
10+
}
11+
}

.github/pushnotification/sendpush.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// libs
2+
const OneSignalClient = require('node-onesignal');
3+
4+
// TODO: add env var to travisCI
5+
const client = new OneSignalClient([process.env.ONESIGNAL_APPID], [process.env.ONESIGNAL_KEY]);
6+
7+
// send push
8+
/*
9+
client.sendNotification('test notification', {
10+
included_segments: 'all'
11+
});
12+
*/

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ Icon
2424
Network Trash Folder
2525
Temporary Items
2626
.apdisk
27+
28+
# Node modules
29+
node_modules

0 commit comments

Comments
 (0)