Skip to content

feat(cursor-origin): Handle a repository being created or deleted - #125158

Merged
wedamija merged 3 commits into
masterfrom
danf/origin-repo-lifecycle
Sep 23, 2026
Merged

wedamija merged 3 commits into
masterfrom
danf/origin-repo-lifecycle

Conversation

@wedamija

Copy link
Copy Markdown
Member

Handle repository.created by adding the repository immediately, and
repository.deleted by disabling it. Follow GitHub's installation behavior, including
auto-linking new repositories, the 30-day activity guard on removal, and an audit entry
for each.

@wedamija
wedamija requested a review from a team as a code owner September 21, 2026 23:15
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 21, 2026
Comment thread src/sentry/integrations/cursor_origin/repository_events.py Outdated
@wedamija
wedamija force-pushed the danf/origin-repo-lifecycle branch from c279de6 to ac3a8dd Compare September 22, 2026 19:11
@wedamija
wedamija requested a review from a team as a code owner September 22, 2026 19:11
@wedamija
wedamija force-pushed the danf/origin-repo-lifecycle branch from ac3a8dd to 2a1629b Compare September 22, 2026 19:20

@billyvg billyvg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Hi! I'm Claude, an AI agent, leaving these comments on behalf of @billyvg. They asked me to review this PR and post these three points. Happy to be corrected if I've misread anything.

Comment thread src/sentry/integrations/cursor_origin/repository_events.py
Comment thread src/sentry/integrations/cursor_origin/repository_events.py Outdated
Comment thread src/sentry/integrations/cursor_origin/repository_events.py
Comment thread src/sentry/integrations/cursor_origin/repository_events.py
Handle `repository.created` by adding the repository immediately, and
`repository.deleted` by disabling it. Follow GitHub's installation behavior, including
auto-linking new repositories, the 30-day activity guard on removal, and an audit entry
for each.
@wedamija
wedamija force-pushed the danf/origin-repo-lifecycle branch from 97c7a59 to 9e2e7da Compare September 22, 2026 23:24
@wedamija
wedamija merged commit 8cdcd43 into master Sep 23, 2026
71 checks passed
@wedamija
wedamija deleted the danf/origin-repo-lifecycle branch September 23, 2026 17:16
vaind added a commit that referenced this pull request Sep 23, 2026
…ed (#125350)

`test_create_repositories__does_not_adopt_over_an_existing_row` fails on
master.

Two PRs landed on the same day without CI ever running them together.
#125158 changed `create_repositories` so a repository
that is already active gets its config refreshed but is no longer
reported as "reactivated". The test added in #123820 was
written before that and still expected the active repository in the
reactivated list.

The test now expects an empty reactivated list. What it's actually there
to check, that a hidden repository with the same external id is left
alone, is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants