Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix(issue-guard): accept lowercase checkboxes and harden labeling

cpackerf1800c83a2cd
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 3256970b2..73900ffed 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -14,12 +14,12 @@ body:
attributes:
label: AI Disclosure
description: |
- We require all issue authors to disclose AI usage per our [AI Policy](../blob/main/AI_POLICY.md).
+ We require all issue authors to disclose AI usage per our [AI Policy](https://github.com/letta-ai/letta/blob/main/AI_POLICY.md).
Check **all** that apply.
options:
- label: This issue was written entirely by a human
- label: This issue was written with AI assistance (e.g. Copilot, ChatGPT, Claude) and **reviewed and edited by a human**
- - label: I have read the [AI Policy](../blob/main/AI_POLICY.md) and agree to its terms
+ - label: I have read the [AI Policy](https://github.com/letta-ai/letta/blob/main/AI_POLICY.md) and agree to its terms
required: true
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 5daa2bcbb..a63104d6c 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -14,12 +14,12 @@ body:
attributes:
label: AI Disclosure
description: |
- We require all issue authors to disclose AI usage per our [AI Policy](../blob/main/AI_POLICY.md).
+ We require all issue authors to disclose AI usage per our [AI Policy](https://github.com/letta-ai/letta/blob/main/AI_POLICY.md).
Check **all** that apply.
options:
- label: This issue was written entirely by a human
- label: This issue was written with AI assistance (e.g. Copilot, ChatGPT, Claude) and **reviewed and edited by a human**
- - label: I have read the [AI Policy](../blob/main/AI_POLICY.md) and agree to its terms
+ - label: I have read the [AI Policy](https://github.com/letta-ai/letta/blob/main/AI_POLICY.md) and agree to its terms
required: true
validations:
required: true
diff --git a/.github/workflows/issue-guard.yml b/.github/workflows/issue-guard.yml
index 5fcddb452..22a3a3171 100644
--- a/.github/workflows/issue-guard.yml
+++ b/.github/workflows/issue-guard.yml
@@ -87,15 +87,15 @@ jobs:
}
// Check 2: AI disclosure checkbox (the required one: "I have read the AI Policy")
- // YAML form checkboxes render as "- [X] text" when checked
- const aiPolicyChecked = /- \[X\] I have read the \[AI Policy\]/.test(body);
+ // YAML form checkboxes render as "- [x] text" when checked.
+ const aiPolicyChecked = /- \[[xX]\] I have read the \[AI Policy\]/.test(body);
if (!aiPolicyChecked) {
failures.push('AI Policy acknowledgment checkbox not checked');
}
// Check 3: At least one of the two disclosure options is checked
- const humanWritten = /- \[X\] This issue was written entirely by a human/.test(body);
- const aiAssisted = /- \[X\] This issue was written with AI assistance/.test(body);
+ const humanWritten = /- \[[xX]\] This issue was written entirely by a human/.test(body);
+ const aiAssisted = /- \[[xX]\] This issue was written with AI assistance/.test(body);
if (!humanWritten && !aiAssisted) {
failures.push('No AI disclosure option selected (must indicate whether issue is human-written or AI-assisted)');
}
@@ -130,12 +130,26 @@ jobs:
body: comment,
});
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: issue.number,
- labels: ['spam'],
- });
+ // Best-effort labeling: prefer "spam", then fall back to labels
+ // that commonly exist on repos.
+ let labelApplied = false;
+ for (const label of ['spam', 'auto-closed', 'invalid']) {
+ try {
+ await github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: issue.number,
+ labels: [label],
+ });
+ labelApplied = true;
+ break;
+ } catch (e) {
+ console.log(`Label '${label}' unavailable or failed to apply, trying next`);
+ }
+ }
+ if (!labelApplied) {
+ console.log('No close label could be applied; continuing with close/lock');
+ }
await github.rest.issues.update({
owner: context.repo.owner,