fix: doc test changed files detection#814
Conversation
doc test incorrectly detects changes file for PR in merge queue. This fix utilize tj-actions/changed-files to correctly detect changes files in various states of PR Assisted-By: claude Signed-off-by: Jindrich Luza <jluza@redhat.com>
Review Summary by Qodo(Agentic_describe updated until commit 04d0290)Fix docstring test changed files detection using tj-actions/changed-files
WalkthroughsDescription• Replace manual PR file detection with tj-actions/changed-files action • Fix docstring test failing in merge queue due to incorrect file detection • Simplify docstring test step by removing complex shell scripting logic • Add conditional execution of docstring test only when Python files changed Diagramflowchart LR
A["PR Trigger"] --> B["Get changed Python files\n(tj-actions/changed-files)"]
B -- "any_changed == true" --> C["Run ruff docstring check\non changed files"]
B -- "no changes" --> D["Skip docstring test"]
C --> E["Upload coverage to Codecov"]
D --> E
File Changes1. .github/workflows/python.yaml
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
25 rules 1. Shell-injection via filenames
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
23 rules 1. Unquoted file list
|
There was a problem hiding this comment.
Pull request overview
This PR fixes the GitHub Actions “docstring test” step so it correctly detects changed Python files for pull requests, including when checks run via the merge queue (merge_group), by switching from a gh pr view-based approach to tj-actions/changed-files.
Changes:
- Add a
tj-actions/changed-filesstep to compute the set of changed**/*.pyfiles. - Gate the docstring check so it only runs when Python files have changed, and run
ruffagainst the action-provided file list.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #814 +/- ##
=======================================
Coverage 94.18% 94.18%
=======================================
Files 38 38
Lines 3009 3012 +3
=======================================
+ Hits 2834 2837 +3
Misses 175 175
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
doc test incorrectly detects changes file for PR in merge queue. This fix utilize tj-actions/changed-files to correctly detect changes files in various states of PR
Assisted-By: claude