I’m trying to get the commits within a certain time range that have files that have been changed in a certain path, but what I’m seeing is a bit perplexing.
The file [repo root]/some/path/to/edited/file.txt has been changed in a given commit.
When I use the API and pass the path as some/path/to/edited, I don’t get back any commits. When I instead pass some/path/to, I get back the expected commit that includes the change to file.txt.
The full curl command I’m using that’s getting results is:
curl -X GET -H “Content-Type: application/vnd.github.v3+json” -H “Authorization: token [some token here]” “https://github.internal.myorg.com/api/v3/repos/myorg/myrepo/commits?since=2021-11-10T17:48:22Z&until=2021-11-10T19:45:43Z&path=some%2Fpath%2Fto&per_page=100&page=0”
The only thing I’ve changed that breaks the results is add %2Fedited to the end of the path.
Are there some settings somewhere that could make specific directories searchable with that API endpoint? I just really can’t think of anything else that could be causing this problem.