Skip to content

Commit e447d16

Browse files
Merge branch 'main' into code-json-1757624663352
2 parents 640028a + 9651da3 commit e447d16

7 files changed

Lines changed: 28 additions & 25 deletions

File tree

MAINTAINERS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ Total number of contributors: <!--CONTRIBUTOR COUNT START--> 2 <!--CONTRIBUTOR C
4949
<sub><b>Sachin Panayil</b></sub>
5050
</a>
5151
</td>
52+
<td align="center">
53+
<a href="https://github.com/natalialuzuriaga">
54+
<img src="https://avatars.githubusercontent.com/u/29980737?v=4" width="100;" alt="natalialuzuriaga"/>
55+
<br />
56+
<sub><b>Natalia Luzuriaga</b></sub>
57+
</a>
58+
</td>
5259
<td align="center">
5360
<a href="https://github.com/IsaacMilarky">
5461
<img src="https://avatars.githubusercontent.com/u/24639268?v=4" width="100;" alt="IsaacMilarky"/>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The automated code.json generator calculates specific fields by analyzing your r
8282
8383
**dateMetaDataLastUpdated**: The generator sets this to the current timestamp each time it runs, providing a record of when the metadata was last refreshed. No configuration needed.
8484
85-
**feedbackMechanisms**: A list of containing your repository's issues URL in the format of {repositoryURL}/issues. If you already have a code.json file with existing feedback mechanisms, the generator preserves those values. No configuration needed.
85+
**feedbackMechanism**: The repository's issues URL in the format of {repositoryURL}/issues. If you already have a code.json file with existing feedback mechanisms, the generator preserves those values. No configuration needed.
8686
8787
## Project Vision
8888

code.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"name": "CMS Open Source Team"
5353
},
5454
"feedbackMechanism": "https://github.com/DSACMS/automated-codejson-generator/issues",
55-
"AIUseCaseID": "0",
5655
"localisation": false,
5756
"repositoryType": "tools",
5857
"userInput": false,

dist/index.js

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/model.d.ts

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const baselineCodeJSON: CodeJSON = {
1313
URL: "",
1414
},
1515
],
16-
usageType: "",
16+
usageType: [],
1717
exemptionText: "",
1818
},
1919
organization: "",
@@ -32,7 +32,7 @@ const baselineCodeJSON: CodeJSON = {
3232
softwareType: "",
3333
languages: [],
3434
maintenance: "",
35-
contractNumber: "",
35+
contractNumber: [],
3636
date: {
3737
created: "",
3838
lastModified: "",
@@ -43,7 +43,8 @@ const baselineCodeJSON: CodeJSON = {
4343
email: "",
4444
name: "",
4545
},
46-
feedbackMechanisms: [],
46+
feedbackMechanism: "",
47+
AIUseCaseID: "0",
4748
localisation: false,
4849
repositoryType: "",
4950
userInput: false,
@@ -63,11 +64,7 @@ async function getMetaData(
6364
const partialCodeJSON = await helpers.calculateMetaData();
6465

6566
// preserve existing feedback mechanisms if they exist, otherwise default to GitHub Issues
66-
const existingMechanisms = existingCodeJSON?.feedbackMechanisms || [];
67-
const feedbackMechanisms =
68-
existingMechanisms.length > 0
69-
? existingMechanisms
70-
: [`${partialCodeJSON.repositoryURL}/issues`];
67+
const feedbackMechanism = existingCodeJSON?.feedbackMechanism || `${partialCodeJSON.repositoryURL}/issues`;
7168

7269
// only use the calculated description if its not empty, otherwise keep existing
7370
const shouldUpdateDescription =
@@ -101,7 +98,7 @@ async function getMetaData(
10198
metaDataLastUpdated:
10299
partialCodeJSON.date?.metaDataLastUpdated ?? new Date().toISOString(),
103100
},
104-
feedbackMechanisms,
101+
feedbackMechanism,
105102
};
106103
}
107104

src/model.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ export interface CodeJSON {
1717
softwareType: string;
1818
languages: string[]; // calculated
1919
maintenance: string;
20-
contractNumber: string;
20+
contractNumber: string[];
2121
date: Date; // calculated
2222
tags: string[]; // calculated
2323
contact: Contact;
24-
feedbackMechanisms: string[]; // semi-calculated
24+
feedbackMechanism: string; // calculated
25+
AIUseCaseID: string;
2526
localisation: boolean;
2627
repositoryType: string;
2728
userInput: boolean;
@@ -42,7 +43,7 @@ export interface ReuseFrequency {
4243

4344
export interface Permissions {
4445
license: License[];
45-
usageType: string;
46+
usageType: string[];
4647
exemptionText: string;
4748
}
4849

0 commit comments

Comments
 (0)