Skip to content

interface for change provider and update request to include uri#67

Merged
rashmi-prithyani merged 5 commits into
mainfrom
changeProviderInterface
Feb 25, 2026
Merged

interface for change provider and update request to include uri#67
rashmi-prithyani merged 5 commits into
mainfrom
changeProviderInterface

Conversation

@rashmi-prithyani
Copy link
Copy Markdown
Contributor

@rashmi-prithyani rashmi-prithyani commented Feb 25, 2026

Summary

This PR introduces the ChangeProvider extension interface and refactors the Change model to use URIs instead of simple IDs.

Changes

  1. New ChangeProvider Interface (extension/change_provider/)
    Added ChangeProvider interface to fetch changed files from external code review providers (GitHub, GitLab, Phabricator)
    Interface method: Get(ctx context.Context, uris []string) ([]FileChange, error)
    Returns list of files with their change status (added, modified, deleted)
    Provider implementations will be added in subsequent PRs (e.g., extension/change_provider/github/)
  2. Refactored Change Model: IDs → URIs
    Changed Change.ids to Change.uris throughout the codebase
    URI format is provider-specific and self-contained:
    GitHub: owner/repo/pr_number@commit_hash (e.g., uber/submitqueue/123@abc123defg)
    Phabricator: revision_id@commit_hash (e.g., D12345@abc123def)
    Updated proto, entity, storage, controllers, and tests
  3. Database schema change:
  • change_ids column renamed to change_uri
  • removed change_source field.

Test Plan

unit tests and ci

Issues

@rashmi-prithyani rashmi-prithyani marked this pull request as ready for review February 25, 2026 00:19
Comment thread entity/request.go Outdated
Comment thread entity/request.go Outdated
Comment thread extension/change_provider/change_provider.go Outdated
Comment thread extension/change_provider/change_provider.go Outdated
Comment thread extension/change_provider/change_provider.go Outdated
Comment thread gateway/proto/gateway.proto Outdated
Comment thread entity/request.go
Comment thread entity/request_test.go Outdated
Comment thread extension/change_provider/change_provider.go Outdated
Comment thread gateway/controller/land.go Outdated
@rashmi-prithyani rashmi-prithyani force-pushed the changeProviderInterface branch 2 times, most recently from eeeafdd to fb4704a Compare February 25, 2026 08:46
Comment thread entity/request.go
Comment thread entity/request.go
Comment thread extension/changeprovider/change_provider.go
Comment thread extension/changeprovider/change_provider.go Outdated
Comment thread extension/changeprovider/change_provider.go Outdated
@rashmi-prithyani rashmi-prithyani merged commit 9a29b3c into main Feb 25, 2026
8 checks passed
@behinddwalls behinddwalls deleted the changeProviderInterface branch June 2, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants