jdalrymple / gitbeaker

🦊🧪 A comprehensive and typed Gitlab SDK for Node.js, Browsers, Deno and CLI
Other
1.55k stars 295 forks source link

Missing `statistics` when calling `Projects.show` with `{ statistics: true }` #3455

Closed NatoBoram closed 10 months ago

NatoBoram commented 10 months ago

Description

Steps to reproduce

const project = await client.Projects.show("NatoBoram/switcheroo", {
    statistics: true,
}).catch((e: GitbeakerError) => {
    console.error(`Couldn't get project: ${e.message}`)
    exit(1)
})

// Property 'statistics' comes from an index signature, so it must be accessed with ['statistics'].
console.debug("project statistics", project.statistics)

Expected behaviour

project statistics {
  commit_count: 167,
  storage_size: 459138266,
  repository_size: 289391998,
  wiki_size: 0,
  lfs_objects_size: 168066558,
  job_artifacts_size: 1679710,
  pipeline_artifacts_size: 0,
  packages_size: 0,
  snippets_size: 0,
  uploads_size: 21681491
}

Actual behaviour

Property 'statistics' comes from an index signature, so it must be accessed with ['statistics'].

Possible fixes

Checklist

jdalrymple commented 10 months ago

Does it return, but the typing is incorrect?

NatoBoram commented 10 months ago

Yep, exactly

jdalrymple commented 10 months ago

:rocket: Issue was released in 39.23.0 :rocket: