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

Validate package during push to Chocolatey Community Repository #3

Closed
2 tasks done
AdmiringWorm opened this issue Jan 16, 2024 · 1 comment
Closed
2 tasks done
Assignees
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Milestone

Comments

@AdmiringWorm
Copy link
Member

Description

There is a possibility to create Validation rules that are run before calling the Run method for the current command, we should leverage this ability to run through any validation rule implemented when a package is being pushed to the Chocolatey Package Repository, and possibly to other places as well (but switching errors to be warnings in this case).

Why Is It Needed

Would be good to have the ability to validate the rules before pushing a package, instead of just when creating the package.

Related Issues and Tickets

N/A

Acceptance Tests

  • Pushing package to CCR validates all package rules.
  • Pushing package to other sources validates all rules while changing errors to warnings (optional).
  • This validation is not run on other commands.

Done Checklist

  • Add validation handler to run through the rule validator
  • Add unit tests to ensure functionality
@AdmiringWorm AdmiringWorm added the Improvement Issues that enhances existing functionality, or adds new features label Jan 16, 2024
@AdmiringWorm AdmiringWorm added this to the 0.1.0 milestone Jan 16, 2024
@AdmiringWorm AdmiringWorm self-assigned this Jan 16, 2024
AdmiringWorm added a commit that referenced this issue Jan 16, 2024
These changes implement a new validation handler that runs globally
on a Chocolatey CLI execution.
This validation handler makes it possible for us to validate any
implemented rule when a package is pushed to CCR, and if one or more
rules fails it will prevent any further execution of the push process to
continue.
AdmiringWorm pushed a commit that referenced this issue Jan 16, 2024
(#3) Add validation provider for pushing packages

Closes #3

See merge request chocolatey/collaborators/chocolatey-ccr-extension!2
@AdmiringWorm AdmiringWorm added the 4 - Done Code has been added to the repository, and has been reviewed by a team member label Jan 17, 2024
@AdmiringWorm AdmiringWorm changed the title Create IValidation implementation to run Rule validation on package Pushes Validate package during push to Chocolatey Community Repository Jan 18, 2024
@AdmiringWorm AdmiringWorm added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Jan 18, 2024
@AdmiringWorm
Copy link
Member Author

🎉 This issue has been resolved in version 0.1.0 🎉

The release is available on:

Your GitReleaseManager bot 📦 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

No branches or pull requests

1 participant