diff --git a/js/autoGenerateFields.js b/js/autoGenerateFields.js index 8fda2af..a59f1b7 100644 --- a/js/autoGenerateFields.js +++ b/js/autoGenerateFields.js @@ -180,7 +180,13 @@ function preFillFields(repoData, languages) { // Updating URL if (repoData.html_url) { - form.getComponent('repositoryURL').setValue(repoData.html_url) + if (repoData.private) { + // Private repositories must have "private" as their repositoryURL value + form.getComponent('repositoryURL').setValue("private") + } + else { + form.getComponent('repositoryURL').setValue(repoData.html_url) + } } // Updating forks @@ -277,11 +283,11 @@ function preFillFields(repoData, languages) { } // fields to potentially automate - // clones, but this is only tracked for every 14 days - // status, by checking if its public, we can assume its production and check if its archival - // laborHours, by running a script? this might be harder since we need SCC - // maturityModel, we could check to see if certain files / sections live within a repo and make a guess like that - // usageType, by assuming that if its public = openSource and if private = governmnetWideReuse + // clones, but this is only tracked for every 14 days + // status, by checking if its public, we can assume its production and check if its archival + // laborHours, by running a script? this might be harder since we need SCC + // maturityModel, we could check to see if certain files / sections live within a repo and make a guess like that + // usageType, by assuming that if its public = openSource and if private = governmnetWideReuse notificationSystem.success("Repository data loaded successfully!") diff --git a/schemas/schema.json b/schemas/schema.json index ee744ee..4f4722c 100644 --- a/schemas/schema.json +++ b/schemas/schema.json @@ -114,7 +114,7 @@ "repositoryURL": { "type": "string", "format": "uri", - "description": "The URL of the public release repository for open source repositories. This field is not required for repositories that are only available as government-wide reuse or are closed (pursuant to one of the exemptions)." + "description": "The URL of the public release repository for open source repositories. This field is not required for repositories that are only available as government-wide reuse or are closed (pursuant to one of the exemptions). It can be listed as 'private' for repositories that are closed." }, "projectURL": { "type": "string", @@ -402,4 +402,4 @@ "maturityModelTier" ], "additionalProperties": false -} +} \ No newline at end of file