Skip to content

Commit de8846b

Browse files
committed
Add support for parsing details tags
1 parent e7edd42 commit de8846b

File tree

5 files changed

+118
-256
lines changed

5 files changed

+118
-256
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
node_modules/
33
.storage
44
.wrangler
5-
.capnp
5+
*.capnp
66

77
test/headers.http
88
test/body.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ disgit has the following optional environment variables that you can use to cust
1919
- `IGNORED_PAYLOADS` - A comma seperated list of webhook events that should be ignored
2020
- `DEBUG_PASTE` - Set to `true` to enable debug embeds.
2121
- `EXECUTE_MERGE_QUEUE_BRANCHES` - Set to `true` to unignore merge queue related branches.
22+
- `HIDE_DETAILS_BODY` - Set to `true` to omit the body of details tags from messages. This will cause just summary to be shown in the message.
2223

2324
## Supported Events
2425
The following webhook events are supported as of now;

src/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface Env {
1212
DEBUG_PASTE: string;
1313
AWAIT_ERRORS: string;
1414
EXECUTE_MERGE_QUEUE_BRANCHES: string;
15+
HIDE_DETAILS_BODY: string;
1516
}
1617

1718
/**
@@ -26,6 +27,7 @@ export class BoundEnv {
2627
readonly debugPaste: boolean;
2728
readonly awaitErrors: boolean;
2829
readonly executeMergeQueueBranches: boolean;
30+
readonly hideDetailsBody: boolean;
2931

3032
constructor(env: Env) {
3133
if (typeof env.IGNORED_BRANCHES_REGEX !== 'undefined') {
@@ -38,6 +40,7 @@ export class BoundEnv {
3840
this.debugPaste = env.DEBUG_PASTE == "true" || env.DEBUG_PASTE == "1";
3941
this.awaitErrors = env.AWAIT_ERRORS == "true" || env.AWAIT_ERRORS == "1";
4042
this.executeMergeQueueBranches = env.EXECUTE_MERGE_QUEUE_BRANCHES == "true" || env.EXECUTE_MERGE_QUEUE_BRANCHES == "1";
43+
this.hideDetailsBody = env.HIDE_DETAILS_BODY == "true" || env.HIDE_DETAILS_BODY == "1";
4144
}
4245

4346
/**

0 commit comments

Comments
 (0)