Skip to content

Schema: Updated repositoryURL field and value if private #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions js/autoGenerateFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!")

Expand Down
4 changes: 2 additions & 2 deletions schemas/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -402,4 +402,4 @@
"maturityModelTier"
],
"additionalProperties": false
}
}
Loading