Skip to content

Claude test sonar skip pr logic 0 lk tj#64

Open
nixel2007 wants to merge 3 commits into
mainfrom
claude-test-sonar-skip-pr-logic-0LkTJ
Open

Claude test sonar skip pr logic 0 lk tj#64
nixel2007 wants to merge 3 commits into
mainfrom
claude-test-sonar-skip-pr-logic-0LkTJ

Conversation

@nixel2007

Copy link
Copy Markdown
Member

No description provided.

claude added 2 commits May 29, 2026 19:19
Перенесена логика из 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
Copilot AI review requested due to automatic review settings May 29, 2026 19:25
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@nixel2007, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2b06f32-0a11-4d97-852d-bb96ce12f310

📥 Commits

Reviewing files that changed from the base of the PR and between ce1ff34 and cf14ecc.

⛔ Files ignored due to path filters (2)
  • .github/workflows/sonar.yml is excluded by !**/*.yml
  • .github/workflows/test.yml is excluded by !**/*.yml
📒 Files selected for processing (1)
  • README.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude-test-sonar-skip-pr-logic-0LkTJ

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-exists job in test.yml that queries gh pr list and exposes has_pr output; build is now gated on has_pr != 'true'.
  • Same check-pr-exists job added to sonar.yml, wired into test, sonar, and coveralls jobs via needs and if conditions.
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants