-
Notifications
You must be signed in to change notification settings - Fork 0
interface for change provider and update request to include uri #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7b895a1
interface for change provider and update request to include uri
rashmi-prithyani 1285c4c
fix tests
rashmi-prithyani 802eae0
code review changes
rashmi-prithyani ac67b09
review changes part 2
rashmi-prithyani c92e97c
break uri string into uris list
rashmi-prithyani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| load("@rules_go//go:def.bzl", "go_library") | ||
|
|
||
| go_library( | ||
| name = "changeprovider", | ||
| srcs = ["change_provider.go"], | ||
| importpath = "github.com/uber/submitqueue/extension/changeprovider", | ||
| visibility = ["//visibility:public"], | ||
| deps = ["//entity"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package changeprovider | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "github.com/uber/submitqueue/entity" | ||
| ) | ||
|
|
||
| // User represents the author of a change. | ||
| type User struct { | ||
| // Name is the display name of the user. | ||
| Name string | ||
| // Email is the email address of the user. | ||
| Email string | ||
| } | ||
|
|
||
| // ChangedFile represents a single file modification in a change. | ||
| type ChangedFile struct { | ||
| // Path is the file path relative to the repository root. | ||
| Path string | ||
| // Patch is the diff patch content for this file. | ||
|
behinddwalls marked this conversation as resolved.
|
||
| Patch string | ||
| // LinesAdded is the number of lines added in this file. | ||
| LinesAdded int | ||
| // LinesDeleted is the number of lines deleted in this file. | ||
| LinesDeleted int | ||
| // LinesModified is the number of lines modified in this file. | ||
| LinesModified int | ||
| } | ||
|
|
||
| // ChangeInfo contains metadata and file changes for a code change. | ||
| type ChangeInfo struct { | ||
| // ID is the change identifier (e.g., "PR: uber-code/go-code/1" or "diff: uber-code/go-code/D1"). | ||
| ID string | ||
| // User is the author of the change. | ||
| User User | ||
| // ChangedFiles is the list of files modified in this change. Order is unspecified. | ||
| ChangedFiles []ChangedFile | ||
| } | ||
|
|
||
| // ChangeProvider fetches change metadata from external systems | ||
| // Each implementation is configured for a specific provider (GitHub, GitLab, Phabricator). | ||
| type ChangeProvider interface { | ||
| // Get retrieves change information for the provided Change. | ||
| // Returns the change info containing metadata and file changes. | ||
| Get(ctx context.Context, change entity.Change) (ChangeInfo, error) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.