mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Only disable loadPropertiesFromApi on GHES
This commit is contained in:
@@ -51,7 +51,7 @@ test("loadPropertiesFromApi throws if response data contains unexpected objects"
|
||||
);
|
||||
});
|
||||
|
||||
test("loadPropertiesFromApi returns empty object if not on dotcom", async (t) => {
|
||||
test("loadPropertiesFromApi returns empty object if on GHES", async (t) => {
|
||||
sinon.stub(api, "getRepositoryProperties").resolves({
|
||||
headers: {},
|
||||
status: 200,
|
||||
|
||||
@@ -44,7 +44,7 @@ export async function loadPropertiesFromApi(
|
||||
): Promise<RepositoryProperties> {
|
||||
// TODO: To be safe for now; later we should replace this with a version check once we know
|
||||
// which version of GHES we expect this to be supported by.
|
||||
if (gitHubVersion.type !== GitHubVariant.DOTCOM) {
|
||||
if (gitHubVersion.type === GitHubVariant.GHES) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user