Skip to content
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

Gitlab support #351

Closed
wants to merge 5 commits into from
Closed

Gitlab support #351

wants to merge 5 commits into from

Conversation

deanpcmad
Copy link
Contributor

Hey, I've just found Samson and it looks great!
I use a self hosted version of Gitlab for my projects so I've added support for Gitlab OAuth and showing Gitlab links instead of Github on the project pages.

@@ -72,6 +72,18 @@ def repository_homepage
"//#{Rails.application.config.samson.github.web_url}/#{github_repo}"
end

def repository_homepage_gitlab
"//#{ENV['GITLAB_URL']}/#{github_repo}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be better if github_repo was only used for Github or rename it to a more generic name. Also, mind putting the gitlab url as a config var like this?

@deanpcmad
Copy link
Contributor Author

Thanks for the comments, it was just a quick PR before I went to bed. I'll make those changes tomorrow. I'll also see if I can fix the build :)

@sandlerr
Copy link
Contributor

Thanks @deanperry looking good! FYI, many specs are failing because the envar isn't set so we are doing string.include? nil in Project

@deanpcmad
Copy link
Contributor Author

Ah I see. When logged in with GitHub is there a way to import all repos? If
so I should be able to use the gitlab API to do the same

On Wednesday, April 15, 2015, Roman Sandler notifications@github.com
wrote:

Thanks @deanperry https://github.com/deanperry looking good! FYI, many
specs are failing because the envar isn't set so we are doing string.include?
nil in Project


Reply to this email directly or view it on GitHub
#351 (comment).

Sent from Gmail Mobile

@sandlerr
Copy link
Contributor

Github provides this API but the feature doesn't exist in Samson yet. We find that many of our projects don't need a specific deployment step (for example api clients).
We definitely welcome pull requests though!

@@ -0,0 +1,3 @@
<%= link_to project.repository_homepage_gitlab, class: "github", target: "_blank", title: "View repository on Gitlab" do %>
<%= image_tag "gitlab.png", width: 21, height: 21 %>
<% end %>
Copy link

Choose a reason for hiding this comment

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

Needs newline at EOF.

@deanpcmad
Copy link
Contributor Author

I've pushed some fixes

@sandlerr
Copy link
Contributor

@deanperry would you mind rebasing?

@geshan
Copy link

geshan commented May 10, 2015

is it ready to be merged?

@deanpcmad
Copy link
Contributor Author

I believe it is

@sandlerr
Copy link
Contributor

@deanperry this has merge conflicts due to changes that have been made in our master branch. We would very much like to merge your contribution but you'll need to get the latest master and do a git rebase of your branch onto it.

@silverbp
Copy link

silverbp commented Jul 8, 2015

It would be nice to get this in there, we use gitlab as well!

@sandlerr sandlerr mentioned this pull request Jul 21, 2015
@beniwtv
Copy link

beniwtv commented Jul 21, 2015

We also use Gitlab, so this would be definitively cool!

@cmckni3
Copy link
Contributor

cmckni3 commented Jul 22, 2015

We use GitLab as well. I have rebased @deanperry's work in my fork and I am making sure everything works.

Should we add/modify some tests for this feature @sandlerr?

@sandlerr
Copy link
Contributor

@cmckni3 yes, we'll need to make some changes that aren't yet reflected in master...cmckni3:gitlab-support - please put up a new pull request for this discussion.

@cmckni3
Copy link
Contributor

cmckni3 commented Jul 23, 2015

Sure @sandlerr. See #523.

@deanpcmad
Copy link
Contributor Author

Ok I'm closing this for #523

@deanpcmad deanpcmad closed this Oct 2, 2015
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.

None yet

6 participants