From 4e7517ad0cfb748cc61dc94647a983efd3dacbef Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Tue, 10 Jun 2025 22:11:38 +0200 Subject: [PATCH] docs: add comment explaining GitLab issue ID format and remove debug logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added comment explaining that issueId format 'project/repo#123' is intentional for uniqueness - Removed debug console.log statements now that the issue is understood and resolved - The URL construction correctly extracts numeric ID from the unique identifier format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../gitlab/gitlab-common-interfaces.service.ts | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/app/features/issue/providers/gitlab/gitlab-common-interfaces.service.ts b/src/app/features/issue/providers/gitlab/gitlab-common-interfaces.service.ts index 55a46d13c..b1ee664fd 100644 --- a/src/app/features/issue/providers/gitlab/gitlab-common-interfaces.service.ts +++ b/src/app/features/issue/providers/gitlab/gitlab-common-interfaces.service.ts @@ -44,26 +44,17 @@ export class GitlabCommonInterfacesService implements IssueServiceInterface { const project: string = cfg.project; // Extract just the numeric issue ID from formats like 'project/repo#123' or '#123' + // Note: issueId is intentionally stored as 'project/repo#123' to ensure uniqueness across different projects + // but for URL construction we only need the numeric part after the '#' const cleanIssueId = issueId.toString().replace(/^.*#/, ''); - console.log('GitLab issueLink debug:', { - originalIssueId: issueId, - cleanIssueId, - project, - gitlabBaseUrl: cfg.gitlabBaseUrl, - }); - if (cfg.gitlabBaseUrl) { const fixedUrl = cfg.gitlabBaseUrl.match(/.*\/$/) ? cfg.gitlabBaseUrl : `${cfg.gitlabBaseUrl}/`; - const url = `${fixedUrl}${project}/-/issues/${cleanIssueId}`; - console.log('GitLab issueLink result (custom base):', url); - return url; + return `${fixedUrl}${project}/-/issues/${cleanIssueId}`; } else { - const url = `${GITLAB_BASE_URL}${project}/-/issues/${cleanIssueId}`; - console.log('GitLab issueLink result (default base):', url); - return url; + return `${GITLAB_BASE_URL}${project}/-/issues/${cleanIssueId}`; } }), )