danger-mention icon indicating copy to clipboard operation
danger-mention copied to clipboard

GitLab support

Open k0nserv opened this issue 8 years ago • 12 comments

Hi @wojteklu,

now that Danger supports GitLab I'd be interested in your take on supporting GitLab. I am happy to do the work if you think it can be include in the plugin in a nice way.

k0nserv avatar Aug 24 '16 16:08 k0nserv

It would be awesome. I'm not using gitlab, but it should be possible if gitlab offers html with blame information (github: https://github.com/wojteklu/danger-mention/blame/master/lib/version.rb). Then we will use regex to analyze the outputted html.

wojteklu avatar Aug 24 '16 21:08 wojteklu

Yeah should be possible with any problems :)

k0nserv avatar Aug 24 '16 22:08 k0nserv

Quick question. Where does branch_for_base come from here https://github.com/k0nserv/danger-mention/blob/master/lib/danger_plugin.rb#L64? I can't find it, is it provided by Danger?

k0nserv avatar Aug 24 '16 22:08 k0nserv

Found the answer to my own question :)

k0nserv avatar Aug 24 '16 22:08 k0nserv

Just to be explicit: branch_for_base is only available when you're building with github. GitLab uses branch_for_merge.

jk avatar Aug 30 '16 07:08 jk

That seems like a bug? Should they not be the same? cc @orta

k0nserv avatar Aug 30 '16 08:08 k0nserv

Same would be better, currently gitlab has less branch_for_x and different named ones ( I think I named them after the git terminology, so it should be fine to apply to both )

http://danger.systems/reference.html

orta avatar Aug 30 '16 11:08 orta

Yeah that's my bad, I think I based my GitLab work on the GitHub plugin, but maybe I didn't. I'll make a backwards compatible PR that introduces the same names

k0nserv avatar Aug 30 '16 11:08 k0nserv

Rockin' 👍

orta avatar Aug 30 '16 11:08 orta

Once Danger supports GitLab CI (or rather, GitLab CI supports Danger 😉) we'd love to be able to use this plugin for GitLab CE.

If there's anything we can do to help we'd be more than willing :)

connorshea avatar Sep 04 '16 02:09 connorshea

This is added in 0.6.0 and shipped just now

screen shot 2017-02-10 at 3 28 51 pm

orta avatar Feb 10 '17 20:02 orta

I take this back, as it uses web-page scraping #11 , I don't think the changes I've added are enough for gitlab support

orta avatar Feb 11 '17 16:02 orta