File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export class Result {
2525 this . errorsThrown = [ ]
2626 this . unknownLockFileType = false
2727 this . isValid = false
28+ this . service = null
2829
2930 // Non returned values
3031 this . latestCommitSHA = ''
@@ -52,7 +53,7 @@ export class Result {
5253 this . isIndirect = this . directDependencies . length === 0
5354 this . isValid = this . validate ( )
5455
55- return {
56+ const result = {
5657 repoOwner : this . repoOwner ,
5758 repoName : this . repoName ,
5859 builtByGovernment : this . builtByGovernment ,
@@ -66,5 +67,19 @@ export class Result {
6667 unknownLockFileType : this . unknownLockFileType ,
6768 isValid : this . isValid
6869 }
70+ if ( this . service ) {
71+ result . name = this . service . name
72+ result . description = this . service . description
73+ result . synonyms = this . service . synonyms
74+ result . organisation = this . service . organisation
75+ result . phase = this . service . phase
76+ result . theme = this . service . theme
77+ result [ 'start-page' ] = this . service . startPage
78+ result . liveservice = this . service . liveservice
79+ result . timeline = this . service . timeline
80+ result . tags = this . service . tags
81+ }
82+
83+ return result
6984 }
7085}
Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ export async function analyseRepo (repo) {
6464
6565 result . builtByGovernment = repoData . checkServiceOwner ( governmentServiceOwners )
6666
67+ if ( governmentServiceOwners [ repoOwner ] ?. [ repoName ] ) {
68+ result . service = governmentServiceOwners [ repoOwner ] [ repoName ]
69+ }
70+
6771 // Get the repo metadata
6872 const repoInfo = await repoData . getRepoInfo ( )
6973 Object . assign ( result , repoInfo )
You can’t perform that action at this time.
0 commit comments