MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / syncGithubNotes

Function syncGithubNotes

deployments/desktop/static/desktop.js:4127–4155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4125 }
4126
4127 async function syncGithubNotes() {
4128 try {
4129 const data = await api("/api/github/sync", {
4130 method: "POST",
4131 body: JSON.stringify({ user_id: currentUser(), response_language: responseLanguage() })
4132 });
4133 await loadSettings();
4134 await loadWiki();
4135 const llm = data.llm_review || {};
4136 const summary = githubSyncSummary(data);
4137 const labels = ui().wiki.githubSync;
4138 const detail = [
4139 `${labels.repoDir}: ${data.repo_dir || "-"}`,
4140 `${labels.remote}: ${data.remote || "-"}`,
4141 `${labels.branch}: ${data.branch || "main"}`,
4142 data.pull_warning ? `${labels.warning}: ${data.pull_warning}` : "",
4143 llm.summary ? `${labels.llmReview}: ${llm.summary}` : ""
4144 ].filter(Boolean).join("\n");
4145 $("wikiStats").textContent = `${summary} · GitHub`;
4146 setWikiEntry(labels.resultTitle, detail, "", { renderRelations: false });
4147 showFeedbackToast("success", labels.successTitle, summary);
4148 } catch (error) {
4149 const message = error.message || String(error);
4150 $("wikiStats").textContent = ui().wiki.githubSync.failureTitle;
4151 showFeedbackToast("error", ui().wiki.githubSync.failureTitle, message);
4152 error.paperflowToastShown = true;
4153 throw error;
4154 }
4155 }
4156
4157 async function searchWiki() {
4158 const rawQuery = $("wikiQuery").value.trim();

Callers

nothing calls this directly

Calls 10

currentUserFunction · 0.85
responseLanguageFunction · 0.85
loadSettingsFunction · 0.85
loadWikiFunction · 0.85
githubSyncSummaryFunction · 0.85
uiFunction · 0.85
setWikiEntryFunction · 0.85
showFeedbackToastFunction · 0.85
apiFunction · 0.70
$Function · 0.70

Tested by

no test coverage detected