Update Gitea-Sektion:

Branch-Auswahl
Dieser Commit ist enthalten in:
Claude Project Manager
2025-12-29 19:02:44 +00:00
Ursprung 8da6ad83f0
Commit 627beb1353
30 geänderte Dateien mit 3953 neuen und 56 gelöschten Zeilen

Datei anzeigen

@ -284,12 +284,44 @@ function getSafeCloneUrl(cloneUrl) {
return cloneUrl.replace(/https:\/\/[^@]+@/, 'https://');
}
/**
* Repository-Einstellungen aktualisieren (z.B. default_branch ändern)
*/
async function updateRepository(owner, repo, options = {}) {
try {
const updateData = {};
if (options.defaultBranch) updateData.default_branch = options.defaultBranch;
if (options.description !== undefined) updateData.description = options.description;
if (options.private !== undefined) updateData.private = options.private;
const repoData = await giteaFetch(`/repos/${owner}/${repo}`, {
method: 'PATCH',
body: JSON.stringify(updateData)
});
logger.info(`Repository ${owner}/${repo} aktualisiert (default_branch: ${repoData.default_branch})`);
return {
success: true,
repository: {
id: repoData.id,
name: repoData.name,
fullName: repoData.full_name,
defaultBranch: repoData.default_branch
}
};
} catch (error) {
logger.error(`Fehler beim Aktualisieren des Repositories ${owner}/${repo}:`, error);
return { success: false, error: error.message };
}
}
module.exports = {
listRepositories,
getRepository,
getRepositoryBranches,
getRepositoryCommits,
createRepository,
updateRepository,
deleteRepository,
getCurrentUser,
testConnection,