Repository navigation
ci: run pre-commit on changed files for PRs, drop fail_fast, document local setup - #113
Merged
Ali-Yazdani merged 2 commits intoOct 4, 2026
Merged
Conversation
… local setup Closes OWASP#112. - master.yml: on pull_request pass --from-ref base.sha --to-ref head.sha to pre-commit/action so only files the PR touches are checked; pushes to master and workflow_dispatch keep --all-files. Checkout now uses fetch-depth: 0 so both refs are available. - .pre-commit-config.yaml: fail_fast false so one CI run reports every failing hook instead of stopping at the first. - README.md: add "Running the checks locally" under Contributing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The local setup instructions omit the required Python 3.13 prerequisite.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Scopes PR linting to changed files while preserving full checks elsewhere and improves contributor guidance.
Changes:
- Uses commit-range checks for pull requests.
- Reports all failing hooks.
- Documents local pre-commit usage.
| File | Description |
|---|---|
.github/workflows/master.yml |
Selects pre-commit scope by event. |
.pre-commit-config.yaml |
Disables fail-fast behavior. |
README.md |
Adds local setup instructions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Updated Python command for installing pre-commit. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Ali-Yazdani
approved these changes
Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #112.
Changes
.github/workflows/master.ymlpull_request, pass--from-ref <base.sha> --to-ref <head.sha>topre-commit/actionso only files the PR touches are checked. Pushes tomasterandworkflow_dispatchkeep--all-files. Checkout usesfetch-depth: 0so both refs are available..pre-commit-config.yamlfail_fast: falseso a single CI run reports every failing hook instead of stopping at the first one.README.mdpip install pre-commit,pre-commit install,pre-commit run --all-files).Why
On #99 a one-file PR failed CI on ~80 markdownlint errors in 24 files it never touched, and because of
fail_fastit took three pushes to see each hook's failure in turn. See #112 for details.Verification
pre-commit run --all-filespasses on this branch.pre-commit run --from-ref origin/master --to-ref HEADruns the hooks on exactly the 3 changed files and passes.pull_requestpath.