-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from isaacsanders/feat/add-approved-review-co…
…unt-to-the-version Adds approved review count to the version
- Loading branch information
Showing
2 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -35,13 +35,14 @@ func TestGet(t *testing.T) { | |
AccessToken: "oauthtoken", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{}, | ||
pullRequest: createTestPR(1, "master", false, false, 0, nil), | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
}, | ||
{ | ||
|
@@ -52,13 +53,14 @@ func TestGet(t *testing.T) { | |
GitCryptKey: "gitcryptkey", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{}, | ||
pullRequest: createTestPR(1, "master", false, false, 0, nil), | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
}, | ||
{ | ||
|
@@ -68,15 +70,16 @@ func TestGet(t *testing.T) { | |
AccessToken: "oauthtoken", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{ | ||
IntegrationTool: "rebase", | ||
}, | ||
pullRequest: createTestPR(1, "master", false, false, 0, nil), | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
}, | ||
{ | ||
|
@@ -86,15 +89,16 @@ func TestGet(t *testing.T) { | |
AccessToken: "oauthtoken", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{ | ||
IntegrationTool: "checkout", | ||
}, | ||
pullRequest: createTestPR(1, "master", false, false, 0, nil), | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
}, | ||
{ | ||
|
@@ -104,15 +108,16 @@ func TestGet(t *testing.T) { | |
AccessToken: "oauthtoken", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{ | ||
GitDepth: 2, | ||
}, | ||
pullRequest: createTestPR(1, "master", false, false, 0, nil), | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
}, | ||
{ | ||
|
@@ -122,9 +127,10 @@ func TestGet(t *testing.T) { | |
AccessToken: "oauthtoken", | ||
}, | ||
version: resource.Version{ | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
PR: "pr1", | ||
Commit: "commit1", | ||
CommittedDate: time.Time{}, | ||
ApprovedReviewCount: 0, | ||
}, | ||
parameters: resource.GetParameters{ | ||
ListChangedFiles: true, | ||
|
@@ -138,7 +144,7 @@ func TestGet(t *testing.T) { | |
Path: "Other.md", | ||
}, | ||
}, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z"}`, | ||
versionString: `{"pr":"pr1","commit":"commit1","committed":"0001-01-01T00:00:00Z","approved_review_count":0}`, | ||
metadataString: `[{"name":"pr","value":"1"},{"name":"title","value":"pr1 title"},{"name":"url","value":"pr1 url"},{"name":"head_name","value":"pr1"},{"name":"head_sha","value":"oid1"},{"name":"base_name","value":"master"},{"name":"base_sha","value":"sha"},{"name":"message","value":"commit message1"},{"name":"author","value":"login1"},{"name":"author_email","value":"[email protected]"}]`, | ||
filesString: "README.md\nOther.md\n", | ||
}, | ||
|
This file contains 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