Skip to content

Commit 9d6b084

Browse files
added compliance workflows
Signed-off-by: Sachin Panayil <[email protected]>
1 parent 7ebdcf2 commit 9d6b084

File tree

4 files changed

+298
-58
lines changed

4 files changed

+298
-58
lines changed

.github/workflows/checks.yml

-58
This file was deleted.
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: "Repository Hygiene Check"
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
workflow_dispatch:
7+
8+
jobs:
9+
check-first-run:
10+
name: Check For First Run
11+
runs-on: ubuntu-latest
12+
outputs:
13+
should_run: ${{ steps.check.outputs.should_run }}
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- id: check
20+
run: |
21+
# If manually triggered, always run
22+
23+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
24+
echo "should_run=true" >> $GITHUB_OUTPUT
25+
exit 0
26+
27+
fi
28+
29+
# Check if initialization label exists
30+
31+
has_label=$(gh label list --json name | jq '.[] | select(.name=="repolinter-initialized")')
32+
33+
if [[ -z "$has_label" ]]; then
34+
# First time - create label and allow run
35+
gh label create repolinter-initialized --description "Marks repo as having run initial repolinter check"
36+
echo "should_run=true" >> $GITHUB_OUTPUT
37+
else
38+
echo "should_run=false" >> $GITHUB_OUTPUT
39+
40+
fi
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
44+
resolve-repolinter-json:
45+
name: Get Repolinter Config
46+
needs: check-first-run
47+
if: needs.check-first-run.outputs.should_run == 'true'
48+
uses: DSACMS/repo-scaffolder/.github/workflows/extendJSONFile.yml@main
49+
with:
50+
url_to_json: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier3/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
51+
52+
repolinter-checks:
53+
name: Tier 3 Checks
54+
needs: [check-first-run, resolve-repolinter-json]
55+
if: needs.check-first-run.outputs.should_run == 'true'
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: write
59+
pull-requests: write
60+
env:
61+
RAW_JSON: ${{ needs.resolve-repolinter-json.outputs.raw-json }}
62+
steps:
63+
- uses: actions/checkout@v4
64+
- run: echo $RAW_JSON > repolinter.json
65+
- uses: DSACMS/repolinter-action@main
66+
with:
67+
config_file: 'repolinter.json'
68+
output_type: 'pull-request'
69+
pull_request_labels: 'repolinter-initialized, cms-oss, cms-gov'
70+
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}

.github/workflows/updateCodeJSON.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update Code.json
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
update-code-json:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
23+
- name: Setup Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: '1.22'
27+
28+
- name: Install SCC
29+
run: go install github.com/boyter/scc/v3@latest
30+
31+
- name: Update code.json
32+
uses: DSACMS/automated-codejson-generator@main
33+
with:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

