jdalrymple / gitbeaker

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

ServiceAccounts and GroupServiceAccounts do not permit custom username or name attributes #3559

Closed Scrumplex closed 2 months ago

Scrumplex commented 3 months ago

Description

Both Groups#Create Service Account User and Users#Create Service Account User allow you to customize the username and display name of a service account. Currently, the type definitions of these in Gitbeaker do not expose these options:

https://github.com/jdalrymple/gitbeaker/blob/1431e845353d73026878ab554a0deb379d08ec68/packages/core/src/resources/ServiceAccounts.ts#L16-L20

https://github.com/jdalrymple/gitbeaker/blob/1431e845353d73026878ab554a0deb379d08ec68/packages/core/src/resources/GroupServiceAccounts.ts#L15-L24

Steps to reproduce

gitlab.ServiceAccounts.create({
  name: "foo bar Bot",
  username: "service_account_foobar"
});

Expected behaviour

I am not supposed to get a TypeScript type error

Actual behaviour

I am getting a TypeScript type error

Possible fixes

Add the options as a type! ^^

Checklist