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
Remove checkcommits #4596
Comments
/cc @gkurz. |
Here are my initial thoughts: It looks like functionality of checkcommits can be replaced by the GitHub action found on the main repo: https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml https://docs.google.com/spreadsheets/d/1ztv6TUN7BZcmhmGxyb5v6_RBHOqp0MPuoZxVG9lYpeo/edit?usp=sharing I listed out all the features specified by the checkcommits interface on the left-most column, whether they are specified in the community guidelines next and whether I think they are currently being correctly covered by the body-regex checker. I will do further testing to ensure everything is caught, but I suspect that since nothing has been updated to that action since March, there are at least no obvious inconsistencies with checkcommits. |
@jodh-intel I'm an intern that was tasked to look at this. There was some confusion between me and the people that assigned me to look at this. To confirm, I need to confirm that this check-commit-message action made in the main repository works as intended, copy it to here, making the necessary changes, and update the documentation accordingly, correct? |
Assuming that we are just testing the implementation in kata-containers/kata-containers/.github/workflows/commit-message-check.yaml, here are my thoughts after testing it:
While I'm fairly certain 1. should be fixed, I feel like 2 is a redundant check anyways. 3 makes sense, but is not specified in the checkcommits interface or the community documentation, so it may make sense not to include it especially since there are other specified ways to bypass the body length checker (indentation/starting the line with a non-alphabetic character). |
Hi @bookinabox - Welcome to the project! Basically, this issue is to remove the existing Since we've been using @Tim-Zhang's https://github.com/tim-actions code in our Responding to your comments:
That's actually an interesting issue. 72 is probably too short as folk often paste logs into commits. However,
That sounds bad as we definitely need the subject and subsystem to be specified.
Yep - that could also be useful to add to Tim's checker. That said, if we've survived for ~2 years without Tim's checker hitting the issue, maybe it's not a major problem. Ideally, Tim's checker would provide the feature though. TasksThis suggests we actually have three tasks. The first one is the most important but the other two are "nice to have's" if you or Tim are keen to tal at them?
|
On point 1, I will continue 72 given that there does exist ways that were listed to bypass the length checker (I have checked indentation and non-alphabetic characters) I may not have been clear on the second point. As far as I understand, the only way the subject and body can be distinguished is just by the fact that the subject is first and there is a newline between them. The subsystem check does exist and should catch anything without a subject line. I only brought it up because the checkcommits implementation does do an explicit check of the subject line existing and being non-whitespace. So it should be redundant to add another check. I just mentioned it in case there were edge-cases I was not seeing. Thanks for the feedback and response. I know this is kind of a minor issue so I appreciate you looking at it! Edit: Additionally, how would you recommend unit testing Github actions? I have looked into using nekto/act to run actions locally, but ran into problems. Basically, pull requests as a concept only exist on git forges rather than a local version of git and the way commits are selected to be tested is by finding all commits associated with a pull request number on github. |
The kata-container/kata-containers repo has been using Github Actions rather than checkcommits. I have copied over the workflow from https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml with minor modifications. 1. The body length is now properly set at 72 rather than 149 2. Now single-word lines such as urls should not be flagged for being too long. Fixes kata-containers#4596 Signed-off-by: Derek Lee derlee@redhat.com
The kata-container/kata-containers repo has been using Github Actions rather than checkcommits. I have copied over the workflow from https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml with minor modifications. 1. The body length is now properly set at 72 rather than 149 2. Now single-word lines such as urls should not be flagged for being too long. Fixes kata-containers#4596 Signed-off-by: Derek Lee <derlee@redhat.com>
The kata-container/kata-containers repo has been using Github Actions rather than checkcommits. I have copied over the workflow from https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml with minor modifications. 1. The body length is now properly set at 72 rather than 149 2. Now single-word lines such as urls should not be flagged for being too long. Fixes kata-containers#4596 Signed-off-by: Derek Lee <derlee@redhat.com>
The kata-container/kata-containers repo has been using Github Actions rather than checkcommits. I have copied over the workflow from https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml with minor modifications. 1. The body length is now properly set at 72 rather than 149 2. Now single-word lines such as urls should not be flagged for being too long. Fixes kata-containers#4596 Signed-off-by: Derek Lee <derlee@redhat.com>
The kata-container/kata-containers repo has been using Github Actions rather than checkcommits. I have copied over the workflow from https://github.com/kata-containers/kata-containers/blob/main/.github/workflows/commit-message-check.yaml with minor modifications. 1. The body length is now properly set at 72 rather than 149 2. Now single-word lines such as urls should not be flagged for being too long. Fixes kata-containers#4596 Signed-off-by: Derek Lee <derlee@redhat.com>
The
checkcommits
tool has served us well over the past five years to ensure that all commits comply with our documented patch format.However, with the advent of the GitHub Actions,
checkcommits
has become redundant:Plan
checkcommits
to ensure the GHA does everythingcheckcommits
does.checkcommits
.checkcommits
code from the static checker.checkcommits
.The text was updated successfully, but these errors were encountered: