Skip to content

Commit dc51ea8

Browse files
Merge pull request #200 from python-discord/github-filter-fixes
GitHub filter fixes
2 parents df2e6ea + 1b19f44 commit dc51ea8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github-filter/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const hcConfig: Config = {
1414
};
1515

1616
interface Env {
17-
LABELS: KVNamespace;
17+
labels: KVNamespace;
1818
}
1919

2020
const worker = {
@@ -78,7 +78,7 @@ const worker = {
7878

7979
// Send data to any extra label webhooks
8080
let extraChannels = (json.issue || json.pull_request)?.labels?.map(async (label: { [key: string]: string }) => {
81-
let result = await sendLabelWebhook(label.name, data, env.LABELS);
81+
let result = await sendLabelWebhook(label.name, data, env.labels);
8282

8383
if (result) {
8484
return result;
@@ -140,7 +140,7 @@ async function sendWebhook(id: string, token: string, data: Data) {
140140
// Pass on data to Discord as usual
141141
const response = await fetch(template, new_request);
142142
if (!response.ok) {
143-
return new Response(response.json(), {
143+
return new Response(await response.json(), {
144144
status: response.status,
145145
});
146146
}

0 commit comments

Comments
 (0)