un-ts / changesets-gitlab

GitLab CI cli for changesets like its GitHub Action.
https://opencollective.com/unts/projects/changesets-gitlab
MIT License
86 stars 33 forks source link

fix: deprecation warning in the `comment` command #143

Closed alan910127 closed 9 months ago

alan910127 commented 9 months ago

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[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 86df78dba28eee6ebfa702f6310d414170be752e

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[bot] commented 9 months ago

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 commented 9 months ago

You're on fire! Thanks very much.