samson icon indicating copy to clipboard operation
samson copied to clipboard

Bitbucket support

Open jwswj opened this issue 11 years ago • 22 comments

At the moment Samson relies heavily on Github. It would be great to see Bitbucket support added.

jwswj avatar May 28 '14 14:05 jwswj

Absolutely :+1: Will have a look next weekend if no one beats me to it!

ryan0x44 avatar May 29 '14 00:05 ryan0x44

:+1:

inakiabt avatar Jun 01 '14 21:06 inakiabt

+1

jrutter avatar Aug 04 '14 20:08 jrutter

+1

geshan avatar Apr 02 '15 08:04 geshan

+1

splitice avatar May 08 '15 02:05 splitice

+1

kevinkaske avatar Jun 22 '15 21:06 kevinkaske

+1

jacopocappelli1989 avatar Aug 21 '15 13:08 jacopocappelli1989

Lots of +1s - anyone interested in building it?

jwswj avatar Aug 21 '15 20:08 jwswj

I still am, but shortly after my last comment I moved on to a job where I no longer use Samson :( If I can find some spare time on weekends I'll try to contribute! Maybe we could start by sketching out a plan, to at least make it easier for anyone to contribute?

From a quick scan of the code, it looks like there is GitHub support for OAuth, Pull Request compares & commenting, and deployment logging? Is this correct @jwswj?

I guess a good first step would be to abstract the current GitHub code into an adapter with a generic interface, then next step would be to add an adapter for BitBucket (opening the possibility to add other providers such as GitLab)?

ryan0x44 avatar Aug 22 '15 07:08 ryan0x44

That sounds reasonable to me. Ideally we would build adapters as plugins. On 22 Aug 2015 5:37 pm, "Ryan Djurovich" [email protected] wrote:

I still am, but shortly after my last comment I moved on to a job where I no longer use Samson :( If I can find some spare time on weekends I'll try to contribute! Maybe we could start by sketching out a plan, to at least make it easier for anyone to contribute?

From a quick scan of the code, it looks like there is GitHub support for OAuth, Pull Request compares & commenting, and deployment logging? Is this correct @jwswj https://github.com/jwswj?

I guess a good first step would be to abstract the current GitHub code into an adapter with a generic interface, then next step would be to add an adapter for BitBucket (opening the possibility to add other providers such as GitLab)?

— Reply to this email directly or view it on GitHub https://github.com/zendesk/samson/issues/1#issuecomment-133648856.

sandlerr avatar Aug 23 '15 23:08 sandlerr

Great idea @sandlerr!

ryan0x44 avatar Aug 24 '15 07:08 ryan0x44

so is anything going to happen after a year?

kernel-io avatar Sep 01 '15 00:09 kernel-io

@kernel-io probably not with comments like that. If you're interested why don't you draft up an approach and post a link here? @ryandjurovich will probably help out. We're supportive of adding this functionality, but we use Github at Zendesk so don't have the need ourselves at the moment.

jwswj avatar Sep 01 '15 00:09 jwswj

+1

dcwq avatar Dec 22 '15 14:12 dcwq

+1 , So @ryan0x44 please notify when you commit pull request may be i can you :) :+1:

udomsak avatar Jan 06 '16 07:01 udomsak

Is this issue under development? It would be really nice :) I'm waiting for that.

davidbolla avatar Jul 11 '16 08:07 davidbolla

+1

agomezrodriguez avatar Jul 11 '16 13:07 agomezrodriguez

I'm not aware of anyone actively working on this, but we accept pull requests.

jonmoter avatar Jul 11 '16 14:07 jonmoter

It appeared that we need to use access token (and refresh token) which are available via Oauth2, for bitbucket authentication. We have two gems: https://rubygems.org/gems/omniauth-bitbucket (have unreleased update to oauth2) and https://rubygems.org/gems/omniauth-bitbucket2. Unfortunatelly both of them have problem with Authentication failure! invalid_credentials: OAuth2::Error, invalid_request: redirect_uri does not match described here https://github.com/birmacher/omniauth-bitbucket2/issues/1. I need to hack them to resolve this problem (I was able to do it). I have two questions:

  1. Do you prefer to use released version on rubygems (second gem) or you allow to have unreleased gem in Gemfile?
  2. I know that monkey patching is bad but without monkey patching we cannot use any of above gems with Oauth2. I prepared somethink like this:
module OmniAuth
  module Strategies
    class Bitbucket2 < OmniAuth::Strategies::OAuth2
      def callback_url
        full_host + script_name + callback_path
      end
    end
  end
end

but it will be good to hear your idea about how we should deal with it.

wafcio avatar Sep 25 '17 20:09 wafcio

either is fine ... would prefer the monkey-patch with clear docs on when it can be removed over github dependency ... if omniauth-bitbucket is dead/unmaintained also fine to switch to omniauth-bitbucket2

grosser avatar Sep 25 '17 21:09 grosser

  • omniauth-bitbucket, last release: November 25, 2013, last commit: Jul 2, 2017 (in this case we need to use unreleased version)
  • omniauth-bitbucket2, last relase: December 14, 2015, last commit: Dec 14, 2015

In omniuth-bitbucket something happened in this year on github and omniauth-bitbucket2 looks like dead gem.

wafcio avatar Sep 25 '17 21:09 wafcio

Prefer to get a hold of the author of omniauth-bitbucket via email/twitter etc and ask them to add you/someone as maintainer ... so we don't end up with a split user base / bad gems ...

grosser avatar Sep 25 '17 21:09 grosser

see https://github.com/zendesk/samson/pull/3227 for how to do it

grosser avatar Mar 12 '19 18:03 grosser