mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
docs: add comment explaining GitLab issue ID format and remove debug logs
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
0e557afec7
commit
4e7517ad0c
1 changed files with 4 additions and 13 deletions
|
|
@ -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}`;
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue