添加gitlab API,获取当前user的某个项目id
This commit is contained in:
parent
bdb80aba12
commit
818631b573
|
|
@ -91,7 +91,13 @@ class GamesController < ApplicationController
|
|||
# git_repository_url @myshixun, "Myshixun"
|
||||
# @st 0 实践任务 1 选择题任务
|
||||
def show
|
||||
# 展示全部实训
|
||||
# g = Gitlab.client
|
||||
# g_name = g.project(@myshixun.gpid).try(:name)
|
||||
# if g_name.include?("-")
|
||||
# g.delete_project()
|
||||
# end
|
||||
# 展示全部实训
|
||||
# git_myshixun_url_ip @myshixun, user_id
|
||||
@is_subject = params[:is_subject]
|
||||
if @game.status == 1
|
||||
# 放置页面ajax数据还没获取就关闭
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ class Gitlab::Client
|
|||
end
|
||||
end
|
||||
|
||||
def current_user_project(user_id, project_name)
|
||||
get("/projects/current_user_projects?user_id=#{user_id}&project_name=#{project_name}")
|
||||
end
|
||||
|
||||
# Gets information about a project.
|
||||
#
|
||||
# @example
|
||||
|
|
|
|||
Loading…
Reference in New Issue