Skip to content
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

feat: add actions/cache version validation #843

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

erikburt
Copy link
Contributor

@erikburt erikburt commented Jan 27, 2025

Changes

  1. Refactoring ValidationCheck
    • Change the interface from ValidateFile to ValidateLine
    • The added complexity of validating the files separately, and having to combine the results afterwards was unnecessary.
    • Change all the implementations so it can validate each line as needed, and immediately combining the messages
  2. Refactoring/Reorganizing validation
    • To support the above changes, and consolidate logic. Created a new validate.ts file that handles the general validation logic
  3. Refactoring/Reorganizing file parsing
    • The file parsing logic was all over the place. I've now modified it to live in a single file.
    • By default, it now parses the diff and all existing files
      • This lets us annotate on existing problems, we are no longer limited to errors in the diff
      • To minimize spam all existing validators only operate on line changes
  4. Add actions/cache version validation
    • This will validate that references to actions/cache are up-to-date, and will comment on the PR if the repo contains references.
    • Add toggle for this
  5. More test coverage

Testing


RE-3330

@erikburt erikburt self-assigned this Jan 27, 2025
@erikburt erikburt marked this pull request as ready for review January 28, 2025 23:27
@erikburt erikburt requested a review from a team as a code owner January 28, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant