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: replace deprecated Tags API call #184

Conversation

nfriend
Copy link
Contributor

@nfriend nfriend commented Dec 8, 2020

What does this PR do?

Resolves #183 by updating all requests to:

https://example.gitlab.com/api/v4/project/<project id>/repository/tags<tag name>/release`

to instead call:

https://example.gitlab.com/api/v4/project/<project id>/releases`

The former is deprecated and will be removed in GitLab 14.0 (in May 2021); see https://gitlab.com/gitlab-org/gitlab/-/issues/290311.

This has the added benefit of simplifying the process of uploading assets. The Releases API allows a release to be created with assets in a single request, removing the need to create assets separately.

This change is backwards compatible (the Releases API has been available since GitLab 11.7 - when the releases feature itself was delivered) and shouldn't impact current users of this plugin.

Testing

I've tested this change in a test project on GitLab.com:

This commit replaces calls to the deprecated Tags API endpoints with
equivalent calls to the Releases API.
@nfriend nfriend force-pushed the nfriend-migrate-from-deprecated-api-endpoints branch from 3292c20 to 4c716c2 Compare December 8, 2020 14:12
@nfriend
Copy link
Contributor Author

nfriend commented Dec 8, 2020

@pvdlg Would you mind reviewing this PR? 🙏

I'm not sure if refactor: is the correct commit message prefix for this kind of change 🤔. Happy to change it if something else makes sense.

Also cc: @travi and @gr2m in case @pvdlg is still away.

@nfriend nfriend changed the title feat: replace deprecated Tags API call refactor: replace deprecated Tags API call Dec 8, 2020
@gr2m
Copy link
Member

gr2m commented Dec 8, 2020

I'm not sure if refactor: is the correct commit message prefix for this kind of change 🤔. Happy to change it if something else makes sense.

no worries, we can change the commit message with the squash & merge feature

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR looks good to me, tests look solid. Given that you work at GitLab and that you tested the changes I feel confident enough to go ahead and merge your PR.

Thank you for the great contribution!

@gr2m gr2m merged commit f82b613 into semantic-release:master Dec 8, 2020
@github-actions
Copy link

github-actions bot commented Dec 8, 2020

🎉 This PR is included in version 6.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nfriend nfriend changed the title refactor: replace deprecated Tags API call fix: replace deprecated Tags API call Dec 8, 2020
@nfriend
Copy link
Contributor Author

nfriend commented Dec 8, 2020

Awesome, thanks @gr2m!

@nfriend nfriend deleted the nfriend-migrate-from-deprecated-api-endpoints branch December 8, 2020 16:49
@nfriend nfriend mentioned this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from deprecated Tags API endpoint to Release API endpoint
2 participants