feat: Add Tekton CI support in CIQualityGatesAssessor#437
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends CI quality gates assessment to recognize Tekton Pipelines-as-Code by adding ChangesTekton PR Trigger Detection
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Mykola Morhun <mmorhun@redhat.com> Assisted-by: Claude
|
Fixed formatter error. |
📈 Test Coverage Report
Coverage calculated from unit tests only |
|
@natifridman @jwm4 could you review the PR? |
jwm4
left a comment
There was a problem hiding this comment.
Review by Bill Murdock (with assistance from Claude Code)
Verdict: Request changes
The implementation is correct and well-tested. One change needed before merging, plus a few optional suggestions.
Required
docs/attributes.md needs updating. Line 630 enumerates the recognized CI config paths:
A workflow file in
.github/workflows/,.gitlab-ci.yml, or similar
Now that .tekton/ is explicitly detected, it should be listed here alongside the others. The "or similar" hand-wave isn't sufficient when the docs already name specific paths.
Suggestions (non-blocking)
-
re.DOTALLoncel_patternis slightly over-broad. The.*withDOTALLcould matchon-cel-expressionon one line andevent == "pull_request"far later in the file (e.g., in a comment or unrelated field). In practice Tekton pipeline files are small and focused, so this is low-risk, but worth noting. -
Missing integration-level test for detection. The tests verify
_has_pr_trigger()directly but don't test that_detect_ci_configs()actually discovers files inside a.tekton/directory. A test that creates.tekton/pipeline.yamland calls_detect_ci_configs()would close that gap. -
Docstring on
_has_pr_triggercould be updated. It currently says "Other CI systems (GitLab CI, CircleCI, Travis) run on MRs by default" to explain thereturn Truedefault. Tekton requires explicit configuration like GitHub Actions, so it's now the second system with explicit trigger detection. A small docstring update would keep it accurate.
Otherwise, nice contribution. The test coverage for annotation formats and CEL expressions is thorough.
Assisted-by: Claude
Description
Adds basic support for Pipeline-as-Code CI.
Type of Change
Related Issues
N/A
Changes Made
.tektondirectory in the repository config to detect Pipelines-as-Code CI / KonfluxTesting
pytest)Checklist
Screenshots (if applicable)
Additional Notes
Summary by CodeRabbit
New Features
Tests