diff --git a/build/index.js b/build/index.js index 817219f..42b619a 100755 --- a/build/index.js +++ b/build/index.js @@ -345,8 +345,11 @@ async function updateMergeRequest(projectId, mergeRequestIid, options) { async function createNote(projectId, noteableType, // 'issue' 또는 'merge_request' 타입 명시 noteableIid, body) { // ⚙️ 응답 타입은 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}`); diff --git a/index.ts b/index.ts index 37ffeb1..1f22471 100644 --- a/index.ts +++ b/index.ts @@ -582,12 +582,15 @@ async function createNote( body: string ): Promise { // ⚙️ 응답 타입은 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}`);