Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeSharedCode
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
NodeSharedCode
Compare revisions
92e13a3dc0ca751737d782430f5e902f1ec20c14 to 04b3a985a963b87aed586e6b06718dd3052ad32e
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dojo_project/projects/shared/nodesharedcode
Select target project
No results found
04b3a985a963b87aed586e6b06718dd3052ad32e
Select Git revision
Swap
Target
dojo_project/projects/shared/nodesharedcode
Select target project
dojo_project/projects/shared/nodesharedcode
1 result
92e13a3dc0ca751737d782430f5e902f1ec20c14
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Sonar => Reduce code duplication
· 04b3a985
michael.minelli
authored
1 year ago
04b3a985
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
helpers/Dojo/SharedAssignmentHelper.ts
+1
-1
1 addition, 1 deletion
helpers/Dojo/SharedAssignmentHelper.ts
helpers/Dojo/SharedExerciseHelper.ts
+0
-4
0 additions, 4 deletions
helpers/Dojo/SharedExerciseHelper.ts
managers/SharedGitlabManager.ts
+2
-2
2 additions, 2 deletions
managers/SharedGitlabManager.ts
with
3 additions
and
7 deletions
helpers/Dojo/SharedAssignmentHelper.ts
View file @
04b3a985
...
...
@@ -20,7 +20,7 @@ class SharedAssignmentHelper {
}
async
isPublishable
(
repositoryId
:
number
):
Promise
<
{
isPublishable
:
boolean
,
lastPipeline
:
Gitlab
.
PipelineSchema
|
null
,
status
?:
{
code
:
DojoStatusCode
,
message
:
string
}
}
>
{
const
pipelines
=
await
GlobalHelper
.
sharedG
itlabManager
.
getRepositoryPipelines
(
repositoryId
,
'
main
'
);
const
pipelines
=
await
GlobalHelper
.
g
itlabManager
.
getRepositoryPipelines
(
repositoryId
,
'
main
'
);
if
(
pipelines
.
length
>
0
)
{
const
lastPipeline
=
pipelines
[
0
];
if
(
lastPipeline
.
status
!==
GitlabPipelineStatus
.
SUCCESS
.
valueOf
()
)
{
...
...
This diff is collapsed.
Click to expand it.
helpers/Dojo/SharedExerciseHelper.ts
deleted
100644 → 0
View file @
92e13a3d
class
SharedExerciseHelper
{}
export
default
new
SharedExerciseHelper
();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
managers/SharedGitlabManager.ts
View file @
04b3a985
...
...
@@ -8,7 +8,7 @@ import { StatusCodes } from 'http-status-c
class
SharedGitlabManager
{
pr
ivate
api
!
:
GitlabCore
.
Gitlab
<
false
>
;
pr
otected
api
!
:
GitlabCore
.
Gitlab
<
false
>
;
private
readonly
refreshTokenFunction
?:
()
=>
Promise
<
string
>
;
setToken
(
token
:
string
)
{
...
...
@@ -23,7 +23,7 @@ class SharedGitlabManager {
this
.
setToken
(
token
);
}
pr
ivate
async
executeGitlabRequest
<
T
>
(
request
:
()
=>
Promise
<
T
>
,
refreshTokenIfNeeded
:
boolean
=
true
):
Promise
<
T
>
{
pr
otected
async
executeGitlabRequest
<
T
>
(
request
:
()
=>
Promise
<
T
>
,
refreshTokenIfNeeded
:
boolean
=
true
):
Promise
<
T
>
{
try
{
return
await
request
();
}
catch
(
error
)
{
...
...
This diff is collapsed.
Click to expand it.