Claude test sonar skip pr logic 0 lk tj#64
Conversation
Перенесена логика из 1c-syntax/bsl-language-server: при событии push в ветку, для которой уже открыт pull request, тестирование и контроль качества пропускаются, чтобы избежать дублирующего прогона (он будет выполнен в рамках события pull_request). Логика реализована встроенным job check-pr-exists в reusable-workflow'ах test.yml и sonar.yml. В отличие от исходного репозитория используется динамическое определение ветки по умолчанию (github.event.repository.default_branch), а не внешний скрипт, недоступный в контексте вызывающего репозитория. https://claude.ai/code/session_01BWWiueTXPbduaFtruKmkAv
|
Warning Review limit reached
More reviews will be available in 45 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Adds a guard job to the reusable test.yml and sonar.yml workflows that skips the run when a push event arrives for a non-default branch that already has an open pull request, preventing duplicate runs (the equivalent run happens via the pull_request event). README is updated with notes describing the new behavior.
Changes:
- New
check-pr-existsjob intest.ymlthat queriesgh pr listand exposeshas_proutput;buildis now gated onhas_pr != 'true'. - Same
check-pr-existsjob added tosonar.yml, wired intotest,sonar, andcoverallsjobs vianeedsandifconditions. - README notes added for both the test and quality workflows describing the skip behavior and the exempt branches (
default,main,master,develop).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/test.yml |
Adds check-pr-exists job and gates build on its output to skip push-event duplicates. |
.github/workflows/sonar.yml |
Adds check-pr-exists job and incorporates it into test, sonar, and coveralls job conditions/needs. |
README.md |
Documents the new skip behavior for both the test and quality (SonarQube/Coveralls) workflows. |
Job check-pr-exists запрашивал 'pull-requests: read' через блок permissions. Reusable workflow не может запросить прав больше, чем выдал вызывающий репозиторий, поэтому при токене с 'pull-requests: none' это приводило к startup failure ещё до запуска job (Invalid workflow file). Блок permissions удалён, вызов gh сделан устойчивым к отказу (|| echo 0): при отсутствии прав проверка возвращает has_pr=false и тесты/сонар запускаются как обычно. Для активации пропуска повторного прогона на push вызывающий workflow должен сам выдать токену pull-requests: read (добавлено в примеры README). https://claude.ai/code/session_01BWWiueTXPbduaFtruKmkAv
No description provided.