fix: run required labels on pull_request_target#151
fix: run required labels on pull_request_target#151Kaiser-Wu wants to merge 2 commits intocoze-dev:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChanged the GitHub Actions workflow trigger from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
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/required-labels.yml:
- Line 5: The workflow currently uses the mutable tag
mheap/github-action-required-labels@v5; replace that mutable ref with a full
commit SHA to pin the action and mitigate supply-chain risk. Locate the step
that references mheap/github-action-required-labels@v5 and update the uses value
to mheap/github-action-required-labels@<full-commit-sha> (obtain the SHA from
the action repo’s commit history or the release you intend to pin), then commit
the change so the workflow references the immutable commit SHA instead of the v5
tag.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d8f0728c-af15-4ba1-bf15-aed75a753cb3
📒 Files selected for processing (1)
.github/workflows/required-labels.yml
What changed
pull_requesttopull_request_targetWhy
Fork-based PRs currently fail the
labelcheck withResource not accessible by integrationbecause the workflow tries to comment on the PR while running under the restrictedpull_requesttoken.This workflow only inspects PR metadata and does not check out or execute PR code, so
pull_request_targetis the appropriate trigger.Validation
ruby -e 'require "yaml"; YAML.load_file(".github/workflows/required-labels.yml"); puts "ok"'