chore(workflow): change pull_request event to pull_request_target#74
Conversation
… Dependabot auto-merge Co-authored-by: Copilot <copilot@github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe GitHub Actions workflow trigger for Dependabot pull requests is changed from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ 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 |
Overview
The Dependabot auto-approve and auto-merge workflow was not functioning as intended because it used the
pull_requestevent trigger. Workflows triggered bypull_requeston PRs opened by bots (such as Dependabot) run with read-only token permissions and cannot write back to the repository, so the approve and merge steps were silently failing.This change switches the trigger to
pull_request_target, which runs in the context of the base branch and is granted the write permissions declared in the workflow (contents: write,pull-requests: write). This allows the workflow to successfully approve and auto-merge Dependabot PRs once all required status checks and branch protection rules are satisfied.No logic, merge conditions, or repository guard (
github.repository == 'AbsaOSS/version-tag-check') were changed — only the event trigger.Release Notes
pull_requesttopull_request_target, restoring write permissions needed to approve and merge PRs automatically.Summary by CodeRabbit