-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (36 loc) · 1.17 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* This is the main entrypoint to your Probot app
* @param {import('probot').Probot} app
*/
module.exports = (app) => {
// Your code here
app.log.info("Yay, the app was loaded!");
app.on("issues.opened", async (context) => {
const issueComment = context.issue({
body: "Thanks for opening this issue!",
});
return context.octokit.issues.createComment(issueComment);
});
app.on("issues.edited", async (context) => {
const issueComment = context.issue({
body: "Thanks for editing this issue!",
});
return context.octokit.issues.createComment(issueComment);
});
app.on("issues.closed", async (context) => {
const issueComment = context.issue({
body: "Thanks for closing this issue!",
});
return context.octokit.issues.createComment(issueComment);
});
app.on("push", async (context) => {
app.log.info(context);
});
app.onAny(async (context) => {
app.log.info({ event: context.name, action: context.payload.action });
// Load config from .github/config.yml in the repository
const config = await context.config('config.yml')
app.log.info("Configuration");
app.log.info(config);
});
};