Skip to content

Handle repo label rename/delete#177

Open
MkDev11 wants to merge 1 commit into
entrius:testfrom
MkDev11:fix/repo-label-rename-delete
Open

Handle repo label rename/delete#177
MkDev11 wants to merge 1 commit into
entrius:testfrom
MkDev11:fix/repo-label-rename-delete

Conversation

@MkDev11

@MkDev11 MkDev11 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Handle repository-level label rename/delete webhooks so scoring-visible label state stays aligned with GitHub.

Root cause: label webhook events were skipped as repo-level CRUD, but miner responses derive current PR/issue labels from label_events through pr_labels_by_actor and issue_labels_by_actor. When a repo label was deleted or renamed, the mirror had no repo-wide transition to remove or rename the current per-target label rows.

This PR:

  • routes repo-level label events into LabelHandler
  • records unlabeled tombstones for currently applied labels when a repo label is deleted
  • records an old-name unlabeled plus new-name labeled transition when a repo label is renamed
  • preserves the original label actor on renamed labels so actor attribution remains stable
  • keeps parent pull_requests.labels and issues.labels arrays in sync

Out of scope: a full repo_labels catalog for color/description/default-label metadata.

Related Issues

Addresses the stale scoring-label state from #101.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • npm run format:check
  • npm run lint
  • npm run build
  • git diff --check

No automated test suite is configured in packages/das/package.json.

Checklist

  • I have read the Contributing Guide
  • Code builds without errors
  • New and existing tests pass (if applicable)
  • Documentation updated (if applicable)
  • No unnecessary dependencies added

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jun 8, 2026
@MkDev11

MkDev11 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@anderdc can you please review the pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant