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 pre-commit framework #685

Merged

Conversation

mateusoliveira43
Copy link
Collaborator

@mateusoliveira43 mateusoliveira43 commented Oct 8, 2022

Describe the behavior changes introduced in this PR

Adds pre-commit framework to Pelorus.

Linked Issues

resolves #681
resolves #692

related to #780

Testing Instructions

Run make dev-env (this will run pre-commit install and setup pre-commit to you). Then, run pre-commit run --all-files to run pre-commit hooks against all files of Pelorus. Then, change a file and add it and commit it to see it in action.

If one of the hooks fails (defined in .pre-commit-config.yaml file), the commit is aborted. This can be bypassed by running git commit command with the -n/--no-verify flag.

@openshift-ci
Copy link

openshift-ci bot commented Oct 8, 2022

Hi @mateusoliveira43. Thanks for your PR.

I'm waiting for a konveyor member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 8, 2022
@mpryc
Copy link
Collaborator

mpryc commented Oct 10, 2022

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 10, 2022
@mpryc
Copy link
Collaborator

mpryc commented Oct 10, 2022

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2022
@mateusoliveira43 mateusoliveira43 force-pushed the feat/add-pre-commit-framework branch from 2329232 to b08acbf Compare November 8, 2022 23:24
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 8, 2022
@KevinMGranger
Copy link
Collaborator

todo for me: check if shellcheck in pre-commit works in macOS

@mateusoliveira43 mateusoliveira43 force-pushed the feat/add-pre-commit-framework branch from b08acbf to d2985b6 Compare February 2, 2023 17:52
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2023
@KevinMGranger
Copy link
Collaborator

Since the pre-run stuff is only necessary for CI (and makes assumptions about the user's repo), maybe it should be part of the github CI files only?

@mateusoliveira43
Copy link
Collaborator Author

Since the pre-run stuff is only necessary for CI (and makes assumptions about the user's repo), maybe it should be part of the github CI files only?

this is to address #692 not the CI

@mateusoliveira43 mateusoliveira43 self-assigned this Feb 7, 2023
Signed-off-by: Mateus Oliveira <matews1943@gmail.com>
@mateusoliveira43 mateusoliveira43 force-pushed the feat/add-pre-commit-framework branch from c0f5ee4 to cb5fbee Compare February 7, 2023 16:26
@openshift-ci
Copy link

openshift-ci bot commented Feb 8, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mpryc

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2023
@mpryc mpryc merged commit c1ab842 into dora-metrics:master Feb 8, 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. dco-signoff: yes ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-commit checks don't support forking Use Pre-commit libary in the project
4 participants