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
Commits
3a614190
Commit
3a614190
authored
2 years ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
LocalConfig => Add gitlab personal token
parent
0fa04d19
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
NodeApp/src/Config/LocalConfig/LocalConfig.ts
+2
-0
2 additions, 0 deletions
NodeApp/src/Config/LocalConfig/LocalConfig.ts
NodeApp/src/Config/LocalConfig/LocalConfigKeys.ts
+2
-1
2 additions, 1 deletion
NodeApp/src/Config/LocalConfig/LocalConfigKeys.ts
with
4 additions
and
1 deletion
NodeApp/src/Config/LocalConfig/LocalConfig.ts
+
2
−
0
View file @
3a614190
...
@@ -3,6 +3,7 @@ import logger from '../../shared/logging/WinstonLogger';
...
@@ -3,6 +3,7 @@ import logger from '../../shared/logging/WinstonLogger';
import
SessionManager
from
'
../../managers/SessionManager
'
;
import
SessionManager
from
'
../../managers/SessionManager
'
;
import
Config
from
'
../Config
'
;
import
Config
from
'
../Config
'
;
import
LocalConfigKeys
from
'
./LocalConfigKeys
'
;
import
LocalConfigKeys
from
'
./LocalConfigKeys
'
;
import
GitlabManager
from
'
../../managers/GitlabManager
'
;
class
LocalConfig
{
class
LocalConfig
{
...
@@ -34,6 +35,7 @@ class LocalConfig {
...
@@ -34,6 +35,7 @@ class LocalConfig {
this
.
_config
=
JSON
.
parse
(
fs
.
readFileSync
(
this
.
configPath
).
toString
());
this
.
_config
=
JSON
.
parse
(
fs
.
readFileSync
(
this
.
configPath
).
toString
());
SessionManager
.
token
=
this
.
_config
.
apiToken
;
SessionManager
.
token
=
this
.
_config
.
apiToken
;
GitlabManager
.
token
=
this
.
_config
.
gitlabPersonalToken
;
}
}
updateConfig
(
key
:
LocalConfigKeys
,
value
:
any
)
{
updateConfig
(
key
:
LocalConfigKeys
,
value
:
any
)
{
...
...
This diff is collapsed.
Click to expand it.
NodeApp/src/Config/LocalConfig/LocalConfigKeys.ts
+
2
−
1
View file @
3a614190
enum
LocalConfigKeys
{
enum
LocalConfigKeys
{
API_TOKEN
=
'
apiToken
'
API_TOKEN
=
'
apiToken
'
,
GITLAB_PERSONAL_TOKEN
=
'
gitlabPersonalToken
'
,
}
}
...
...
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