add has_actions to projects

This commit is contained in:
kingChan 2024-06-20 14:10:51 +08:00
parent 32b40487f6
commit ec01552818
20 changed files with 99 additions and 75 deletions

View File

@ -10,6 +10,7 @@ class Api::V1::SonarqubesController < Api::V1::BaseController
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_HOST_URL', Rails.application.config_for(:configuration)['sonarqube']['url'] ).destroy
Gitea::Repository::ActionSecretsService.new(@owner, @project.identifier, 'SONAR_TOKEN', Rails.application.config_for(:configuration)['sonarqube']['secret'] ).destroy
end
@project.update(gitea_params)
render_ok
end

View File

@ -16,12 +16,12 @@
# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# label :string(255)
#
# Indexes
#
# by_name (name)
# index_action_nodes_on_action_types_id (action_node_types_id)
# index_action_nodes_on_user_id (user_id)
# index_action_nodes_on_action_node_types_id (action_node_types_id)
# index_action_nodes_on_user_id (user_id)
#
class Action::Node < ApplicationRecord

View File

@ -8,7 +8,7 @@
# input_type :string(255)
# description :string(255)
# is_required :boolean default("0")
# sort_no :string(255) default("0")
# sort_no :integer default("0")
# user_id :integer
# created_at :datetime not null
# updated_at :datetime not null

View File

@ -5,7 +5,7 @@
# id :integer not null, primary key
# name :string(255)
# description :string(255)
# sort_no :integer
# sort_no :integer default("0")
# created_at :datetime not null
# updated_at :datetime not null
#

View File

@ -6,7 +6,7 @@
# name :string(255)
# description :string(255)
# img :string(255)
# sort_no :string(255) default("0")
# sort_no :integer default("0")
# json :text(65535)
# yaml :text(65535)
# created_at :datetime not null

View File

@ -1,45 +1,44 @@
# == Schema Information
#
# Table name: attachments
#
# id :integer not null, primary key
# container_id :integer
# container_type :string(30)
# filename :string(255) default(""), not null
# disk_filename :string(255) default(""), not null
# filesize :integer default("0"), not null
# content_type :string(255) default("")
# digest :string(60) default(""), not null
# downloads :integer default("0"), not null
# author_id :integer default("0"), not null
# created_on :datetime
# description :text(65535)
# disk_directory :string(255)
# attachtype :integer default("1")
# is_public :integer default("1")
# copy_from :integer
# quotes :integer default("0")
# is_publish :integer default("1")
# publish_time :datetime
# resource_bank_id :integer
# unified_setting :boolean default("1")
# cloud_url :string(255) default("")
# course_second_category_id :integer default("0")
# delay_publish :boolean default("0")
# memo_image :boolean default("0")
# extra_type :integer default("0")
# uuid :string(255)
#
# Indexes
#
# index_attachments_on_author_id (author_id)
# index_attachments_on_container_id_and_container_type (container_id,container_type)
# index_attachments_on_course_second_category_id (course_second_category_id)
# index_attachments_on_created_on (created_on)
# index_attachments_on_is_public (is_public)
# index_attachments_on_quotes (quotes)
# index_attachments_on_uuid (uuid)
#
# == Schema Information
#
# Table name: attachments
#
# id :integer not null, primary key
# container_id :integer
# container_type :string(30)
# filename :string(255) default(""), not null
# disk_filename :string(255) default(""), not null
# filesize :integer default("0"), not null
# content_type :string(255) default("")
# digest :string(60) default(""), not null
# downloads :integer default("0"), not null
# author_id :integer default("0"), not null
# created_on :datetime
# description :text(65535)
# disk_directory :string(255)
# attachtype :integer default("1")
# is_public :integer default("1")
# copy_from :integer
# quotes :integer default("0")
# is_publish :integer default("1")
# publish_time :datetime
# resource_bank_id :integer
# unified_setting :boolean default("1")
# cloud_url :string(255) default("")
# course_second_category_id :integer default("0")
# delay_publish :boolean default("0")
# uuid :string(255)
#
# Indexes
#
# index_attachments_on_author_id (author_id)
# index_attachments_on_container_id_and_container_type (container_id,container_type)
# index_attachments_on_course_second_category_id (course_second_category_id)
# index_attachments_on_created_on (created_on)
# index_attachments_on_is_public (is_public)
# index_attachments_on_quotes (quotes)
# index_attachments_on_uuid (uuid)
#

