Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5bc2a9e
chore: QPPA-10418 code metrics action
May 28, 2025
01ea44e
Merge pull request #1522 from CMSgov/QPPA-10418-code-metrics
nicholas-gates May 28, 2025
e109119
chore: QPPA-10418 code metrics action p.2
May 28, 2025
3e5dbf5
chore: QPPA-10418 code metrics action p.3
May 28, 2025
9ecbfd4
chore: QPPA-10418 code metrics action p.4
May 28, 2025
9657166
chore: QPPA-10418 code metrics action p.4
May 28, 2025
0420ce5
chore: QPPA-10418 code metrics action p.6
May 28, 2025
99c228f
chore: QPPA-10418 code metrics action p.7
May 28, 2025
4925464
chore: QPPA-10418 code metrics action p.8
May 29, 2025
ba2e244
chore: QPPA-10418 code metrics action p.9
May 29, 2025
26834ba
chore: QPPA-10418 code metrics action p.10
May 29, 2025
99a3412
chore: QPPA-10418 code metrics action p.11
May 29, 2025
e946d2e
chore: QPPA-10418 code metrics action p.12
May 29, 2025
f505fb6
chore: QPPA-10418 code metrics action p.13
May 29, 2025
6eb343d
chore: QPPA-10418 code metrics action p.14
May 29, 2025
f0aee3d
chore: QPPA-10418 code metrics action p.15
nicholas-gates May 29, 2025
2ec7082
chore: QPPA-10418 code metrics action p.16
nicholas-gates May 29, 2025
f528b7d
chore: QPPA-10418 code metrics action p.17
nicholas-gates May 29, 2025
1ec70a0
QPPA-10370: add sonarqube yml file
Jun 2, 2025
01881a5
Merge pull request #1523 from CMSgov/QPPA-10370
nicholas-gates Jun 3, 2025
45c5e5f
QPPA-10370: fix docker comd
Jun 3, 2025
2aa9458
QPPA-10370: fix sonarbuild issue
Jun 3, 2025
36fd330
QPPA-10370: fix comments
Jun 3, 2025
5e59fe3
Merge pull request #1525 from CMSgov/QPPA-10370-test
nicholas-gates Jun 3, 2025
0111359
chore: QPPA-10498 bump version number and updates measures data
john-manack Jun 6, 2025
8cadf11
Merge pull request #1526 from CMSgov/QPPA-10498-release-v2024.2.13
john-manack Jun 6, 2025
0ed41b1
Merge branch 'master' of github.com:CMSgov/qpp-conversion-tool into r…
john-manack Jun 9, 2025
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
160 changes: 160 additions & 0 deletions .github/workflows/code-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
name: Code Metrics

on:
# manual trigger
workflow_dispatch:
# scheduled trigger: every 2 weeks on Wednesday at 23:59
schedule:
- cron: '59 23 * * 3/2'

jobs:
count-lines-and-coverage:
runs-on: ubuntu-latest

steps:
- name: Set Trigger Environment Variable
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "MANUALLY_TRIGGERED=true" >> $GITHUB_ENV
else
echo "MANUALLY_TRIGGERED=false" >> $GITHUB_ENV
fi

# notify: Nicholas and Nileena using their Slack IDs
- name: Set Slack users to notify if this is a scheduled run
if: env.MANUALLY_TRIGGERED == 'false'
run: |
echo "SLACK_USERS=<@U017GV0LRAR> <@UKQ250V26>" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v4

- name: Count lines of code
id: linecount
run: |
# Install cloc if not already installed
sudo apt-get update && sudo apt-get install -y cloc

# Run cloc at the HEAD of the repository and capture JSON output
echo "Running cloc at HEAD..."
cloc --exclude-dir=node_modules,.git --json . > cloc_output.json

# Install jq if not already installed
sudo apt-get install -y jq

# Get total lines of code
TOTAL_LINES=$(jq -r '.SUM.code' cloc_output.json)
echo "TOTAL_LINES=$TOTAL_LINES" >> $GITHUB_ENV

# Transform the JSON to the subset format for Slack
cat <<EOF > transform.jq
{
"header": {
"number of files": .SUM.nFiles,
"number of lines": (.SUM.blank + .SUM.comment + .SUM.code)
},
"XML": {
"number of Files": .XML.nFiles,
"code": .XML.code
},
"JSON": {
"number of Files": .JSON.nFiles,
"code": .JSON.code
},
"Java": {
"number of Files": .Java.nFiles,
"code": .Java.code
},
"Maven": {
"number of Files": .Maven.nFiles,
"code": .Maven.code
},
"YAML": {
"number of Files": .YAML.nFiles,
"code": .YAML.code
},
"Markdown": {
"number of Files": .Markdown.nFiles,
"code": .Markdown.code
},
"Cucumber": {
"number of Files": .Cucumber.nFiles,
"code": .Cucumber.code
},
"Bourne Shell": {
"number of Files": ."Bourne Shell".nFiles,
"code": ."Bourne Shell".code
},
"Python": {
"number of Files": .Python.nFiles,
"code": .Python.code
},
"TOML": {
"number of Files": .TOML.nFiles,
"code": .TOML.code
},
"Dockerfile": {
"number of Files": .Dockerfile.nFiles,
"code": .Dockerfile.code
},
"Text": {
"number of Files": .Text.nFiles,
"code": .Text.code
},
"Properties": {
"number of Files": .Properties.nFiles,
"code": .Properties.code
},
"SUM": {
"blank": .SUM.blank,
"number of Files": .SUM.nFiles
}
}
EOF

# Apply the transformation
jq -f transform.jq cloc_output.json > cloc_subset.json

# Create a more readable format for the Slack message
echo "CLOC_JSON<<EOF" >> $GITHUB_ENV
cat cloc_subset.json >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

