Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions github-filter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const hcConfig: Config = {
};

interface Env {
LABELS: KVNamespace;
labels: KVNamespace;
}

const worker = {
Expand Down Expand Up @@ -78,7 +78,7 @@ const worker = {

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

if (result) {
return result;
Expand Down Expand Up @@ -140,7 +140,7 @@ async function sendWebhook(id: string, token: string, data: Data) {
// Pass on data to Discord as usual
const response = await fetch(template, new_request);
if (!response.ok) {
return new Response(response.json(), {
return new Response(await response.json(), {
status: response.status,
});
}
Expand Down