Employ pre-commit for commit validation #9719

Closed
opened 2025-12-29 21:21:35 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 22, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Replace our current pre-commit hook script with pre-commit.

Justification

Obviates the need for a custom script while at the same time exposing more powerful validation features.

Originally created by @jeremystretch on GitHub (May 22, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Replace our current [pre-commit hook script](https://github.com/netbox-community/netbox/blob/develop/scripts/git-hooks/pre-commit) with [`pre-commit`](https://pre-commit.com/). ### Justification Obviates the need for a custom script while at the same time exposing more powerful validation features.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 21:21:35 +01:00
adam closed this issue 2025-12-29 21:21:35 +01:00
Author
Owner

@ITJamie commented on GitHub (May 23, 2024):

Im a heavy pre-commit user, i am happy to make a pr towards this

@ITJamie commented on GitHub (May 23, 2024): Im a heavy pre-commit user, i am happy to make a pr towards this
Author
Owner

@github-actions[bot] commented on GitHub (Aug 21, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Aug 21, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9719