Merge branch 'gitlab_guange' of http://repository.trustie.net/xianbo/trustie2 into gitlab_guange

This commit is contained in:
guange 2015-10-14 17:28:11 +08:00
commit 9266eccdff
5 changed files with 16 additions and 4 deletions

View File

@ -254,7 +254,10 @@ update
#if( !User.current.member_of?(@project) || @project.hidden_repo)
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
g = Gitlab.client
# r = g.get("/users?search=#{user.mail}").first
# rr = g.trees(@project.id, @path)
# r = g.get ("/projects/#{@project}/repository/tree")
# :name, :path, :kind, :size, :lastrev, :changeset
@entries = @repository.entries(@path, @rev)
@changeset = @repository.find_changeset_by_name(@rev)

View File

@ -768,7 +768,8 @@ class Project < ActiveRecord::Base
'project_type',
'dts_test',
'attachmenttype',
'enterprise_name'
'enterprise_name',
'gpid'

View File

@ -0,0 +1,5 @@
class AddGpidToProject < ActiveRecord::Migration
def change
add_column :projects, :gpid, :integer
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150930011457) do
ActiveRecord::Schema.define(:version => 20151013023237) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -1164,6 +1164,7 @@ ActiveRecord::Schema.define(:version => 20150930011457) do
t.string "enterprise_name"
t.integer "organization_id"
t.integer "project_new_type"
t.integer "gpid"
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"

View File

@ -60,7 +60,9 @@ namespace :gitlab do
user_id: gid,
import_url: 'https://github.com/gitlabhq/gitlab-cli.git'
)
project.gpid = gproject.id
project.save!
puts "Successfully created #{project.name}"
# add team members
#
GUEST = 10