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 prescriptions with pre-commit hook using adviser #38951

Conversation

VannTen
Copy link
Member

@VannTen VannTen commented Jan 17, 2023

Related Issues and Dependencies

fix #8
thoth-station/adviser#2402

This introduces a breaking change

  • No

This should yield a new module release

  • No

This Pull Request implements

Add a pre-commit hooks to validate prescriptions.
In conjonction with --from-ref / --to-ref, this should only validates files touched in a PR

This on my fork of thoth-station/adviser because it needs thoth-station/adviser#2411 and #2408 to be merged first.

By the way, we really need operate-first/apps#2462 on this repo. It would allow us to implement pre-commit hook caching instead of installing every single time, which would save a lot of prow-time. (well, once it comes back up...)

/hold

@sesheta sesheta added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 17, 2023
@VannTen VannTen changed the title Add pre-commit hooks using adviser validate prescriptions with pre-commit hook using adviser Jan 17, 2023
@sesheta sesheta requested review from goern and KPostOffice January 17, 2023 10:35
@goern
Copy link
Member

goern commented Jan 20, 2023

/test all

@VannTen
Copy link
Member Author

VannTen commented Feb 3, 2023

/unhold

@sesheta sesheta removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 3, 2023
Copy link
Member

@codificat codificat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one pre-commit thing to fix

Comment on lines 24 to 26
- id: validate-prescriptions
files: prescriptions/
exclude: prescriptions/_prescription_metadata.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yamllint is complaining: error wrong indentation: expected 2 but found 4 (indentation)

@VannTen VannTen force-pushed the feat/pre-commmit-validate-prescriptions branch from e7c60fc to 4d5c139 Compare February 3, 2023 12:24
Once we have a proper release of adviser we'll use that
@VannTen
Copy link
Member Author

VannTen commented Feb 3, 2023

of course I had to forget the other pre-commit hooks :/

@VannTen VannTen requested a review from codificat February 3, 2023 12:49
@codificat
Copy link
Member

/lgtm
/approve

thanks!

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2023
@sesheta
Copy link
Member

sesheta commented Feb 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codificat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2023
@sesheta sesheta merged commit 1f2a445 into thoth-station:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically validate prescriptions on a pull request
4 participants