-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (40 loc) · 1.26 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
43
44
45
46
47
48
/**
* 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("repository.created", async (context) => {
// const team_name = "team_name"
// context.octokit.teams.addOrUpdateRepoPermissionsInOrg({
// org: "github",
// team_slug: team_name + "_admin",
// repo: repo.name,
// permission: "admin"
// });
// context.octokit.teams.addOrUpdateRepoPermissionsInOrg({
// org: "github",
// team_slug: team_name + "_read",
// repo: repo.name,
// permission: "pull"
// });
// context.octokit.teams.addOrUpdateRepoPermissionsInOrg({
// org: "github",
// team_slug: team_name + "_write",
// repo: repo.name,
// permission: "push"
// });
// });
// Sample action
app.on("issues.opened", async (context) => {
const issueComment = context.issue({
body: "Thanks for opening this issue!",
});
return context.octokit.issues.createComment(issueComment);
});
// For more information on building apps:
// https://probot.github.io/docs/
// To get your app running against GitHub, see:
// https://probot.github.io/docs/development/
};