echo "Total lines of code: $TOTAL_LINES"

# Display full cloc summary for debugging and information
echo "Full cloc JSON summary:"
cat cloc_output.json

echo "Subset cloc JSON summary:"
cat cloc_subset.json

- name: Format cloc data for Slack
run: |
# Get the values we need
FILES=$(jq -r '.header."number of files"' cloc_subset.json)
LINES=$(jq -r '.header."number of lines"' cloc_subset.json)

# Create the breakdown text
BREAKDOWN=$(jq -r 'to_entries | sort_by(-(.value.code // 0)) |
map(select(.key != "header" and .key != "SUM")) |
map("• \(.key): \(.value.code // 0) lines in \(.value."number of Files" // 0) files") |
join("\\n")' cloc_subset.json)

# Create the complete message
echo "CODE_METRICS_SUMMARY=*Code Metrics Summary*\\nTotal files: $FILES\\nTotal lines: $LINES\\n\\n*Language breakdown:*\\n$BREAKDOWN" >> $GITHUB_ENV

- name: Slack notification
if: always()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_QPPSF_ALERTS_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"text": "*Conversion Tool Code Metrics*\n\n${{ env.CODE_METRICS_SUMMARY }}\n\nTotal lines of code: ${{ env.TOTAL_LINES }}\n${{ env.SLACK_USERS }}"
}
# Continue even if Slack notification fails
continue-on-error: true

46 changes: 46 additions & 0 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: SonarQube Analysis (Java)

on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- develop

env:
PROJECT_NAME: qppa-repos-sonarqube-analysis

jobs:
build:
name: Java Quality Gate
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
# 1) Check out the repository
- uses: actions/checkout@v2

# 2) Print the PR’s head‐branch
- name: Print branch name
run: |
echo "Current branch: ${GITHUB_HEAD_REF}"


# 3) Configure AWS credentials
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::730335206644:role/delegatedadmin/developer/qppa-github-actions-role
aws-region: us-east-1

# 4) Kick off the CodeBuild project, passing the repo name into GITHUB_REPO_NAME
- name: Trigger CodeBuild SonarQube Scan
run: |
aws codebuild start-build \
--project-name "${PROJECT_NAME}" \
--source-type-override "GITHUB" \
--source-location-override "${{ github.event.repository.html_url }}" \
--source-version "${GITHUB_HEAD_REF}" \
--environment-variables-override name=GITHUB_REPO_NAME,value="${{ github.event.repository.name }}",type=PLAINTEXT
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ directory.

```shell
# Build the Docker image and run the container using docker-compose.
docker-compose -f ./docker-compose.test.yaml up --build
docker compose -f ./docker-compose.test.yaml up --build
```

#### Invoking the Endpoint
Expand Down
2 changes: 1 addition & 1 deletion acceptance-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>acceptance-tests</artifactId>
<groupId>gov.cms.qpp.conversion</groupId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<name>conversion-tests</name>
<packaging>jar</packaging>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion commandline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>qpp-conversion-tool-parent</artifactId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>qpp-conversion-tool-parent</artifactId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
14 changes: 7 additions & 7 deletions commons/src/main/resources/measures-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3585,7 +3585,7 @@
"reportingCategory": "required",
"substitutes": [],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"measureSets": [],
"exclusion": [
Expand Down Expand Up @@ -3648,7 +3648,7 @@
"PI_PHCDRR_3_EX_3"
],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"measureSets": [],
"exclusion": null,
Expand Down Expand Up @@ -3704,7 +3704,7 @@
"PI_PHCDRR_3_EX_3"
],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"measureSets": [],
"exclusion": null,
Expand Down Expand Up @@ -3760,7 +3760,7 @@
"PI_PHCDRR_3_EX_2"
],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"measureSets": [],
"exclusion": null,
Expand Down Expand Up @@ -4385,7 +4385,7 @@
"M1425"
],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"allowedRegistrationTypes": [
"apm",
Expand Down Expand Up @@ -4439,7 +4439,7 @@
"M1425"
],
"measureSpecification": {
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting.pdf"
"default": "https://qpp.cms.gov/docs/pi_specifications/Measure%20Specifications/2025-MIPS-Promoting-Interoperability-Measure-Electronic-Case-Reporting-Updated-April-2025.pdf"
},
"allowedRegistrationTypes": [
"apm",
Expand Down Expand Up @@ -11136,7 +11136,7 @@
"pediatrics"
],
"measureSpecification": {
"registry": "https://qpp.cms.gov/docs/QPP_quality_measure_specifications/CQM-Measures/2024_Measure_394_MIPSCQM.pdf"
"registry": "https://qpp.cms.gov/docs/QPP_quality_measure_specifications/CQM-Measures/2025_Measure_394_MIPSCQM.pdf"
},
"overallAlgorithm": "overallStratumOnly",
"strata": [
Expand Down
4 changes: 2 additions & 2 deletions converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>qpp-conversion-tool-parent</artifactId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -170,7 +170,7 @@
<dependency>
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>commons</artifactId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion generate-race-cpcplus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>qpp-conversion-tool-parent</artifactId>
<groupId>gov.cms.qpp.conversion</groupId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion generate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>qpp-conversion-tool-parent</artifactId>
<groupId>gov.cms.qpp.conversion</groupId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>qpp-conversion-tool-parent</artifactId>
<packaging>pom</packaging>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<name>QPP Conversion Tool</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion qrda3-update-measures/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>qpp-conversion-tool-parent</artifactId>
<groupId>gov.cms.qpp.conversion</groupId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>gov.cms.qpp.conversion</groupId>
<artifactId>qpp-conversion-tool-parent</artifactId>
<version>2024.2.12-RELEASE</version>
<version>2024.2.13-RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading
Loading