Skip to content

Scorecard file level checks#2751

Draft
djanickova wants to merge 11 commits intoredhat-developer:mainfrom
djanickova:scorecard-file-level-checks
Draft

Scorecard file level checks#2751
djanickova wants to merge 11 commits intoredhat-developer:mainfrom
djanickova:scorecard-file-level-checks

Conversation

@djanickova
Copy link
Copy Markdown
Member

@djanickova djanickova commented Apr 13, 2026

Hey, I just made a Pull Request!

This PR introduces a new type of scorecard: file level checks (RHDHPLAN-397). This adds ability for Scorecard to verify if a list of required files (one or more) is present (such as a license, CODEOWNERS, dockerfile, .gitignore, etc). The paths to these files are configurable.

Example of these scorecards on the entity page:
Screenshot 2026-04-14 at 13 39 22

Example of these scorecards on homepage:
image

Example config:

scorecard:
  plugins:
    github:
      files_check:
        files:
          - readme: 'README.md'
          - i18guide: 'docs/backstage-i18n-guide.md'
        schedule:
          frequency: { minutes: 5 }
          timeout: { minutes: 10 }
          initialDelay: { seconds: 5 }

The contents of this PR have been reviewed in 2 separate previous PRs within my fork:
djanickova#1
djanickova#2

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@github-actions
Copy link
Copy Markdown
Contributor

This pull request adds a new top-level directory under workspaces/. Please follow Submitting a Pull Request for a New Workspace in CONTRIBUTING.md.

Signed-off-by: Diana Janickova <djanicko@redhat.com>

test:  implement and update unit tests

Assisted-By: Cursor
Signed-off-by: Diana Janickova <djanicko@redhat.com>

chore: generate api reports

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: use metricId instead of providerId

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: Apply suggestions from code review

Co-authored-by: Ihor Mykhno <imykhno@redhat.com>

fix: run prettier

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: update expected string in test

Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>

feat: implement aggregated card and update test

Signed-off-by: Diana Janickova <djanicko@redhat.com>

feat: include aggregated card in App.tsx

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: pass logger as param

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: remove default boolean tresholds, edit translation

Signed-off-by: Diana Janickova <djanicko@redhat.com>

chore: generate api reports

Signed-off-by: Diana Janickova <djanicko@redhat.com>

test: e2e test scenario for file checks

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: selectors in test

Signed-off-by: Diana Janickova <djanicko@redhat.com>

feat: include file check section in app-config.yaml

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: aggregated permission card title and desc

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: move tresholds from scorecard-common

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: off center icon and treshold imports

Signed-off-by: Diana Janickova <djanicko@redhat.com>

feat: add new translations

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: implement resolveMetricTranslation

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: resolve translations correctly

Signed-off-by: Diana Janickova <djanicko@redhat.com>

ref: use useMemo in EmptyStatePanel

Signed-off-by: Diana Janickova <djanicko@redhat.com>

fix: use translations in test

Signed-off-by: Diana Janickova <djanicko@redhat.com>
@djanickova djanickova force-pushed the scorecard-file-level-checks branch from dd295a2 to 6a60828 Compare April 13, 2026 09:07
Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app bot commented Apr 14, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-scorecard-backend-module-github
  • @red-hat-developer-hub/backstage-plugin-scorecard-backend
  • @red-hat-developer-hub/backstage-plugin-scorecard-node
  • @red-hat-developer-hub/backstage-plugin-scorecard

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
app-legacy workspaces/scorecard/packages/app-legacy none v0.0.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend-module-github workspaces/scorecard/plugins/scorecard-backend-module-github none v2.4.0
@red-hat-developer-hub/backstage-plugin-scorecard-backend workspaces/scorecard/plugins/scorecard-backend none v2.4.0
@red-hat-developer-hub/backstage-plugin-scorecard-node workspaces/scorecard/plugins/scorecard-node none v2.4.0
@red-hat-developer-hub/backstage-plugin-scorecard workspaces/scorecard/plugins/scorecard none v2.4.0

Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
Signed-off-by: Diana Janickova <djanicko@redhat.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant