Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeClientSharedCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Shared
NodeClientSharedCode
Commits
8c87edbb
Commit
8c87edbb
authored
10 months ago
by
michael.minelli
Browse files
Options
Downloads
Plain Diff
Merge branch 'tags_integration' into v4.2
parents
55a94e77
026cd6d1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
helpers/Dojo/DojoBackendHelper.ts
+5
-1
5 additions, 1 deletion
helpers/Dojo/DojoBackendHelper.ts
models/Tag.ts
+17
-0
17 additions, 0 deletions
models/Tag.ts
models/TagProposal.ts
+9
-0
9 additions, 0 deletions
models/TagProposal.ts
types/Dojo/ApiRoute.ts
+5
-1
5 additions, 1 deletion
types/Dojo/ApiRoute.ts
with
36 additions
and
2 deletions
helpers/Dojo/DojoBackendHelper.ts
+
5
−
1
View file @
8c87edbb
...
...
@@ -3,7 +3,7 @@ import ClientsSharedConfig from '../../config/ClientsSharedConfig.js';
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
}
`
;
if
(
options
)
{
...
...
@@ -18,6 +18,10 @@ class DojoBackendHelper {
if
(
options
.
gitlabProjectId
)
{
url
=
url
.
replace
(
'
{{gitlabProjectId}}
'
,
encodeURIComponent
(
options
.
gitlabProjectId
));
}
if
(
options
.
tagName
)
{
url
=
url
.
replace
(
'
{{tagName}}
'
,
encodeURIComponent
(
options
.
tagName
));
}
}
return
url
;
...
...
This diff is collapsed.
Click to expand it.
models/Tag.ts
0 → 100644
+
17
−
0
View file @
8c87edbb
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
This diff is collapsed.
Click to expand it.
models/TagProposal.ts
0 → 100644
+
9
−
0
View file @
8c87edbb
interface
TagProposal
{
name
:
string
;
type
:
'
Language
'
|
'
Framework
'
|
'
Theme
'
|
'
UserDefined
'
;
state
:
'
PendingApproval
'
|
'
Declined
'
|
'
Approved
'
;
details
:
string
;
}
export
default
TagProposal
;
This diff is collapsed.
Click to expand it.
types/Dojo/ApiRoute.ts
+
5
−
1
View file @
8c87edbb
...
...
@@ -11,7 +11,11 @@ enum ApiRoute {
ASSIGNMENT_CORRECTION_UPDATE_DELETE
=
'
/assignments/{{assignmentNameOrUrl}}/corrections/{{exerciseIdOrUrl}}
'
,
EXERCISE_CREATE
=
'
/assignments/{{assignmentNameOrUrl}}/exercises
'
,
EXERCISE_ASSIGNMENT
=
'
/exercises/{{exerciseIdOrUrl}}/assignment
'
,
EXERCISE_RESULTS
=
'
/exercises/{{exerciseIdOrUrl}}/results
'
EXERCISE_RESULTS
=
'
/exercises/{{exerciseIdOrUrl}}/results
'
,
TAG_CREATE
=
'
/tags
'
,
TAG_DELETE
=
'
/tags/{{tagName}}
'
,
TAG_PROPOSAL_GET_CREATE
=
'
/tags/proposals
'
,
TAG_PROPOSAL_UPDATE
=
'
/tags/proposals/{{tagName}}
'
,
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment