-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Skip CD pipelines on Depandabot's PRs #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Skip CD pipelines on Depandabot's PRs #7
Conversation
📝 WalkthroughPre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (1)
Comment |
jamesbhobbs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- conflicts, 2. I dont know why you're skipping dependabot, how will you know CD won't fail before merge to main?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/cd.yml(6 hunks).github/workflows/ci.yml(1 hunks)
🔇 Additional comments (6)
.github/workflows/ci.yml (1)
220-221: Gitleaks job missing Dependabot exclusion—inconsistent with CD pipeline changes.The condition gates forks but doesn't exclude Dependabot, unlike the cd.yml jobs. If the intent is to skip all Dependabot bot activity, this should also check
github.actor != 'dependabot[bot]'.Verify if running gitleaks on Dependabot PRs is intentional (e.g., for security scanning updates) or an oversight.
.github/workflows/cd.yml (5)
33-34: Condition correctly gates build artifacts from forks and Dependabot.The condition
(github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]'is sound: runs on base-repo PRs or non-PR events, excluding the bot.
148-148: Publish Python package correctly gates from forks and Dependabot.Condition mirrors build-and-push-artifacts pattern consistently.
288-288: PyPI publish correctly requires tags and gates Dependabot.Adds tag check (
startsWith(github.ref, 'refs/tags/')) alongside actor check. Proper gating for production publishing.
312-312: Review app deployment correctly scoped to base-repo PRs, excluding Dependabot.Simplified condition (no fork OR clause) because this job is PR-only by design. Consistent with deploy-only semantics.
357-357: Jupyter-for-local correctly gates from forks and Dependabot.Condition matches build-and-push-artifacts pattern; consistent.
…-on-depandabot-prs
there's a pretty surprising behaviour with Dependabot & Github actions as the PRs are not considered forks, but Dependabot doesn't inherit Github secrets from the repository configuration (the secrets must be added manually) @jamesbhobbs skipping CD is fine as any supply chain attack could exfiltrate Github tokens used for deploying |
|
📦 Python package built successfully!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/cd.yml (1)
125-126: Redundant Dependabot exclusion in status job (duplicate of past review comment).The
build-and-push-artifacts-statusjob depends onbuild-and-push-artifactsand repeats thegithub.actor != 'dependabot[bot]'check. Since the parent job already skips for Dependabot, the status job will never run in that case. Thealways()prefix causes the job to run anyway, only to fail the actor check—inefficient but harmless.Consider: remove the actor check from this job's if condition and let the parent job's skip propagate, or remove
always()if you want strict dependency on the parent's success.Apply this diff if you prefer to rely on parent job's skip:
- if: always() && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') && github.actor != 'dependabot[bot]' + if: always() && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/cd.yml(6 hunks).github/workflows/ci.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/ci.yml
219-219: could not parse as YAML: could not find expected ':'
(syntax-check)
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml
[error] 220-220: syntax error: could not find expected ':'
(syntax)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build and push artifacts for Python 3.10
- GitHub Check: Build and push artifacts for Python 3.9
- GitHub Check: Build and push artifacts for Python 3.11
- GitHub Check: Build and push artifacts for Python 3.12
🔇 Additional comments (5)
.github/workflows/cd.yml (5)
34-34: Verify base-repo condition correctly gates Dependabot.The condition properly skips the job for Dependabot PRs and fork PRs.
To confirm this gates Dependabot as intended, verify the logic:
github.event.pull_request.head.repo.full_name == github.repository: runs only for PRs from the base repo (not forks).github.event_name != 'pull_request': runs for push/tag events.github.actor != 'dependabot[bot]': skips when actor is Dependabot.All three must be true to run. Dependabot PRs will fail the last condition and skip. ✓
147-148: Dependabot exclusion correctly gates publish-python-package.The job is now properly skipped for Dependabot actors and fork PRs.
287-288: Dependabot exclusion correctly gates publish-to-pypi.The job is now properly skipped for Dependabot and restricted to tag events.
311-312: Dependabot exclusion correctly gates deploy-review-app.The job is now properly skipped for Dependabot actors and fork PRs. The explicit
github.event_name == 'pull_request'ensures this only runs on PRs, which aligns with the review-app deployment purpose.
356-357: Dependabot exclusion correctly gates jupyter-for-local.The job is now properly skipped for Dependabot actors and fork PRs.
|
🚀 Review App Deployment Started
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
=======================================
Coverage 76.60% 76.60%
=======================================
Files 99 99
Lines 5476 5476
Branches 748 748
=======================================
Hits 4195 4195
Misses 1281 1281 ☔ View full report in Codecov by Sentry. |
Summary by CodeRabbit