ADD repo_id with get repository api
This commit is contained in:
parent
6d39adfa08
commit
339f0b5517
|
@ -2,7 +2,7 @@ class RepositoriesController < ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
include OperateProjectAbilityAble
|
include OperateProjectAbilityAble
|
||||||
before_action :require_login, only: %i[edit update create_file update_file delete_file sync_mirror]
|
before_action :require_login, only: %i[edit update create_file update_file delete_file sync_mirror]
|
||||||
before_action :find_project, :authorizate!, except: :tags
|
before_action :find_project, :authorizate!, except: [:sync_mirror, :tags]
|
||||||
before_action :find_repository, only: %i[sync_mirror tags]
|
before_action :find_repository, only: %i[sync_mirror tags]
|
||||||
before_action :authorizate_user_can_edit_project!, only: %i[sync_mirror]
|
before_action :authorizate_user_can_edit_project!, only: %i[sync_mirror]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
json.identifier @project.identifier
|
json.identifier @project.identifier
|
||||||
json.name @project.name
|
json.name @project.name
|
||||||
json.project_id @project.id
|
json.project_id @project.id
|
||||||
|
json.repo_id @project.repository.id
|
||||||
json.issues_count @project.issues_count
|
json.issues_count @project.issues_count
|
||||||
json.pull_requests_count @project.pull_requests_count
|
json.pull_requests_count @project.pull_requests_count
|
||||||
json.project_identifier @project.identifier
|
json.project_identifier @project.identifier
|
||||||
|
@ -18,6 +19,7 @@ json.permission render_edit_project_permission(current_user, @project) if curren
|
||||||
json.mirror_url @project&.repository.mirror_url
|
json.mirror_url @project&.repository.mirror_url
|
||||||
json.watched current_user&.watched?(@project)
|
json.watched current_user&.watched?(@project)
|
||||||
json.praised current_user&.liked?(@project)
|
json.praised current_user&.liked?(@project)
|
||||||
|
json.status @project.status
|
||||||
json.forked_from_project_id @project_fork_id
|
json.forked_from_project_id @project_fork_id
|
||||||
json.fork_info do
|
json.fork_info do
|
||||||
if @fork_project.present?
|
if @fork_project.present?
|
||||||
|
|
Loading…
Reference in New Issue