mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 02:53:16 +00:00
Enforce that all external PRs reference an approved issue via GitHub auto-close keywords (`Fixes #NNN`, `Closes #NNN`, `Resolves #NNN`). This replaces the previous AI-disclaimer policy in the PR template with a stricter requirement: external contributors must link to a maintainer-approved issue before their PR can merge. ## Changes - Add `require_issue_link.yml` workflow that chains off the `external` label applied by `tag-external-contributions.yml` — listens for `labeled`, `edited`, and `reopened` events to avoid duplicating the org membership API call - Scan PR body with a case-insensitive regex matching all conjugations of `close/fix/resolve` + `#NNN`; fail the check and post a deduplicated comment (via `<!-- require-issue-link -->` HTML marker) when no link is found - Apply a `missing-issue-link` label on failure, remove it on pass — enables bulk cleanup via label filter - Add `workflow_dispatch` backfill job to `pr_size_labeler.yml` for retroactively applying size labels to open PRs - Quote `author` in GitHub search queries in `tag-external-contributions.yml` to prevent mismatches on usernames with special characters - Update `PULL_REQUEST_TEMPLATE.md` to replace the AI-disclaimer guideline with the new issue-link requirement > [!NOTE] > `require_issue_link.yml` depends on `tag-external-contributions.yml` running first to apply the `external` label. Deploy as a non-required check initially, then promote to required after validation.
2.0 KiB
2.0 KiB
(Replace this entire block of text)
Read the full contributing guidelines: https://docs.langchain.com/oss/python/contributing/overview
All contributions must be in English. See our language policy.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
Thank you for contributing to LangChain! Follow these steps to have your pull request considered as ready for review.
- PR title: Should follow the format: TYPE(SCOPE): DESCRIPTION
- Examples:
- fix(anthropic): resolve flag parsing error
- feat(core): add multi-tenant support
- test(openai): update API usage tests
- Allowed TYPE and SCOPE values: https://github.com/langchain-ai/langchain/blob/master/.github/workflows/pr_lint.yml#L15-L33
- PR description:
- Write 1-2 sentences summarizing the change.
- If this PR addresses a specific issue, please include "Fixes #ISSUE_NUMBER" in the description to automatically close the issue when the PR is merged.
- If there are any breaking changes, please clearly describe them.
- If this PR depends on another PR being merged first, please include "Depends on #PR_NUMBER" in the description.
- Run
make format,make lintandmake testfrom the root of the package(s) you've modified.
- We will not consider a PR unless these three are passing in CI.
- How did you verify your code works?
Additional guidelines:
- All external PRs must link to an issue or discussion where a solution has been approved by a maintainer. PRs without prior approval will be closed.
- PRs should not touch more than one package unless absolutely necessary.
- Do not update the
uv.lockfiles or add dependencies topyproject.tomlfiles (even optional ones) unless you have explicit permission to do so by a maintainer.
Social handles (optional)
Twitter: @ LinkedIn: https://linkedin.com/in/