Readme

Used to post issues back to github from website's UI for non-technical users.

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
import process from "node:process";
export async function createIssue(issue_data) {
const { Octokit } = await import("npm:@octokit/core");
const octokit = new Octokit({
auth: process.env.gh_token,
});
const { summary, path, browser_type, browser_size, logs } = issue_data;
const body = `## Report
${summary}
## Session Info
${path}
${browser_type}
${browser_size}
\`\`\`
${JSON.stringify(logs, null, 2)}
\`\`\`
`;
const response = await octokit.request("POST /repos/the-log/svelte/issues", {
owner: "the-log",
repo: "svelte",
title: "Untriaged Issue",
body,
assignees: [
"andy-blum",
],
labels: [
"triage",
],
headers: {
"X-GitHub-Api-Version": "2022-11-28",
},
});
return response.data.html_url;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023