-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathhelperMessage.ts
More file actions
51 lines (48 loc) · 1.94 KB
/
Copy pathhelperMessage.ts
File metadata and controls
51 lines (48 loc) · 1.94 KB
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
49
50
51
import {
IHttp,
IModify,
IPersistence,
IRead,
} from "@rocket.chat/apps-engine/definition/accessors";
import { IRoom } from "@rocket.chat/apps-engine/definition/rooms";
export async function helperMessage({
room,
read,
persistence,
modify,
http,
}: {
room: IRoom;
read: IRead;
persistence: IPersistence;
modify: IModify;
http: IHttp;
}) {
let helperMessageString = `### Github App
*The app can be accessed with any of the slash commands /gh or /github*
1. See Interactive Button interface to fetch repository data -> \`/github Username/RepositoryName\`
2. Get details of a Repository -> \`/github Username/RepositoryName repo\`
3. Get Issues of a Repository -> \`/github Username/RepositoryName issues\`
4. Get Contributors of a Repository -> \`/github Username/RepositoryName contributors\`
5. Get Recent Pull Request of a Repository -> \`/github Username/RepositoryName pulls\`
6. Review a Pull Request -> \`/github Username/RepositoryName pulls pullNumber\`
7. Login to GitHub -> \`/github login\`
8. Logout from GitHub -> \`/github logout\`
9. View your GitHub Profile and Issues -> \`/github me\`
10. View/Add/Delete/Update Repository Subscriptions -> \`/github subscribe\`
11. Subscribe to all repository events -> \`/github Username/RepositoryName subscribe\`
12. Unsubscribe to all repository events -> \`/github Username/RepositoryName unsubscribe\`
13. Add New Issues to GitHub Repository -> \`/github issue\`
14. Add New Issue to a GitHub Repository -> \`/github Username/RepositoryName issue\`
15. Search Issues and Pull Requests -> \`/github search\`
16. Assign and Share Issues -> \`/github issues\`
`;
const textSender = await modify
.getCreator()
.startMessage()
.setText(`${helperMessageString}`);
if (room) {
textSender.setRoom(room);
}
await modify.getCreator().finish(textSender);
}