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: gitlab release creation #205

Merged

Conversation

oroce
Copy link
Contributor

@oroce oroce commented Jun 11, 2021

Creating release on repository/tags endpoint has been deprecated and marked for removal on gitlab.
This causes non-zero exit codes, therefore, breaking automatic CI pipelines.

Fixes #204

ps: I removed the Release prefix, I think it wasn't used previously (at least I haven't seen it in our projects where a couple of hundreds of releases were created by this module).

update: I had to remove packages/conventional-tidelift-releaser/changelog.md (not to be confused with CHANGELOG.md), which was empty file I guess accidentally pushed, but the default OSX file system is case insensitive)

@oroce oroce force-pushed the fix/gitlab-release-creation branch from 77fda1f to 4e4e125 Compare June 11, 2021 09:13
@@ -73,14 +73,14 @@ function conventionalGitlabReleaser (auth, changelogOpts, context, gitRawCommits
return
}

const url = `projects/${escape(context.owner + `/` + context.repository)}/repository/tags`
const url = `projects/${escape(context.owner + `/` + context.repository)}/releases`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@oroce
Copy link
Contributor Author

oroce commented Jun 16, 2021

@hutson could you take a look at this?

Due to the Gitlab API deprecation, this issue became a blocker for us, we have to manually tag new releases since then.

@hutson
Copy link
Contributor

hutson commented Jun 17, 2021

@oroce generally this change looks good.

I do have a few requests if you would be willing to make a few changes:

Since this Pull Request changes the API end-point, and increases the minimum version of GitLab required, I will need to release the change as a new major version.

@hutson hutson self-assigned this Jun 17, 2021
@hutson hutson added platform::gitlab Issues related to GitLab platform. type::refactor A modification to a project's repository that will not change the behavior for downstream consumers. labels Jun 17, 2021
@oroce oroce force-pushed the fix/gitlab-release-creation branch 3 times, most recently from 31748e6 to 68f6fbb Compare June 17, 2021 08:40
@oroce
Copy link
Contributor Author

oroce commented Jun 17, 2021

@hutson thanks for the detailed list, I did all of them.

To be honest the tidelift CHANGELOG.md and changelog.md issue on mac caused some issues to be able to rebase the commits.

At the end I had to delete both of the CHANGELOGs. The cleanest solution would be

  • either resolve that issue in master and then rebase this PR
  • merge this PR then regenerate the tidelift changelog in master

Please let me know if I can help.

@hutson
Copy link
Contributor

hutson commented Jun 17, 2021

either resolve that issue in master and then rebase this PR

I removed the changelog.md file from the default branch.

Can you rebase please?

At that point I believe we can get this merged and released.

@oroce oroce force-pushed the fix/gitlab-release-creation branch from 68f6fbb to da4cfcb Compare June 17, 2021 13:26
Creating release on `repository/tags` endpoint has been deprecated and marked for removal on gitlab.
This causes non-zero exit codes, therefore, breaking automatic CI pipelines. Fixes conventional-changelog#204

BREAKING CHANGE: in Gitlab 14 the release notes creation via tags api is removed. It can be done with releases api, the minimum Gitlab version changed to 11.11.
Signed-off-by: Robert Oroszi <robert@oroszi.net>
@oroce oroce force-pushed the fix/gitlab-release-creation branch from da4cfcb to 19da7d1 Compare June 17, 2021 13:27
@oroce
Copy link
Contributor Author

oroce commented Jun 17, 2021

Thanks a lot. I rebased.
The PR should be clean now.

@hutson hutson merged commit 3fc007b into conventional-changelog:master Jun 18, 2021
@hutson
Copy link
Contributor

hutson commented Jun 18, 2021

@conventional-changelog/releaser-tools I do not have access to the npm packages to publish new versions. Can one of you please run npm run release to publish new versions with the changes from this pull request?

Here's what you should see:

> lerna publish --conventional-commits -m 'chore(release): publish'

lerna info version 2.11.0
lerna info versioning independent
lerna info Checking for updated packages...
lerna info Comparing with conventional-github-releaser@3.1.5.
lerna info Checking for prereleased packages...

Changes:
 - conventional-gitlab-releaser: 4.0.3 => 5.0.0
 - conventional-tidelift-releaser: 1.0.2 => 1.0.3

@treyshedrick
Copy link

Is there an ETA on when the npm package will be published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform::gitlab Issues related to GitLab platform. type::refactor A modification to a project's repository that will not change the behavior for downstream consumers.
3 participants