MCPcopy Create free account
hub / github.com/SIMARSINGHRAYAT/Gitzo / handleSelectRepo

Function handleSelectRepo

src/App.tsx:131–141  ·  view source on GitHub ↗
(repo: GitHubRepo)

Source from the content-addressed store, hash-verified

129 }, [tokenInput]);
130
131 const handleSelectRepo = async (repo: GitHubRepo) => {
132 setSelectedRepo(repo); setRepoDropdownOpen(false); setRepoSearch('');
133 setPermissionStatus('checking'); setPermissionError('');
134 try {
135 const result = await testRepoPermission(token, repo.owner.login, repo.name);
136 setPermissionStatus(result.canCreate ? 'ok' : 'fail');
137 if (!result.canCreate) setPermissionError(result.error || 'Cannot write to this repo.');
138 } catch (err: any) {
139 setPermissionStatus('fail'); setError(err.message);
140 }
141 };
142
143 const generateQuickdrawBadge = () => {
144 setQuickdrawBadgeTemplates([{ id: uid(), title: `Quickdraw Badge Update`, body: `Automated issue closure at ${new Date().toISOString()}` }]);

Callers 1

AppFunction · 0.85

Calls 1

testRepoPermissionFunction · 0.90

Tested by

no test coverage detected