Fix createNote function to not duplicate /api/v4 in URL

This commit is contained in:
Admin
2025-03-17 14:22:37 -07:00
parent 0fd73ec04e
commit 4740a4b4f7
2 changed files with 6 additions and 0 deletions

View File

@ -582,12 +582,15 @@ async function createNote(
body: string
): Promise<any> {
// ⚙️ 응답 타입은 GitLab API 문서에 따라 조정 가능
// Don't add /api/v4 again since it's already included in GITLAB_API_URL
const url = new URL(
`${GITLAB_API_URL}/projects/${encodeURIComponent(
projectId
)}/${noteableType}s/${noteableIid}/notes` // Using plural form (issues/merge_requests) as per GitLab API documentation
);
// Add some debug logging
console.log(`DEBUG - createNote function called`);
console.log(`DEBUG - createNote - URL: ${url.toString()}`);
console.log(`DEBUG - createNote - projectId: ${projectId}, noteableType: ${noteableType}, noteableIid: ${noteableIid}`);
console.log(`DEBUG - createNote - GITLAB_API_URL: ${GITLAB_API_URL}`);