Conversation
The linting workflow triggers on both pull_request and release events. On release events, github.event.pull_request.number is empty, causing PR_number.txt to contain an invalid value and the comment workflow to fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughUpdated GitHub Actions workflows and configuration to avoid failures when no pull request context exists: the linting workflow only writes the PR number when Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoFix linting workflow to skip PR comment on non-PR events
WalkthroughsDescription• Fix linting workflow failing on release events due to empty PR number • Skip PR comment step when no valid PR number is available • Gracefully handle missing or invalid PR_number.txt instead of failing Diagramflowchart LR
A["linting.yml trigger"] -- "pull_request event" --> B["Save PR number"]
A -- "release event" --> C["Skip Save PR number"]
B -- "upload artifact" --> D["linting_comment.yml"]
C -- "no artifact" --> D
D -- "PR_number.txt missing" --> E["Skip comment, exit 0"]
D -- "invalid PR number" --> E
D -- "valid PR number" --> F["Post PR comment"]
File Changes1. .github/workflows/linting.yml
|
Code Review by Qodo
1. PR_number.txt omitted from artifact
|
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/linting.yml:
- Line 69: The linting job contains an unnecessary PR-number guard (the line
with the if-condition checking github.event.pull_request.number) which causes
template drift and breaks the nf-core template check; remove that conditional so
the step runs under the workflow's existing guards (or replace it with a simple
always() check) to allow linting_comment.yml to handle missing/invalid PR
numbers and restore template compatibility.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e43ef97e-ea3d-45c3-9531-0e2a161ba8bc
📒 Files selected for processing (2)
.github/workflows/linting.yml.github/workflows/linting_comment.yml
|
|
||
| - name: Save PR number | ||
| if: ${{ always() }} | ||
| if: ${{ always() && github.event.pull_request.number }} |
There was a problem hiding this comment.
Line 69 causes template drift and keeps files_unchanged lint failing
This condition is not needed anymore now that linting_comment.yml safely skips invalid/missing PR numbers, and it appears to be the reason the nf-core template check is failing in this PR.
Suggested template-compatible fix
- - name: Save PR number
- if: ${{ always() && github.event.pull_request.number }}
+ - name: Save PR number
+ if: ${{ always() }}
run: echo ${{ github.event.pull_request.number }} > PR_number.txtBased on learnings: Run nf-core pipelines lint before merging code to ensure pipeline standards compliance (use --release flag for master branch PRs).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/linting.yml at line 69, The linting job contains an
unnecessary PR-number guard (the line with the if-condition checking
github.event.pull_request.number) which causes template drift and breaks the
nf-core template check; remove that conditional so the step runs under the
workflow's existing guards (or replace it with a simple always() check) to allow
linting_comment.yml to handle missing/invalid PR numbers and restore template
compatibility.
PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).Summary by CodeRabbit