Skip to content

Conversation

@alan910127
Copy link
Contributor

@alan910127 alan910127 commented Nov 23, 2023

Description

Fix the deprecation warning of using the showChanges API from @gitbeaker/rest.

Current Behavior

$ pnpm changesets-gitlab comment
DeprecationWarning: This endpoint was deprecated in Gitlab API 15.7 and will be removed in API v5. Please use the "allDiffs" function instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Expected Behavior

No warning was emitted.

Additional Information

I changed the type of the argument in the hasChangesetBeenAdded function from the inferred type

ReturnType<MergeRequests['allDiffs']>

to the concrete type

Promise<MergeRequestDiffSchema[]>

because I think checking something we don't really use (paginated or not) does not make a lot of sense.

@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2023

🦋 Changeset detected

Latest commit: 86df78d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
changesets-gitlab Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 23, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@JounQin
Copy link
Member

JounQin commented Nov 23, 2023

You're on fire! Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants