MCPcopy Create free account
hub / github.com/UI5/webcomponents / createGist

Function createGist

packages/website/src/components/Editor/githubAPI.js:39–55  ·  view source on GitHub ↗
(token, files, description = "ui5 web components playground example")

Source from the content-addressed store, hash-verified

37};
38
39export const createGist = async (token, files, description = "ui5 web components playground example") => {
40 const response = await fetch(`${NETLIFY_BASE_URL}/github-create-gist`, {
41 method: "POST",
42 headers: {
43 "Content-Type": "application/json",
44 "Authorization": `Bearer ${token}`
45 },
46 body: JSON.stringify({ files, description })
47 });
48
49 if (!response.ok) {
50 const errorData = await response.json().catch(() => ({}));
51 throw new Error(errorData.message || `server error: ${response.status}`);
52 }
53
54 return response.json();
55};
56
57/**
58 * Load and convert gist files to playground format

Callers 1

createGitHubGistFunction · 0.90

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…