Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kreczko wants to merge29 commits intogithub-changelog-generator:master
base:master
Choose a base branch
Loading
fromkreczko:kreczko-issue-419

Conversation

kreczko
Copy link

@kreczkokreczko commentedMay 30, 2018
edited by olleolleolle
Loading

This is my first attempt at adding Gitlab support to this very convenient project (fixes#419).
I took a copy ofocto_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.comrepo 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:

  • the notation of PRs is different gitlab ↔ github (! vs#)
  • test issue number 2 in the example is not matched to the tag but the corresponding PR is.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:

  • Test issue number 2#2

v0.0.0 (2018-05-30)

Full Changelog

Closed issues:

  • Test issue number 1#1

Merged pull requests:

*This Changelog was automatically generated bygithub_changelog_generator

antenore, hastebrot, baurmatt, yamat47, tutuca, bdangit, cdenneen, gillien, PhilLab, jordanwintersOPI, and 21 more reacted with thumbs up emojitorkleyy, falcucci, yugansh20, garcianavalon, kfeedu, Jojor, ninjaslothx, and dmpe reacted with heart emoji
@antenore
Copy link

This is really cool!
If you need testing I can help out from time to time.
We have a quite interesting Changeloghttps://gitlab.com/Remmina/Remmina

Thanks!

@antenore
Copy link

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?

@kreczko
Copy link
Author

@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.comexport GITLAB_API=https://gitlab.com/api/v4export GITLAB_PROJECT=changelog-testrepoexport GITLAB_USER=kreczko

@skywinder
Copy link
Member

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! ❤️

@kreczko
Copy link
Author

Awesome, thanks@skywinder. I will try to add a set of tests in the coming weeks, time permitting.

Copy link
Collaborator

@olleolleolleolleolleolle left a 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) andREADME usage sections for the functional additions.

Do you currently use the code in this PR to generate changelogs?

Good job, keep it up!

@pagnmickie
Copy link

Following as I need this as well. 💯

cdenneen added a commit to cdenneen/pdk-templates that referenced this pull requestJan 29, 2020
 - 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.
@cdenneen
Copy link

@kreczko Do you know if the labels are working properly?
I've tagged a few MR's (68 asmaintenance, 65 asbugfix, 66 asenhancement) but still result in aCHANGELOG.md with the following when those should be excluded in case ofmaintenance,### Fixed forbugfix and### Added forenhancement:

Here is the config:

  GitHubChangelogGenerator::RakeTask.new :changelog do |config|    raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?    config.github_site = 'https://gitlab.domain.tld'    config.github_endpoint = 'https://gitlab.domain.tld/api/v4'    config.gitlab = true    config.user = "puppet"    config.project = "puppet_profile_base"    config.future_release = "v2.2.6"    config.exclude_labels = ['maintenance']    config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."    config.add_pr_wo_labels = true    config.issues = false    config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"    config.configure_sections = {      "Changed" => {        "prefix" => "### Changed",        "labels" => ["backwards-incompatible"],      },      "Added" => {        "prefix" => "### Added",        "labels" => ["feature", "enhancement"],      },      "Fixed" => {        "prefix" => "### Fixed",        "labels" => ["bugfix"],      },    }  end
# Change logAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).## [v2.2.6](https://gitlab.domain.tld/puppet/puppet-profile_base/tree/v2.2.6) (2020-01-27)[Full Changelog](https://gitlab.domain.tld/puppet/puppet-profile_base/compare/v2.2.5...v2.2.6)### UNCATEGORIZED PRS; GO LABEL THEM- Release 2.2.6 [\#68](https://gitlab.domain.tld/puppet/puppet-profile_base/merge_requests/68) ([cdenneen](https://gitlab.domain.tld/cdenneen))## [v2.2.5](https://gitlab.domain.tld/puppet/puppet-profile_base/tree/v2.2.5) (2020-01-27)[Full Changelog](https://gitlab.domain.tld/puppet/puppet-profile_base/compare/v2.2.4...v2.2.5)### UNCATEGORIZED PRS; GO LABEL THEM- More updates to match upstream [\#67](https://gitlab.domain.tld/puppet/puppet-profile_base/merge_requests/67) ([cdenneen](https:/gitlab.domain.tld/cdenneen))## [v2.2.4](https://gitlab.domain.tld/puppet/puppet-profile_base/tree/v2.2.4) (2020-01-27)[Full Changelog](https://gitlab.domain.tld/puppet/puppet-profile_base/compare/v2.2.3...v2.2.4)## [v2.2.3](https://gitlab.domain.tld/puppet/puppet-profile_base/tree/v2.2.3) (2020-01-24)[Full Changelog](https://gitlab.domain.tld/puppet/puppet-profile_base/compare/v2.2.2...v2.2.3)### UNCATEGORIZED PRS; GO LABEL THEM- \#\#\# Added Yum Repo Updates to match defaults [\#66](https://gitlab.domain.tld/puppet/puppet-profile_base/merge_requests/66) ([cdenneen](https://gitlab.domain.tld/cdenneen))## [v2.2.2](https://gitlab.domain.tld/puppet/puppet-profile_base/tree/v2.2.2) (2020-01-24)[Full Changelog](https://gitlab.domain.tld/puppet/puppet-profile_base/compare/v2.2.1...v2.2.2)### UNCATEGORIZED PRS; GO LABEL THEM- \#\#\# Fixed Manifold changes [\#65](https://gitlab.domain.tld/puppet/puppet-profile_base/merge_requests/65) ([cdenneen](https://gitlab.domain.tld/cdenneen))

@kreczko
Copy link
Author

@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  ...
@cdenneen
Copy link

@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.

@NathanUrwin
Copy link

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!

cdenneen and GlennM reacted with thumbs up emojicdenneen reacted with eyes emoji

@cdenneen
Copy link

@skywinder confirmed this is working besides the known items that can be added/improved later

skywinder reacted with thumbs up emojiGlennM reacted with hooray emoji

@GlennM
Copy link

I'm going to get some work done on this MR this weekend. I'll make sure to keep everyone posted!

How's this going so far, did you manage to get started on it@NathanUrwin ?

@NathanUrwin
Copy link

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!

GlennM reacted with thumbs up emoji

@skywinder
Copy link
Member

Looks great. I want to double-check this code and then merge it.

In case if you don't want to wait:
I made separate repo to test GitLab things:https://github.com/github-changelog-generator/gitlab-changelog-generator

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 😉***-changelog-generator

GlennM, Jojor, and tlf30 reacted with thumbs up emoji

@GlennM
Copy link

Looks great. I want to double-check this code and then merge it.

Hi@skywinder , have you been able to double-check it already? Thanks for your reply and stay healthy

@tlf30
Copy link

Any status on this? I would love to start using this in gitlab.

pagnmickie reacted with thumbs up emoji

@pagnmickie
Copy link

I asked the same thing almost a year ago!#657 (comment)

@GlennM
Copy link

Any status on this? I would love to start using this in gitlab.

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.

pagnmickie and jwkicklighter reacted with thumbs up emoji

@NathanUrwin
Copy link

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. Seehttps://github.com/NathanUrwin/gitlab-release-generator

$ pip install gitlab-release-generator$ gitlab-releaseUsage: gitlab-release [OPTIONS] COMMAND [ARGS]...  Run gitlab-release.Options:  --changelog-filepath TEXT    Changelog filepath. Can be set by                               'CHANGELOG_FILEPATH' environment variable.                               [required]  --gitlab-api-url TEXT        Gitlab api url. Can be set by 'GITLAB_API_URL'                               environment variable.  [required]  --gitlab-namespace TEXT      Gitlab namespace. Can be set by                               'GITLAB_NAMESPACE' environment variable.                               [required]  --gitlab-private-token TEXT  Gitlab private token. Can be set by                               'GITLAB_PRIVATE_TOKEN' environment variable.                               [required]  --gitlab-project TEXT        Gitlab project. Can be set by 'GITLAB_PROJECT'                               environment variable.  [required]  --gitlab-site-url TEXT       Gitlab site url. Can be set by                               'GITLAB_SITE_URL' environment variable.                               [required]  --releases-filepath TEXT     Releases filepath. Can be set by                               'RELEASES_FILEPATH' environment variable.                               [required]  -v, --verbose                Enable verbose output.  --version                    Show the version and exit.  --help                       Show this message and exit.Commands:  delete    Delete a GitLab release.  generate  Generate GitLab release data.  upload    Create a GitLab release.

@skywinder
Copy link
Member

Hey,@NathanUrwin that's awesome.
Thank you very much for the update.

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?
I would be happy to add you to this project as contributors.

GlennM reacted with thumbs up emoji

@skycaptain
Copy link

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.

@pagnmickie
Copy link

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.

GlennM reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@olleolleolleolleolleolleolleolleolle left review comments

@skywinderskywinderAwaiting requested review from skywinder

@ferrarimarcoferrarimarcoAwaiting requested review from ferrarimarco

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support Gitlab (and other github-like backends)
18 participants
@kreczko@antenore@skywinder@pagnmickie@NathanUrwin@abhishektiwari2904@sathomps@jwkicklighter@cdenneen@limkinZero@WizzardS10@maxxfrazer@olleolleolle@GlennM@r4mbo7@tlf30@skycaptain@ferrarimarco

[8]ページ先頭

©2009-2025 Movatter.jp