Open arsdehnel opened 1 month ago
Description
Trying to use this method in my code:
await gitlab.EpicLabelEvents.all( 729, epic.id );
And if gives me a 404. I used got directly and it worked:
got
await got( `https://${ process.env.GITLAB_HOSTNAME }/api/v4/groups/729/epics/${ epic.id }/resource_label_events`, { method: 'GET', headers: { 'PRIVATE-TOKEN': process.env.GITLAB_API_TOKEN, }, } ).json();
Looking at https://github.com/jdalrymple/gitbeaker/blob/main/packages/core/src/resources/EpicLabelEvents.ts#L31 I think the issue is that the second argument to super() should be plural. Right now it is this:
super()
super('groups', 'epic', options);
And I think it should be
super('groups', 'epics', options);
Steps to reproduce
I didn't create a reproduction outside of my private hosted GitLab because I think it's just a typo.
Expected behaviour
That method works the same way as my got version.
Actual behaviour
Returns 404
Possible fixes
Add an s to the second argument.
s
Checklist
I made https://github.com/jdalrymple/gitbeaker/pull/3594 that I think should address it. I didn't pull it down locally though, just made the change in the online editor.
Description
Trying to use this method in my code:
And if gives me a 404. I used
got
directly and it worked:Looking at https://github.com/jdalrymple/gitbeaker/blob/main/packages/core/src/resources/EpicLabelEvents.ts#L31 I think the issue is that the second argument to
super()
should be plural. Right now it is this:And I think it should be
Steps to reproduce
I didn't create a reproduction outside of my private hosted GitLab because I think it's just a typo.
Expected behaviour
That method works the same way as my
got
version.Actual behaviour
Returns 404
Possible fixes
Add an
s
to the second argument.Checklist