Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoCLI
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoCLI
Merge requests
!13
Tag
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Tag
tag
into
main
Overview
0
Commits
8
Pipelines
4
Changes
7
Closed
vincent.steinman
requested to merge
tag
into
main
1 year ago
Overview
0
Commits
8
Pipelines
4
Changes
7
Tags pour le Dojo
0
0
Merge request reports
Viewing commit
0dc9fcae
Prev
Next
Show latest version
7 files
+
201
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
0dc9fcae
remove tag from gitignore
· 0dc9fcae
vincent.steinman
authored
1 year ago
NodeApp/src/commander/tags/subcommands/TagAdd.ts
0 → 100644
+
33
−
0
View file @ 0dc9fcae
import
CommanderCommand
from
'
../../CommanderCommand
'
;
import
SessionManager
from
'
../../../managers/SessionManager
'
;
import
DojoBackendManager
from
"
../../../managers/DojoBackendManager
"
;
import
Tags
from
'
../../../sharedByClients/models/Tag
'
;
class
TagAddCommand
extends
CommanderCommand
{
protected
commandName
:
string
=
'
add
'
;
protected
defineCommand
()
{
this
.
command
.
description
(
'
Add a tag
'
)
.
argument
(
'
<tagName>
'
,
'
name of the tag
'
)
//test
.
argument
(
'
<tagType>
'
,
'
type of the tag
'
)
.
action
(
this
.
commandAction
.
bind
(
this
));
}
protected
async
commandAction
(
name
:
string
,
type
:
string
):
Promise
<
void
>
{
let
tag
:
Tags
|
undefined
;
{
if
(
!
await
SessionManager
.
testSession
(
true
,
null
)
)
{
return
;
}
tag
=
await
DojoBackendManager
.
addTag
(
name
,
type
);
if
(
!
tag
)
{
return
;
}
}
}
}
export
default
new
TagAddCommand
();
\ No newline at end of file
Loading