Repository navigation
fix: use PR author for commit-dist job condition - #1541
Conversation
|
||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adjusts automation around Renovate PR handling so the commit-dist job runs under the correct circumstances, and tweaks Renovate vulnerability alert labeling.
Changes:
- Updates
commit-distjob gating logic in CI workflow for Renovate PRs. - Adds
dependencieslabel to Renovate vulnerability alert issues.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
renovate.json |
Expands vulnerability alert labels to include dependencies. |
.github/workflows/ci.yml |
Modifies commit-dist conditional logic intended to detect Renovate PRs and handle re-runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| github.event.pull_request.head.repo.full_name == github.repository | ||
| startsWith(github.head_ref, 'renovate/') && | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| github.actor == github.repository_owner |
There was a problem hiding this comment.
The new commit-dist condition still relies on github.actor (now comparing it to github.repository_owner). This appears to reintroduce the original problem described in the PR (the trigger actor can change on re-runs) and also prevents commit-dist from running on the initial Renovate PR run (where github.actor is typically renovate[bot]). To match the PR description and make the condition stable across re-runs, key the check off the PR author instead (e.g., github.event.pull_request.user.login) and avoid gating on github.actor for Renovate detection.
| github.actor == github.repository_owner | |
| github.event.pull_request.user.login == 'renovate[bot]' |
| "osvVulnerabilityAlerts": true, | ||
| "vulnerabilityAlerts": { | ||
| "labels": ["security"], | ||
| "labels": ["dependencies", "security"], |
There was a problem hiding this comment.
This change to vulnerabilityAlerts.labels adds the dependencies label, but the PR description focuses only on the commit-dist workflow condition change. If this label change is intended, it should be called out in the PR description (or split into a separate PR) to keep the scope clear.
The
commit-distjob condition usedgithub.actorto detect Renovate PRs, butgithub.actorreflects whoever triggered the run — not who opened the PR. When the repo owner manually re-runs CI on a Renovate PR,github.actorbecomesmikepenzand the job is incorrectly skipped.Fix: use
github.event.pull_request.user.logininstead, which always reflects who opened the PR regardless of who triggered the run.