Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deprecation warning in the comment command #143

Merged
merged 2 commits into from
Nov 23, 2023
Merged

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.

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

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.

@JounQin JounQin merged commit 40818dd into un-ts:main Nov 23, 2023
3 checks passed
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.

None yet

2 participants