Skip to content

Add gitlab releases to version#2073

Merged
evocateur merged 1 commit into
lerna:masterfrom
lbennett-stacki:add-gitlab-releases-to-version
Jun 9, 2019
Merged

Add gitlab releases to version#2073
evocateur merged 1 commit into
lerna:masterfrom
lbennett-stacki:add-gitlab-releases-to-version

Conversation

@lbennett-stacki

@lbennett-stacki lbennett-stacki commented May 6, 2019

Copy link
Copy Markdown
Contributor
  • Deprecate version --github-release in favour of version --create-release=[gitlab|github].
  • Add GitLabClient w/ createReleases method to create releases using GitLab API.
  • Add createRelease function to DRY GitLab and GitHub releases.

Description

I think it's pretty much all there. Let me know if you need any more info.

Links

https://docs.gitlab.com/ee/user/project/releases/index.html
https://docs.gitlab.com/ee/api/releases/index.html

Screenshot

Screenshot 2019-05-06 at 04 11 37

Motivation and Context

I use https://gitlab.com and self-hosted GitLab instances to host my favouritestest repos. I would like the releases feature to work for them.

How Has This Been Tested?

There are tests for deprecation, GitLabClient and --create-release=gitlab. (--create-release=github is tested in existing --github-release tests)

Tested locally with:

$ GL_TOKEN=[TOKEN] npx lerna version --create-release=gitlab --conventional-commits
# AND
$ GL_TOKEN=[TOKEN] GL_API_URL="https://gitlab.selfhosted.io/api/v4" npx lerna version --create-release=gitlab --conventional-commits

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Note: --github-release has been appropriately deprecated.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Comment thread commands/version/lib/Releases.js Outdated
Comment thread commands/version/lib/Releases.js Outdated
@lbennett-stacki lbennett-stacki changed the title Add gitlab releases to version WIP: Add gitlab releases to version May 6, 2019

@evocateur evocateur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A good start, and I believe this has great promise. Thanks for your patience!

Comment thread commands/version/package.json
Comment thread commands/version/lib/Releases.js Outdated
Comment thread utils/gitlab-client/index.js Outdated
Comment thread utils/gitlab-client/lib/GitLabClient.js Outdated
Comment thread utils/gitlab-client/lib/GitLabClient.js Outdated
Comment thread commands/version/lib/Releases.js Outdated
Comment thread commands/version/command.js Outdated
@evocateur evocateur added the WIP label May 11, 2019
@lbennett-stacki
lbennett-stacki force-pushed the add-gitlab-releases-to-version branch from bba7c70 to 14f3237 Compare May 12, 2019 05:01

@lbennett-stacki lbennett-stacki left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've resolved that first pass. I will try to get to tests and docs updates over the next few days.

Comment thread commands/version/command.js Outdated

@evocateur evocateur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good progress, thanks for sticking with it!

Comment thread package-lock.json
Comment thread utils/gitlab-client/package-lock.json Outdated
Comment thread core/project/lib/deprecate-config.js Outdated
Comment thread core/project/lib/deprecate-config.js Outdated
Comment thread utils/gitlab-client/lib/GitLabClient.js Outdated
Comment thread commands/version/README.md Outdated
Comment thread commands/version/README.md Outdated
Comment thread commands/version/README.md Outdated
Comment thread commands/version/README.md Outdated
Comment thread commands/version/__tests__/version-github-release.test.js Outdated
@lbennett-stacki
lbennett-stacki force-pushed the add-gitlab-releases-to-version branch 2 times, most recently from 73812f0 to 78a3764 Compare May 25, 2019 03:56
Deprecates --github-release, replacing with --create-release.
Add GitLabClient with createRelease method, and OctokitAdapter
to expose through an octokit interface.
Add createRelease factory function to DRY GitHub/GitLab releases.
@lbennett-stacki
lbennett-stacki force-pushed the add-gitlab-releases-to-version branch from 78a3764 to bba2d33 Compare May 25, 2019 04:34
@lbennett-stacki lbennett-stacki changed the title WIP: Add gitlab releases to version Add gitlab releases to version May 25, 2019
@lbennett-stacki

Copy link
Copy Markdown
Contributor Author

@evocateur ready for another pass :) Thanks for your help so far.

@wldcordeiro

Copy link
Copy Markdown

🎉 This looks so amazing thanks for doing this @LukeeeeBennett I had seen this feature and made the request and hadn't yet found the time to try this.

Comment thread commands/version/README.md

@evocateur evocateur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome, thanks for your patience!

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.

3 participants