index.json

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
{
2+
"agency": "CMS",
3+
"version": "1.0.0",
4+
"measurementType": {
5+
"method": "projects"
6+
},
7+
"releases": [
8+
{
9+
"organization": "Centers for Medicare & Medicaid Services",
10+
"name": "codejson-index-generator",
11+
"description": {
12+
"en": {
13+
"shortDescription": "Script to create an indexed code.json for agencies.",
14+
"longDescription": "The GitHub Code.json Index Generator is a Python-based tool that helps federal agencies compile and maintain their code.json files for code.gov compliance. It automatically scans specified GitHub organizations, finds repositories containing code.json files, and combines them into a single indexed file."
15+
}
16+
},
17+
"status": "production",
18+
"permissions": {
19+
"licenses": [
20+
{
21+
"URL": "LICENSE",
22+
"name": "CC0-1.0"
23+
}
24+
],
25+
"usageType": "openSource"
26+
},
27+
"repositoryURL": "https://github.com/DSACMS/codejson-index-generator",
28+
"vcs": "git",
29+
"laborHours": 1181.19,
30+
"platforms": [
31+
"mac"
32+
],
33+
"categories": [
34+
"compliance-management",
35+
"data-collection"
36+
],
37+
"softwareType": "standalone/desktop",
38+
"languages": [
39+
"python"
40+
],
41+
"maintenance": "internal",
42+
"date": {
43+
"created": "2025-01-07T16:26:42-05:00",
44+
"lastModified": "2025-01-08T22:28:21+0000",
45+
"metadataLastUpdated": "2025-01-08T22:28:21+0000"
46+
},
47+
"tags": [
48+
"codejson",
49+
"index",
50+
"generator",
51+
"tools"
52+
],
53+
"contact": {
54+
"email": "[email protected]",
55+
"name": "CMS Open Source Program Office"
56+
},
57+
"localisation": "false",
58+
"repoType": "Tools",
59+
"userInput": "Yes",
60+
"fismaLevel": "Low",
61+
"group": "DSAC",
62+
"subsetInHealthcare": "Operational",
63+
"userType": "Government",
64+
"repositoryHost": "Github.com",
65+
"maturityModelTier": "1"
66+
},
67+
{
68+
"organization": "Centers for Medicare & Medicaid Services",
69+
"name": "repodive-tools",
70+
"description": {
71+
"en": {
72+
"shortDescription": "Scripts and tools to gather information about git repositories.",
73+
"longDescription": "This repository is a collection of scripts and tools for a given repodiving effort. Repodiving in this context means going through a git repository and gathering relevant information for a specific purpose."
74+
}
75+
},
76+
"status": "production",
77+
"permissions": {
78+
"licenses": [
79+
{
80+
"URL": "LICENSE",
81+
"name": "CC0-1.0"
82+
}
83+
]
84+
},
85+
"repositoryURL": "https://github.com/DSACMS/repodive-tools",
86+
"vcs": "git",
87+
"laborHours": null,
88+
"platforms": [
89+
"mac"
90+
],
91+
"categories": [
92+
"data-collection,data-analytics"
93+
],
94+
"softwareType": "standalone/backend",
95+
"languages": [
96+
"bash,python"
97+
],
98+
"maintenance": "internal",
99+
"date": {
100+
"created": "2024-07-30T11:54:17-05:00",
101+
"lastModified": "2024-10-22T22:00:58+0000",
102+
"metadataLastUpdated": "2024-10-22T22:00:58+0000"
103+
},
104+
"tags": [
105+
"git,repository,scripts,repodiving"
106+
],
107+
"contact": {
108+
"email": "[email protected]",
109+
"name": "CMS Open Source Program Office"
110+
},
111+
"localisation": "false",
112+
"repoType": "Tools",
113+
"userInput": "Yes",
114+
"fismaLevel": "Low",
115+
"group": "DSAC",
116+
"subsetInHealthcare": "Operational",
117+
"userType": "Government",
118+
"repositoryHost": "Github.com",
119+
"maturityModelTier": "1"
120+
},
121+
{
122+
"organization": "DSACMS",
123+
"name": "dedupliFHIR",
124+
"projectType": "Tools",
125+
"userInput": "Yes",
126+
"fismaLevel": "Moderate",
127+
"group": "CMS/OA/DSAC",
128+
"subsetInHealthcare": "Operational",
129+
"userType": "Providers",
130+
"repositoryHost": "Github.com",
131+
"maturityModelTier": "3"
132+
},
133+
{
134+
"organization": "DSACMS",
135+
"name": "metrics",
136+
"projectType": "Website",
137+
"userInput": "No",
138+
"fismaLevel": "Low",
139+
"group": "CMS/OA/DSAC",
140+
"subsetInHealthcare": "Operational",
141+
"userType": "Government",
142+
"repositoryHost": "Github.com",
143+
"maturityModelTier": "3"
144+
},
145+
{
146+
"organization": "DSACMS",
147+
"name": "mural-ollama",
148+
"project_type": "Apps",
149+
"user_input": "Yes",
150+
"project_fisma_level": "Moderate",
151+
"group": "CMS/OA/DSAC",
152+
"subset_in_healthcare": "Operational",
153+
"user_type": "Government",
154+
"repository_host": "Github.com",
155+
"maturity_model_tier": "1"
156+
},
157+
{
158+
"organization": "DSACMS",
159+
"name": "open",
160+
"projectType": "Website",
161+
"userInput": "No",
162+
"fismaLevel": "Low",
163+
"group": "CMS/OA/DSAC",
164+
"subsetInHealthcare": "Operational",
165+
"userType": "Government",
166+
"repositoryHost": "Github.com",
167+
"maturityModelTier": "2"
168+
},
169+
{
170+
"organization": "DSACMS",
171+
"name": "repo-scaffolder",
172+
"projectType": "Tools",
173+
"userInput": "No",
174+
"fismaLevel": "Low",
175+
"group": "CMS/OA/DSAC",
176+
"subsetInHealthcare": "Operational",
177+
"userType": "Government",
178+
"repositoryHost": "Github.com",
179+
"maturityModelTier": "3"
180+
},
181+
{
182+
"organization": "DSACMS",
183+
"name": "reverse-scorecard-generation",
184+
"project_type": "Tools",
185+
"user_input": "Yes",
186+
"project_fisma_level": "Moderate",
187+
"group": "CMS/OA/DSAC",
188+
"subset_in_healthcare": "Operational",
189+
"user_type": "Government",
190+
"repository_host": "Github.com",
191+
"maturity_model_tier": "1"
192+
}
193+
]
194+
}

0 commit comments

Comments
 (0)