Fix how to construct URLs for finding all the commits related to a

github file

The existing logic sets the creation time of a github file to the time
when the github repository was created.
The fix sets the creation time of a github file to the time when the
file was created.
This commit is contained in:
Haiyan Meng
2019-12-19 12:30:02 -08:00
parent 837df94d67
commit ee659a70e4
2 changed files with 14 additions and 14 deletions

View File

@@ -101,7 +101,7 @@ func TestGithubSearchQuery(t *testing.T) {
"examples/helloWorld/kustomization.yaml?per_page=100",
expectedCommitsQuery: "https://api.github.com/repos/kubernetes-sigs/kustomize/commits?" +
"q=path:examples/helloWorld/kustomization.yaml&per_page=100",
"path=examples%2FhelloWorld%2Fkustomization.yaml&per_page=100",
},
{
rc: RequestConfig{
@@ -121,7 +121,7 @@ func TestGithubSearchQuery(t *testing.T) {
"examples%201/helloWorld/kustomization.yaml?per_page=100",
expectedCommitsQuery: "https://api.github.com/repos/kubernetes-sigs/kustomize/commits?" +
"q=path:examples%201/helloWorld/kustomization.yaml&per_page=100",
"path=examples+1%2FhelloWorld%2Fkustomization.yaml&per_page=100",
},
}