View File

@ -1,3 +1,23 @@
# == Schema Information
#
# Table name: gitlink_competition_applies
#
# id :integer not null, primary key
# competition_id :integer
# competition_identifier :string(255)
# team_id :integer
# team_name :string(255)
# school_name :string(255)
# educoder_login :string(255)
# nickname :string(255)
# phone :string(255)
# email :string(255)
# identity :string(255)
# role :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
# == Schema Information
#
# Table name: gitlink_competition_applies

View File

@ -7,7 +7,6 @@
# content :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
# is_secret :boolean default("0")
#
class License < ApplicationRecord

View File

@ -11,7 +11,6 @@
# course_group_id :integer default("0")
# is_collect :integer default("1")
# graduation_group_id :integer default("0")
# is_apply_signature :boolean default("0")
# team_user_id :integer
#
# Indexes

View File

@ -5,7 +5,6 @@
# id :integer not null, primary key
# user_id :integer
# organization_id :integer
# is_creator :boolean default("0")
# created_at :datetime not null
# updated_at :datetime not null
#

View File

@ -59,6 +59,7 @@
# is_pinned :boolean default("0")
# recommend_index :integer default("0")
# pr_view_admin :boolean default("0")
# has_actions :boolean default("0")
#
# Indexes
#

View File

@ -15,7 +15,6 @@
# Indexes
#
# index_project_categories_on_ancestry (ancestry)
# index_project_categories_on_id (id)
#
class ProjectCategory < ApplicationRecord

View File

@ -9,10 +9,6 @@
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_project_languages_on_id (id)
#
class ProjectLanguage < ApplicationRecord
include Projectable

View File

@ -27,7 +27,6 @@
#
# Indexes
#
# index_name (project_id)
# index_repositories_on_identifier (identifier)
# index_repositories_on_project_id (project_id)
# index_repositories_on_user_id (user_id)

View File

@ -11,6 +11,8 @@
# sync_direction :integer
# created_at :datetime not null
# updated_at :datetime not null
# external_token :string(255)
# webhook_gid :integer
#
# Indexes
#

View File

@ -11,6 +11,8 @@
# sync_direction :integer
# created_at :datetime not null
# updated_at :datetime not null
# external_token :string(255)
# webhook_gid :integer
#
# Indexes
#

View File

@ -1,18 +1,19 @@
# == Schema Information
#
# Table name: tokens
#
# id :integer not null, primary key
# user_id :integer default("0"), not null
# action :string(30) default(""), not null
# value :string(40) default(""), not null
# created_on :datetime not null
#
# Indexes
#
# index_tokens_on_user_id (user_id)
# tokens_value (value) UNIQUE
#
# == Schema Information
#
# Table name: tokens
#
# id :integer not null, primary key
# user_id :integer default("0"), not null
# action :string(30) default(""), not null
# value :string(40) default(""), not null
# created_on :datetime not null
#
# Indexes
#
# index_tokens_on_user_id (user_id)
# tokens_value (value) UNIQUE
#
#

View File

@ -22,9 +22,9 @@
# school_id :integer
# description :string(255)
# department_id :integer
# province :text(65535)
# custom_department :string(255)
# province :string(255)
# city :string(255)
# custom_department :string(255)
# show_email :boolean default("0")
# show_location :boolean default("0")
# show_department :boolean default("0")

View File

@ -53,7 +53,9 @@ default: &default
# 区块链相关配置
blockchain:
api_url: 'blockchain service url'
sonarqube:
url: ''
secret: ''
production:
<<: *default

View File

@ -0,0 +1,5 @@
class AddHasActionsToProjects < ActiveRecord::Migration[5.2]
def change
add_column :projects , :has_actions, :boolean, default: false
end
end