mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 02:53:16 +00:00
Extend the external PR gate to verify that the PR author is actually assigned to the issue they reference. Previously, anyone could link to any open issue with `Fixes #NNN` to pass the check — this closes the loophole by fetching each linked issue via the GitHub API and comparing assignees against the PR author (case-insensitive). The bot comment now adapts its message based on which check failed, and updates in place if the failure reason changes on a re-check. ## Changes - Add assignee validation in the `check-link` step: after parsing issue numbers from the PR body, fetch each via `github.rest.issues.get` and check if the PR author appears in `assignees` — short-circuits on first match - Gate all downstream steps (`missing-issue-link` label add/remove, comment, `setFailed`) on both `has-link` and `is-assigned` outputs - Serve a distinct bot comment when the issue link exists but the author isn't assigned, directing them to request assignment from a maintainer - Update the existing marker comment in place (via `updateComment`) when the failure reason changes between re-runs, instead of leaving a stale message