Skip to content
Snippets Groups Projects
Commit 0c714492 authored by michael.minelli's avatar michael.minelli
Browse files

Merge tag 'v4.2'

parents 55a94e77 6e46ceea
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ import ClientsSharedConfig from '../../config/ClientsSharedConfig.js'; ...@@ -3,7 +3,7 @@ import ClientsSharedConfig from '../../config/ClientsSharedConfig.js';
class DojoBackendHelper { class DojoBackendHelper {
public getApiUrl(route: ApiRoute, options?: Partial<{ assignmentNameOrUrl: string, exerciseIdOrUrl: string, gitlabProjectId: string }>): string { public getApiUrl(route: ApiRoute, options?: Partial<{ assignmentNameOrUrl: string, exerciseIdOrUrl: string, gitlabProjectId: string, tagName: string }>): string {
let url = `${ ClientsSharedConfig.apiURL }${ route }`; let url = `${ ClientsSharedConfig.apiURL }${ route }`;
if ( options ) { if ( options ) {
...@@ -18,6 +18,10 @@ class DojoBackendHelper { ...@@ -18,6 +18,10 @@ class DojoBackendHelper {
if ( options.gitlabProjectId ) { if ( options.gitlabProjectId ) {
url = url.replace('{{gitlabProjectId}}', encodeURIComponent(options.gitlabProjectId)); url = url.replace('{{gitlabProjectId}}', encodeURIComponent(options.gitlabProjectId));
} }
if ( options.tagName ) {
url = url.replace('{{tagName}}', encodeURIComponent(options.tagName));
}
} }
return url; return url;
......
import { CommitSchema } from '@gitbeaker/rest';
import ExerciseResultsFile from '../../shared/types/Dojo/ExerciseResultsFile';
import { IFileDirStat } from '../../shared/helpers/recursiveFilesStats/RecursiveFilesStats';
export interface Result {
exerciseId: string;
dateTime: string;
commit: CommitSchema;
exitCode: number;
files: Array<IFileDirStat>;
results: ExerciseResultsFile;
success: boolean;
}
export default Result;
\ No newline at end of file
import { CommitSchema } from '@gitbeaker/rest';
import Assignment from './Assignment';
import Exercise from './Exercise';
interface Tags {
name: string;
type: 'Language' | 'Framework' | 'Theme' | 'UserDefined';
exercise: Exercise | undefined;
assignment: Assignment | undefined;
correctionCommit: CommitSchema | undefined;
}
export default Tags;
\ No newline at end of file
interface TagProposal {
name: string;
type: 'Language' | 'Framework' | 'Theme' | 'UserDefined';
state: 'PendingApproval' | 'Declined' | 'Approved';
details: string;
}
export default TagProposal;
...@@ -10,8 +10,16 @@ enum ApiRoute { ...@@ -10,8 +10,16 @@ enum ApiRoute {
ASSIGNMENT_CORRECTION_LINK = '/assignments/{{assignmentNameOrUrl}}/corrections', ASSIGNMENT_CORRECTION_LINK = '/assignments/{{assignmentNameOrUrl}}/corrections',
ASSIGNMENT_CORRECTION_UPDATE_DELETE = '/assignments/{{assignmentNameOrUrl}}/corrections/{{exerciseIdOrUrl}}', ASSIGNMENT_CORRECTION_UPDATE_DELETE = '/assignments/{{assignmentNameOrUrl}}/corrections/{{exerciseIdOrUrl}}',
EXERCISE_CREATE = '/assignments/{{assignmentNameOrUrl}}/exercises', EXERCISE_CREATE = '/assignments/{{assignmentNameOrUrl}}/exercises',
EXERCISE_ASSIGNMENT = '/exercises/{{exerciseIdOrUrl}}/assignment', EXERCISE_RESULTS = '/exercises/{{exerciseIdOrUrl}}/results',
EXERCISE_RESULTS = '/exercises/{{exerciseIdOrUrl}}/results' EXERCISE_LIST = '/exercises',
EXERCISE_GET_DELETE = '/exercises/{{exerciseIdOrUrl}}',
EXERCISE_DETAILS_GET = '/exercises/{{exerciseIdOrUrl}}/details',
EXERCISE_MEMBERS_GET = '/exercises/{{exerciseIdOrUrl}}/members',
USER_LIST = '/users',
TAG_CREATE = '/tags',
TAG_DELETE = '/tags/{{tagName}}',
TAG_PROPOSAL_GET_CREATE = '/tags/proposals',
TAG_PROPOSAL_UPDATE = '/tags/proposals/{{tagName}}',
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment