-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
1.3
-
None
-
2
-
False
-
-
False
-
-
In some endpoints, we accept two different query params: `repoUrl` and `defaultBranch`.
To prevent potential mistakes, the default branch should be determined by sending a request to the GH API for the repo URL specified.
NOTE: While this would incur a slight performance penalty, in most cases, the default branch will not change so often. So GH would probably always return an HTTP 304 status code with no response body, and we would be reading the response from the cache.
Acceptance Criteria:
Since we have the ability to support multiple API versions (based on an api-version header in the request):
- Mark the defaultBranch as deprecated in the v1 (default) API version, but it should still work in v1
- Ignore this query parameter if api-version is v2 (which makes it effectively removed)