Skip to content

Commit 977332b

Browse files
committed
test-pr-comment-delivery: adjust it to the output of get-webhook-event-payload.js
I already adjusted it at some stage, but forgot that I had manually modified the output of the `get-webhook-event-payload.js` script in my tests, and it was therefore lacking the `id` and `action` lines. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 92ff2e6 commit 977332b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test-pr-comment-delivery.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const fs = require('fs')
55

66
// Expect a path as command-line parameter that points to a file containing
7-
// an event copy/pasted from
7+
// the output of `get-webhook-event-payload.js`, or an event copy/pasted from
88
// https://github.com/organizations/git-for-windows/settings/apps/gitforwindowshelper/advanced
99
// in the form:
1010
//
@@ -20,7 +20,10 @@
2020
// }
2121

2222
const path = process.argv[2]
23-
const contents = fs.readFileSync(path).toString('utf-8')
23+
const contents = fs
24+
.readFileSync(path)
25+
.toString('utf-8')
26+
.replace(/^((id|action): .*\n)*/g, "")
2427

2528
const req = {
2629
headers: {}

0 commit comments

Comments
 (0)