-
-
Notifications
You must be signed in to change notification settings - Fork 849
Added rudimentary gitlab support #657
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
base: master
Are you sure you want to change the base?
Added rudimentary gitlab support #657
Conversation
This is really cool! Thanks! |
Hey @kreczko I'm having some big troubles to make it working, I've solved what was just a config problem on my side, and now I'm stuck with this: /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/objectified_hash.rb:26:in `method_missing': wrong number of arguments (given 2, expected 1) (ArgumentError)
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/error.rb:40:in `build_error_message'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/error.rb:16:in `initialize'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/request.rb:64:in `exception'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/request.rb:64:in `raise'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/request.rb:64:in `validate'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/request.rb:44:in `block (2 levels) in <class:Request>'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/gitlab-4.4.0/lib/gitlab/client/projects.rb:37:in `project_search'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/gitlab_fetcher.rb:48:in `find_project_id'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/gitlab_fetcher.rb:43:in `initialize'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/generator/generator.rb:38:in `new'
from /home/tmow/.rvm/gems/ruby-2.4.0/gems/github_changelog_generator-1.15.0.pre.rc/lib/github_changelog_generator/generator/generator.rb:38:in `initialize'
from /home/tmow/remmina_devel/github-changelog-generator/lib/github_changelog_generator.rb:29:in `new'
from /home/tmow/remmina_devel/github-changelog-generator/lib/github_changelog_generator.rb:29:in `initialize'
from ../github-changelog-generator/bin/github_changelog_generator:5:in `new'
from ../github-changelog-generator/bin/github_changelog_generator:5:in `<main>' Any ideas what I'm still missing? As API endpoint I've set this: GITLAB_API_ENDPOINT="https://gitlab.com/api/v4/projects/7153509" Is it correct? |
@antenore The way I've been testing it: github_changelog_generator --user ${GITLAB_USER} --project ${GITLAB_PROJECT} \
--github-site ${GITLAB_SITE} --github-api ${GITLAB_API} --verbose --gitlab with export CHANGELOG_GITHUB_TOKEN=<secret>
export GITLAB_SITE=https://gitlab.com
export GITLAB_API=https://gitlab.com/api/v4
export GITLAB_PROJECT=changelog-testrepo
export GITLAB_USER=kreczko |
Yay, @kreczko that's a super cool and really "wanted" feature, as I can see from the likes! :) And thanks, that you continue work on this branch. I check the code - looks very neat. Even with small improvements of legacy code. Let's add tests, at least of the basic things, based on your repo and I would be happy to support Gitlab! ❤️ |
Awesome, thanks @skywinder. I will try to add a set of tests in the coming weeks, time permitting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
I see all your effort - and it looks like a lot of work!
I made a ton of tiny comments, all of which are about naming and style, which make them easy to fix.
Oh, one thing which is always needed is man page (see its .md document) and README
usage sections for the functional additions.
Do you currently use the code in this PR to generate changelogs?
Good job, keep it up!
Following as I need this as well. 💯 |
…Generator::Helper
Add gitlab to rake task
- Added github_site for remote server - Added github_endpoint for remote server - Added gitlab for preparation of gitlab support added in (github-changelog-generator/github-changelog-generator#657) These settings will not be added by default. Only if added to .sync.yml They allow for GitHub Enterprise and Gitlab options down the road.
@kreczko Do you know if the labels are working properly? Here is the config:
|
@cdenneen I don't think so, I've not tested them |
* upstream/master: (60 commits) fix yml add funding file update readme Update the gem release procedure Add release instructions to CONTRIBUTING v1.15.0 Update changelog before 1.15.0 Fix Performance/Count in entry_spec CI: Use the shorter image names for less maint (github-changelog-generator#716) Fix Layout/SpaceAroundOperators in octo_fetcher Add newline at the end of the changelog Update changelog after 1.15.0 Update CHANGELOG for 1.15.0 Run rubocop in each build job Ignore vendor directory Fix a long standing Style/WordArray rubocop issue Fix warning about missing Performance/RegexpMatch copy Remove unneeded spaces in CONTRIBUTING add comment about TOC update TOC file ...
@NathanUrwin I know you were working on labels. Was this working for you? I haven't been able to track down where the issue is just yet. |
Merged Upstream
Hey @cdenneen 👋 From my initial usage, no I don't believe labels are supported at this time. I don't think it should be a deal breaker though. Label support can be added once the work from @kreczko has been merged. I'm going to get some work done on this MR this weekend. I'll make sure to keep everyone posted! |
@skywinder confirmed this is working besides the known items that can be added/improved later |
How's this going so far, did you manage to get started on it @NathanUrwin ? |
Hey @GlennM 👋 I appreciate you following up with me. I did get started on this, but nothing too substantial so it's all still local. I'll make sure to post my progress here soon. Thanks again! |
Looks great. I want to double-check this code and then merge it. In case if you don't want to wait: I can add you as owners there, @kreczko @NathanUrwin @cdenneen so we can even make a separate gem for GitLab for now. p.s. hmm. looks that we have to rename this project after this merge 😉 |
Hi @skywinder , have you been able to double-check it already? Thanks for your reply and stay healthy |
Any status on this? I would love to start using this in gitlab. |
I asked the same thing almost a year ago! #657 (comment) |
Because of this taking so long and needing a changelog, I had to look for another solution for my project (and I found one). The output will not 100% match the output mentioned in this request, though it works for my case. |
Hey all, I hope everyone and their loved ones have been safe and healthy. Unfortunately, I have not been able to work on this since I posted last. I do have a working solution for myself though, if anyone is interested in checking it out: https://github.com/NathanUrwin/gitlab-changelog-generator I've created a simple GitLab Release Generator CLI tool that uses the above generator. See https://github.com/NathanUrwin/gitlab-release-generator
|
Hey, @NathanUrwin that's awesome. I don't have the brain capacity and time to review this project, currently overloaded with other tasks. Would you like to integrate this into this project's single-solid-working solution with all these features that you mention? |
Any news or anything we could to to push things forward? This feature would be so great since there are barely any mature changelog/release note generators for Gitlab. |
I have completely given up on this project. It’s been more than two years. It’s sad. They should pass it off to someone else to maintain. |
This is my first attempt at adding Gitlab support to this very convenient project (fixes #419).
I took a copy of
octo_fetcher
and modified it to match the gitlab module.It is pretty much rough around the edges and I am looking for feedback to nail down the last bits.
Tested on both public gitlab.com repo and a private instance (older gitlab version), the former is a bit slow.
While I can get a nice looking CHANGELOG from a test repo, the entries are not right (see below).
Outstanding issues:
!
vs#
)closed_at
of issue and creation time for tag are pointing to the same minute.Example changelog for public project
Unreleased
Full Changelog
Closed issues:
v0.0.0 (2018-05-30)
Full Changelog
Closed issues:
Merged pull requests:
* This Changelog was automatically generated by github_changelog_generator