Compare commits

...

8 Commits

Author SHA1 Message Date
Iñigo Beitia Arévalo
c0a28eede9 Add workflow configuration 2025-09-03 23:25:19 +00:00
GitHub Actions
81f65bea8a chore: Update CHANGELOG.md 2025-08-29 21:24:20 +00:00
Boris Cherny
dc8f77c7ef Merge pull request #5881 from anthropics/boris/iuni
feat: update dedupe backfill script to filter by issue number
2025-08-28 16:26:35 -07:00
Boris Cherny
786259a00c Merge pull request #6387 from anthropics/boris/oauy
Add issue close event trigger to log-issue-events workflow
2025-08-28 16:24:42 -07:00
GitHub Actions
8e679e75f7 chore: Update CHANGELOG.md 2025-08-27 21:53:37 +00:00
ant-kurt
87560460bc Merge pull request #6684 from anthropics/feat/devcontainer-claude-extension-and-vscode-urls
feat(devcontainer): add Claude Code extension and VS Code marketplace URLs
2025-08-27 14:30:12 -07:00
Boris Cherny
d820a4dbd7 Add issue close event trigger to log-issue-events workflow
Updates the GitHub workflow to also trigger when issues are closed,
expanding event tracking beyond just issue creation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-22 18:30:52 -07:00
Boris Cherny
20ba9a34a5 feat: update dedupe backfill script to filter by issue number
Replace date-based filtering with issue number filtering to only process issues older than #4050. This provides more precise control over which issues are processed for duplicate detection backfill.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 09:54:40 -07:00
4 changed files with 98 additions and 12 deletions

59
.github/workflows/issue-notify.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: Issue Notification
on:
issues:
types: [opened]
permissions:
issues: read
jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Send notification
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
ISSUE_LABELS: ${{ toJSON(github.event.issue.labels) }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_CREATED_AT: ${{ github.event.issue.created_at }}
REPOSITORY: ${{ github.repository }}
DISPATCH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN_CLAUDE_CODE }}
DISPATCH_ENDPOINT: ${{ secrets.DISPATCH_ENDPOINT }}
run: |
if [ -z "$DISPATCH_TOKEN" ] || [ -z "$DISPATCH_ENDPOINT" ]; then
echo "Dispatch configuration not complete, skipping notification"
exit 0
fi
# Prepare payload with issue metadata
PAYLOAD=$(cat <<EOF
{
"event_type": "issue_event",
"client_payload": {
"source_repo": "$REPOSITORY",
"issue_number": "$ISSUE_NUMBER",
"issue_title": $(echo "$ISSUE_TITLE" | jq -Rs .),
"issue_body": $(echo "$ISSUE_BODY" | jq -Rs .),
"issue_author": "$ISSUE_AUTHOR",
"issue_labels": $ISSUE_LABELS,
"issue_url": "$ISSUE_URL",
"issue_created_at": "$ISSUE_CREATED_AT",
"timestamp": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
}
}
EOF
)
# Send notification to configured endpoint
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $DISPATCH_TOKEN" \
-H "Content-Type: application/json" \
"$DISPATCH_ENDPOINT" \
-d "$PAYLOAD" \
--fail-with-body || echo "Notification sent"

View File

@@ -2,7 +2,7 @@ name: Log Issue Events to Statsig
on:
issues:
types: [opened]
types: [opened, closed]
jobs:
log-to-statsig:

View File

@@ -1,8 +1,20 @@
# Changelog
## 1.0.97
- Settings: /doctor now validates permission rule syntax and suggests corrections
## 1.0.94
- Vertex: add support for global endpoints for supported models
- /memory command now allows direct editing of all imported memory files
- SDK: Add custom tools as callbacks
- Added /todos command to list current todo items
## 1.0.93
- Windows: Add alt + v shortcut for pasting images from clipboard
- Support NO_PROXY environment variable to bypass proxy for specified hostnames and IPs
## 1.0.90

View File

@@ -82,46 +82,61 @@ Usage:
Environment Variables:
GITHUB_TOKEN - GitHub personal access token with repo and actions permissions (required)
DRY_RUN - Set to "false" to actually trigger workflows (default: true for safety)
DAYS_BACK - How many days back to look for old issues (default: 90)`);
MAX_ISSUE_NUMBER - Only process issues with numbers less than this value (default: 4050)`);
}
console.log("[DEBUG] GitHub token found");
const owner = "anthropics";
const repo = "claude-code";
const dryRun = process.env.DRY_RUN !== "false";
const daysBack = parseInt(process.env.DAYS_BACK || "90", 10);
const maxIssueNumber = parseInt(process.env.MAX_ISSUE_NUMBER || "4050", 10);
const minIssueNumber = parseInt(process.env.MIN_ISSUE_NUMBER || "1", 10);
console.log(`[DEBUG] Repository: ${owner}/${repo}`);
console.log(`[DEBUG] Dry run mode: ${dryRun}`);
console.log(`[DEBUG] Looking back ${daysBack} days`);
console.log(`[DEBUG] Looking at issues between #${minIssueNumber} and #${maxIssueNumber}`);
const cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() - daysBack);
console.log(`[DEBUG] Fetching issues created since ${cutoffDate.toISOString()}...`);
console.log(`[DEBUG] Fetching issues between #${minIssueNumber} and #${maxIssueNumber}...`);
const allIssues: GitHubIssue[] = [];
let page = 1;
const perPage = 100;
while (true) {
const pageIssues: GitHubIssue[] = await githubRequest(
`/repos/${owner}/${repo}/issues?state=all&per_page=${perPage}&page=${page}&since=${cutoffDate.toISOString()}`,
`/repos/${owner}/${repo}/issues?state=all&per_page=${perPage}&page=${page}&sort=created&direction=desc`,
token
);
if (pageIssues.length === 0) break;
allIssues.push(...pageIssues);
// Filter to only include issues within the specified range
const filteredIssues = pageIssues.filter(issue =>
issue.number >= minIssueNumber && issue.number < maxIssueNumber
);
allIssues.push(...filteredIssues);
// If the oldest issue in this page is still above our minimum, we need to continue
// but if the oldest issue is below our minimum, we can stop
const oldestIssueInPage = pageIssues[pageIssues.length - 1];
if (oldestIssueInPage && oldestIssueInPage.number >= maxIssueNumber) {
console.log(`[DEBUG] Oldest issue in page #${page} is #${oldestIssueInPage.number}, continuing...`);
} else if (oldestIssueInPage && oldestIssueInPage.number < minIssueNumber) {
console.log(`[DEBUG] Oldest issue in page #${page} is #${oldestIssueInPage.number}, below minimum, stopping`);
break;
} else if (filteredIssues.length === 0 && pageIssues.length > 0) {
console.log(`[DEBUG] No issues in page #${page} are in range #${minIssueNumber}-#${maxIssueNumber}, continuing...`);
}
page++;
// Safety limit to avoid infinite loops
if (page > 100) {
if (page > 200) {
console.log("[DEBUG] Reached page limit, stopping pagination");
break;
}
}
console.log(`[DEBUG] Found ${allIssues.length} issues from the last ${daysBack} days`);
console.log(`[DEBUG] Found ${allIssues.length} issues between #${minIssueNumber} and #${maxIssueNumber}`);
let processedCount = 0;
let candidateCount = 0;