Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions api-editor/gui/src/features/externalLinks/urlBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { jsonCode } from '../../common/util/stringOperations';
import { Annotation } from '../annotations/versioning/AnnotationStoreV2';

const baseURL = 'https://github.com/lars-reimann/api-editor';
const apiEditorBaseURL = 'https://github.com/Safe-DS/API-Editor';
const libraryAnalyzerBaseURL = 'https://github.com/Safe-DS/Library-Analyzer';

// Documentation

Expand All @@ -11,20 +12,21 @@ export const userGuideURL = `${documentationBaseURL}/gui`;

// Issues

const issueBaseURL = `${baseURL}/issues/new`;
const apiEditorIssueBaseURL = `${apiEditorBaseURL}/issues/new`;
const libraryAnalyzerIssueBaseURL = `${libraryAnalyzerBaseURL}/issues/new`;

export const bugReportURL = `${issueBaseURL}?assignees=&labels=bug&template=bug_report.yml`;
export const featureRequestURL = `${issueBaseURL}?assignees=&labels=enhancement&template=feature_request.yml`;
export const bugReportURL = `${apiEditorIssueBaseURL}?assignees=&labels=bug&template=bug_report.yml`;
export const featureRequestURL = `${apiEditorIssueBaseURL}?assignees=&labels=enhancement&template=feature_request.yml`;

const baseMissingAnnotationURL = `${issueBaseURL}?assignees=&labels=bug%2Cmissing+annotation&template=missing_annotation.yml`;
const baseMissingAnnotationURL = `${libraryAnalyzerIssueBaseURL}?assignees=&labels=bug%2Cmissing+annotation&template=missing_annotation.yml`;

export const missingAnnotationURL = function (target: string): string {
const urlHash = encodeURIComponent(`\`#/${target}\``);

return baseMissingAnnotationURL + `&url-hash=${urlHash}`;
};

const baseWrongAnnotationURL = `${issueBaseURL}?assignees=&template=wrong_annotation.yml&labels=bug%2Cwrong+annotation%2C`;
const baseWrongAnnotationURL = `${libraryAnalyzerIssueBaseURL}?assignees=&template=wrong_annotation.yml&labels=bug%2Cwrong+annotation%2C`;

export const wrongAnnotationURL = function (annotationType: string, annotation: Annotation): string {
const minimalAnnotation = {
Expand Down