-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrules.js
More file actions
23 lines (23 loc) · 603 Bytes
/
rules.js
File metadata and controls
23 lines (23 loc) · 603 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* global $ */
[
/**
* Check if somebody forked this repository after submitting an issue.
* Reverse order because the github api displays events in this order.
*/
$(
(o, p, c, pc, cb) => {
cb(o.get('type') === 'ForkEvent');
}
).followedBy(
(o, p, c, pc, cb) => cb(
o.get('type') === 'IssuesEvent' &&
o.get('actor').get('login') === p.get(0).get('actor').get('login')
)
).then((objs, cb) => cb(
console.log('User: ' +
objs.get(1).get('actor').get('login') +
' forked after writing issue: ' +
objs.get(0).get('id')
)
))
];