Skip to content

The agent engineering platform.

feat(infra): add automatic issue labeling (#33952)

Mason Daugherty77941ab3ce2d
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index 2ed156ed8f..dfefb092aa 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -8,16 +8,15 @@ body:
value: |
Thank you for taking the time to file a bug report.
- Use this to report BUGS in LangChain. For usage questions, feature requests and general design questions, please use the [LangChain Forum](https://forum.langchain.com/).
+ For usage questions, feature requests and general design questions, please use the [LangChain Forum](https://forum.langchain.com/).
- Relevant links to check before filing a bug report to see if your issue has already been reported, fixed or
- if there's another way to solve your problem:
+ Check these before submitting to see if your issue has already been reported, fixed or if there's another way to solve your problem:
- * [LangChain Forum](https://forum.langchain.com/),
- * [LangChain documentation with the integrated search](https://docs.langchain.com/oss/python/langchain/overview),
- * [API Reference](https://reference.langchain.com/python/),
+ * [Documentation](https://docs.langchain.com/oss/python/langchain/overview),
+ * [API Reference Documentation](https://reference.langchain.com/python/),
* [LangChain ChatBot](https://chat.langchain.com/)
* [GitHub search](https://github.com/langchain-ai/langchain),
+ * [LangChain Forum](https://forum.langchain.com/),
- type: checkboxes
id: checks
attributes:
@@ -36,16 +35,48 @@ body:
required: true
- label: This is not related to the langchain-community package.
required: true
- - label: I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- required: true
- label: I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
required: true
+ - type: checkboxes
+ id: package
+ attributes:
+ label: Package (Required)
+ description: |
+ Which `langchain` package(s) is this bug related to? Select at least one.
+
+ Note that if the package you are reporting for is not listed here, it is not in this repository (e.g. `langchain-google-genai` is in `langchain-ai/langchain`).
+
+ Please report issues for other packages to their respective repositories.
+ options:
+ - label: langchain
+ - label: langchain-openai
+ - label: langchain-anthropic
+ - label: langchain-classic
+ - label: langchain-core
+ - label: langchain-cli
+ - label: langchain-model-profiles
+ - label: langchain-tests
+ - label: langchain-text-splitters
+ - label: langchain-chroma
+ - label: langchain-deepseek
+ - label: langchain-exa
+ - label: langchain-fireworks
+ - label: langchain-groq
+ - label: langchain-huggingface
+ - label: langchain-mistralai
+ - label: langchain-nomic
+ - label: langchain-ollama
+ - label: langchain-perplexity
+ - label: langchain-prompty
+ - label: langchain-qdrant
+ - label: langchain-xai
+ - label: Other / not sure / general
- type: textarea
id: reproduction
validations:
required: true
attributes:
- label: Example Code
+ label: Example Code (Python)
description: |
Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.
@@ -53,15 +84,12 @@ body:
**Important!**
- * Avoid screenshots when possible, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
- * Reduce your code to the minimum required to reproduce the issue if possible. This makes it much easier for others to help you.
- * Use code tags (e.g., ```python ... ```) to correctly [format your code](https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting).
- * INCLUDE the language label (e.g. `python`) after the first three backticks to enable syntax highlighting. (e.g., ```python rather than ```).
+ * Avoid screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
+ * Reduce your code to the minimum required to reproduce the issue if possible.
+ (This will be automatically formatted into code, so no need for backticks.)
+ render: python
placeholder: |
- The following code:
-
- ```python
from langchain_core.runnables import RunnableLambda
def bad_code(inputs) -> int:
@@ -69,17 +97,14 @@ body:
chain = RunnableLambda(bad_code)
chain.invoke('Hello!')
- ```
- type: textarea
- id: error
- validations:
- required: false
attributes:
label: Error Message and Stack Trace (if applicable)
description: |
- If you are reporting an error, please include the full error message and stack trace.
- placeholder: |
- Exception + full stack trace
+ If you are reporting an error, please copy and paste the full error message and
+ stack trace.
+ (This will be automatically formatted into code, so no need for backticks.)
+ render: shell
- type: textarea
id: description
attributes:
@@ -99,9 +124,7 @@ body:
attributes:
label: System Info
description: |
- Please share your system info with us. Do NOT skip this step and please don't trim
- the output. Most users don't include enough information here and it makes it harder
- for us to help you.
+ Please share your system info with us.
Run the following command in your terminal and paste the output here:
@@ -113,8 +136,6 @@ body:
from langchain_core import sys_info
sys_info.print_sys_info()
```
-
- alternatively, put the entire output of `pip freeze` here.
placeholder: |
python -m langchain_core.sys_info
validations:
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index a2f2564747..11a5cf12ef 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,9 +1,18 @@
blank_issues_enabled: false
version: 2.1
contact_links:
- - name: πŸ“š Documentation
+ - name: πŸ“š Documentation issue
url: https://github.com/langchain-ai/docs/issues/new?template=01-langchain.yml
about: Report an issue related to the LangChain documentation
- name: πŸ’¬ LangChain Forum
url: https://forum.langchain.com/
about: General community discussions and support
+ - name: πŸ“š LangChain Documentation
+ url: https://docs.langchain.com/oss/python/langchain/overview
+ about: View the official LangChain documentation
+ - name: πŸ“š API Reference Documentation
+ url: https://reference.langchain.com/python/
+ about: View the official LangChain API reference documentation
+ - name: πŸ’¬ LangChain Forum
+ url: https://forum.langchain.com/
+ about: Ask questions and get help from the community
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
index 8656ed1cc8..da6b579832 100644
--- a/.github/ISSUE_TEMPLATE/feature-request.yml
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -13,11 +13,11 @@ body:
Relevant links to check before filing a feature request to see if your request has already been made or
if there's another way to achieve what you want:
- * [LangChain Forum](https://forum.langchain.com/),
- * [LangChain documentation with the integrated search](https://docs.langchain.com/oss/python/langchain/overview),
- * [API Reference](https://reference.langchain.com/python/),
+ * [Documentation](https://docs.langchain.com/oss/python/langchain/overview),
+ * [API Reference Documentation](https://reference.langchain.com/python/),
* [LangChain ChatBot](https://chat.langchain.com/)
* [GitHub search](https://github.com/langchain-ai/langchain),
+ * [LangChain Forum](https://forum.langchain.com/),
- type: checkboxes
id: checks
attributes:
@@ -34,6 +34,40 @@ body:
required: true
- label: This is not related to the langchain-community package.
required: true
+ - type: checkboxes
+ id: package
+ attributes:
+ label: Package (Required)
+ description: |
+ Which `langchain` package(s) is this request related to? Select at least one.
+
+ Note that if the package you are requesting for is not listed here, it is not in this repository (e.g. `langchain-google-genai` is in `langchain-ai/langchain`).
+
+ Please submit feature requests for other packages to their respective repositories.
+ options:
+ - label: langchain
+ - label: langchain-openai
+ - label: langchain-anthropic
+ - label: langchain-classic
+ - label: langchain-core
+ - label: langchain-cli
+ - label: langchain-model-profiles
+ - label: langchain-tests
+ - label: langchain-text-splitters
+ - label: langchain-chroma
+ - label: langchain-deepseek
+ - label: langchain-exa
+ - label: langchain-fireworks
+ - label: langchain-groq
+ - label: langchain-huggingface
+ - label: langchain-mistralai
+ - label: langchain-nomic
+ - label: langchain-ollama
+ - label: langchain-perplexity
+ - label: langchain-prompty
+ - label: langchain-qdrant
+ - label: langchain-xai
+ - label: Other / not sure / general
- type: textarea
id: feature-description
validations:
diff --git a/.github/ISSUE_TEMPLATE/privileged.yml b/.github/ISSUE_TEMPLATE/privileged.yml
index 7bc320a22a..27cf708834 100644
--- a/.github/ISSUE_TEMPLATE/privileged.yml
+++ b/.github/ISSUE_TEMPLATE/privileged.yml
@@ -18,3 +18,33 @@ body:
attributes:
label: Issue Content
description: Add the content of the issue here.
+ - type: checkboxes
+ id: package
+ attributes:
+ label: Package (Required)
+ description: |
+ Please select package(s) that this issue is related to.
+ options:
+ - label: langchain
+ - label: langchain-openai
+ - label: langchain-anthropic
+ - label: langchain-classic
+ - label: langchain-core
+ - label: langchain-cli
+ - label: langchain-model-profiles
+ - label: langchain-tests
+ - label: langchain-text-splitters
+ - label: langchain-chroma
+ - label: langchain-deepseek
+ - label: langchain-exa
+ - label: langchain-fireworks
+ - label: langchain-groq
+ - label: langchain-huggingface
+ - label: langchain-mistralai
+ - label: langchain-nomic
+ - label: langchain-ollama
+ - label: langchain-perplexity
+ - label: langchain-prompty
+ - label: langchain-qdrant
+ - label: langchain-xai
+ - label: Other / not sure / general
diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml
index e055813a02..e13a3501a5 100644
--- a/.github/ISSUE_TEMPLATE/task.yml
+++ b/.github/ISSUE_TEMPLATE/task.yml
@@ -25,13 +25,13 @@ body:
label: Task Description
description: |
Provide a clear and detailed description of the task.
-
+
What needs to be done? Be specific about the scope and requirements.
placeholder: |
This task involves...
-
+
The goal is to...
-
+
Specific requirements:
- ...
- ...
@@ -43,7 +43,7 @@ body:
label: Acceptance Criteria
description: |
Define the criteria that must be met for this task to be considered complete.
-
+
What are the specific deliverables or outcomes expected?
placeholder: |
This task will be complete when:
@@ -58,15 +58,15 @@ body:
label: Context and Background
description: |
Provide any relevant context, background information, or links to related issues/PRs.
-
+
Why is this task needed? What problem does it solve?
placeholder: |
Background:
- ...
-
+
Related issues/PRs:
- #...
-
+
Additional context:
- ...
validations:
@@ -77,15 +77,45 @@ body:
label: Dependencies
description: |
List any dependencies or blockers for this task.
-
+
Are there other tasks, issues, or external factors that need to be completed first?
placeholder: |
This task depends on:
- [ ] Issue #...
- [ ] PR #...
- [ ] External dependency: ...
-
+
Blocked by:
- ...
validations:
required: false
+ - type: checkboxes
+ id: package
+ attributes:
+ label: Package (Required)
+ description: |
+ Please select package(s) that this task is related to.
+ options:
+ - label: langchain
+ - label: langchain-openai
+ - label: langchain-anthropic
+ - label: langchain-classic
+ - label: langchain-core
+ - label: langchain-cli
+ - label: langchain-model-profiles
+ - label: langchain-tests
+ - label: langchain-text-splitters
+ - label: langchain-chroma
+ - label: langchain-deepseek
+ - label: langchain-exa
+ - label: langchain-fireworks
+ - label: langchain-groq
+ - label: langchain-huggingface
+ - label: langchain-mistralai
+ - label: langchain-nomic
+ - label: langchain-ollama
+ - label: langchain-perplexity
+ - label: langchain-prompty
+ - label: langchain-qdrant
+ - label: langchain-xai
+ - label: Other / not sure / general
diff --git a/.github/workflows/auto-label-by-package.yml b/.github/workflows/auto-label-by-package.yml
new file mode 100644
index 0000000000..35e565b5cc
--- /dev/null
+++ b/.github/workflows/auto-label-by-package.yml
@@ -0,0 +1,107 @@
+name: Auto Label Issues by Package
+
+on:
+ issues:
+ types: [opened, edited]
+
+jobs:
+ label-by-package:
+ permissions:
+ issues: write
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Sync package labels
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const body = context.payload.issue.body || "";
+
+ // Extract text under "### Package"
+ const match = body.match(/### Package\s+([\s\S]*?)\n###/i);
+ if (!match) return;
+
+ const packageSection = match[1].trim();
+
+ // Mapping table for package names to labels
+ const mapping = {
+ "langchain": "langchain",
+ "langchain-openai": "openai",
+ "langchain-anthropic": "anthropic",
+ "langchain-classic": "langchain-classic",
+ "langchain-core": "core",
+ "langchain-cli": "cli",
+ "langchain-model-profiles": "model-profiles",
+ "langchain-tests": "standard-tests",
+ "langchain-text-splitters": "text-splitters",
+ "langchain-chroma": "chroma",
+ "langchain-deepseek": "deepseek",
+ "langchain-exa": "exa",
+ "langchain-fireworks": "fireworks",
+ "langchain-groq": "groq",
+ "langchain-huggingface": "huggingface",
+ "langchain-mistralai": "mistralai",
+ "langchain-nomic": "nomic",
+ "langchain-ollama": "ollama",
+ "langchain-perplexity": "perplexity",
+ "langchain-prompty": "prompty",
+ "langchain-qdrant": "qdrant",
+ "langchain-xai": "xai",
+ };
+
+ // All possible package labels we manage
+ const allPackageLabels = Object.values(mapping);
+ const selectedLabels = [];
+
+ // Check if this is checkbox format (multiple selection)
+ const checkboxMatches = packageSection.match(/- \[x\]\s+([^\n\r]+)/gi);
+ if (checkboxMatches) {
+ // Handle checkbox format
+ for (const match of checkboxMatches) {
+ const packageName = match.replace(/- \[x\]\s+/i, '').trim();
+ const label = mapping[packageName];
+ if (label && !selectedLabels.includes(label)) {
+ selectedLabels.push(label);
+ }
+ }
+ } else {
+ // Handle dropdown format (single selection)
+ const label = mapping[packageSection];
+ if (label) {
+ selectedLabels.push(label);
+ }
+ }
+
+ // Get current issue labels
+ const issue = await github.rest.issues.get({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number
+ });
+
+ const currentLabels = issue.data.labels.map(label => label.name);
+ const currentPackageLabels = currentLabels.filter(label => allPackageLabels.includes(label));
+
+ // Determine labels to add and remove
+ const labelsToAdd = selectedLabels.filter(label => !currentPackageLabels.includes(label));
+ const labelsToRemove = currentPackageLabels.filter(label => !selectedLabels.includes(label));
+
+ // Add new labels
+ if (labelsToAdd.length > 0) {
+ await github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ labels: labelsToAdd
+ });
+ }
+
+ // Remove old labels
+ for (const label of labelsToRemove) {
+ await github.rest.issues.removeLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ name: label
+ });
+ }