mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
Merge branch 'pm_project_develop' into standalone_develop
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
|
||||
<div class="actions" style="margin-top:10px;">
|
||||
<!-- <a href="/managements/competition/customize" style="font-size: 28px;">>>前往节点管理页面</a>-->
|
||||
<%= form.submit("保存赛事") %>
|
||||
<%= form.submit("保存") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ json.types @node_types.each do |node_type|
|
||||
if node_type.name.to_s == "未分类"
|
||||
json.extract! node_type, :id, :name
|
||||
json.nodes @no_type_nodes do |node|
|
||||
json.extract! node, :id, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.extract! node, :id, :label, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.inputs node.action_node_inputs do |node_input|
|
||||
json.partial! "node_input", locals: { node_input: node_input, node: node }
|
||||
end
|
||||
@@ -10,7 +10,7 @@ json.types @node_types.each do |node_type|
|
||||
else
|
||||
json.extract! node_type, :id, :name
|
||||
json.nodes node_type.action_nodes do |node|
|
||||
json.extract! node, :id, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.extract! node, :id, :label, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.inputs node.action_node_inputs do |node_input|
|
||||
json.partial! "node_input", locals: { node_input: node_input, node: node }
|
||||
end
|
||||
|
||||
@@ -14,13 +14,16 @@
|
||||
<label for="status">类型:</label>
|
||||
<%= form.select :action_node_types_id, options_for_select(Action::NodeType.all.map { |key| [key.name, key.id]}, node.action_node_types_id), {}, class: "form-control" %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= form.label :name, "节点名称" %>
|
||||
<%= form.label :label, "节点名称" %>
|
||||
<%= form.text_field :label %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= form.label :name, "节点标识" %>
|
||||
<%= form.text_field :name %>
|
||||
</div>
|
||||
<div class="field">
|
||||
<%= form.label :full_name, "节点全称" %>
|
||||
<%= form.label :full_name, "节点全名" %>
|
||||
<%= form.text_field :full_name %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th width="15%">节点名称</th>
|
||||
<th width="15%">节点标识</th>
|
||||
<th width="20%">节点全称</th>
|
||||
<th width="20%">节点描述</th>
|
||||
<th width="10%">分类</th>
|
||||
@@ -27,6 +28,7 @@
|
||||
<% @nodes.each do |info| %>
|
||||
<tr>
|
||||
<td><%= info.id %></td>
|
||||
<td><%= info.label %></td>
|
||||
<td><%= info.name %></td>
|
||||
<td><%= info.full_name %></td>
|
||||
<td><%= info.description %></td>
|
||||
|
||||
@@ -2,7 +2,7 @@ json.types @node_types.each do |node_type|
|
||||
if node_type.name.to_s == "未分类"
|
||||
json.extract! node_type, :id, :name
|
||||
json.nodes @no_type_nodes do |node|
|
||||
json.extract! node, :id, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.extract! node, :id, :label, :name, :full_name, :description, :icon, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.inputs node.action_node_inputs do |node_input|
|
||||
json.partial! "node_input", locals: { node_input: node_input, node: node }
|
||||
end
|
||||
@@ -10,7 +10,7 @@ json.types @node_types.each do |node_type|
|
||||
else
|
||||
json.extract! node_type, :id, :name
|
||||
json.nodes node_type.action_nodes do |node|
|
||||
json.extract! node, :id, :name, :full_name, :description, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.extract! node, :id, :label, :name, :full_name, :description, :icon, :action_node_types_id, :yaml, :sort_no, :use_count
|
||||
json.inputs node.action_node_inputs do |node_input|
|
||||
json.partial! "node_input", locals: { node_input: node_input, node: node }
|
||||
end
|
||||
|
||||
@@ -85,7 +85,9 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% if EduSetting.get("open_baidu_tongji").to_s == "true" %>
|
||||
<%= render partial: 'admins/dashboards/baidu_tongji' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="project-language-modals">
|
||||
</div>
|
||||
8
app/views/api/pm/issue_links/index.json.jbuilder
Normal file
8
app/views/api/pm/issue_links/index.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
json.issues @links.each do |link|
|
||||
if @issue.id == link.be_linkable_id
|
||||
json.partial! "api/v1/issues/simple_detail", locals: { issue: link.linkable }
|
||||
else
|
||||
json.partial! "api/v1/issues/simple_detail", locals: { issue: link.be_linkable }
|
||||
end
|
||||
end
|
||||
25
app/views/api/pm/issues/journals/_detail.json.jbuilder
Normal file
25
app/views/api/pm/issues/journals/_detail.json.jbuilder
Normal file
@@ -0,0 +1,25 @@
|
||||
json.id journal.id
|
||||
json.is_journal_detail journal.is_journal_detail?
|
||||
json.created_at journal.created_on.strftime("%Y-%m-%d %H:%M")
|
||||
json.updated_at journal.updated_on.strftime("%Y-%m-%d %H:%M")
|
||||
json.user do
|
||||
if journal.user.present?
|
||||
json.partial! "api/v1/users/simple_user", user: journal.user
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
if journal.is_journal_detail?
|
||||
detail = journal.journal_details.take
|
||||
json.operate_category journal.pm_operate_category
|
||||
json.operate_content journal.is_journal_detail? ? journal.pm_operate_content : nil
|
||||
else
|
||||
json.notes journal.notes
|
||||
json.comments_count journal.comments_count
|
||||
json.children_journals journal.first_ten_children_journals.each do |journal|
|
||||
json.partial! "api/v1/issues/journals/children_detail", journal: journal
|
||||
end
|
||||
json.attachments journal.attachments do |attachment|
|
||||
json.partial! "api/v1/attachments/simple_detail", locals: {attachment: attachment}
|
||||
end
|
||||
end
|
||||
8
app/views/api/pm/issues/journals/index.json.jbuilder
Normal file
8
app/views/api/pm/issues/journals/index.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.total_journals_count @total_journals_count
|
||||
json.total_operate_journals_count @total_operate_journals_count
|
||||
json.total_comment_journals_count @total_comment_journals_count
|
||||
json.total_count @journals.total_count
|
||||
json.journals @journals do |journal|
|
||||
journal.associate_attachment_container
|
||||
json.partial! "api/pm/issues/journals/detail", journal: journal
|
||||
end
|
||||
8
app/views/api/pm/issues/parent_issues.json.jbuilder
Normal file
8
app/views/api/pm/issues/parent_issues.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.total_count @issues.total_count
|
||||
json.issues @issues.each do |issue|
|
||||
if params[:only_name].present?
|
||||
json.(issue, :id, :subject, :project_issues_index)
|
||||
else
|
||||
json.partial! "api/v1/issues/simple_detail", locals: {issue: issue}
|
||||
end
|
||||
end
|
||||
@@ -3,6 +3,6 @@ json.title attachment.title
|
||||
json.description attachment.description
|
||||
json.filesize number_to_human_size(attachment.filesize)
|
||||
json.is_pdf attachment.is_pdf?
|
||||
json.url attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)
|
||||
json.created_on attachment.created_on.strftime("%Y-%m-%d %H:%M:%S")
|
||||
json.url Rails.application.config_for(:configuration)['platform_url'] + (attachment.is_pdf? ? download_url(attachment,disposition:"inline") : download_url(attachment)).to_s
|
||||
json.created_on attachment.created_on.strftime("%Y-%m-%d %H:%M")
|
||||
json.content_type attachment.content_type
|
||||
|
||||
@@ -33,6 +33,13 @@ json.author do
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
json.changer do
|
||||
if issue.changer.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.changer}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
json.assigners issue.show_assigners.each do |assigner|
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: assigner}
|
||||
end
|
||||
@@ -44,4 +51,17 @@ json.operate_journals_count issue.operate_journals.size
|
||||
json.attachments issue.attachments.each do |attachment|
|
||||
json.partial! "api/v1/attachments/simple_detail", locals: {attachment: attachment}
|
||||
end
|
||||
json.pull_fixed issue.pull_attached_issues.where(fixed: true).present?
|
||||
json.pull_fixed issue.pull_attached_issues.where(fixed: true).present?
|
||||
json.root_id issue.root_id
|
||||
json.pm_issue_type issue.pm_issue_type
|
||||
json.pm_sprint_id issue.pm_sprint_id
|
||||
json.pm_project_id issue.pm_project_id
|
||||
json.time_scale issue.time_scale
|
||||
json.child_count issue.child_count
|
||||
json.project do
|
||||
if issue.project.present? && issue.project&.owner.present?
|
||||
json.partial! "api/v1/projects/detail", locals: {project: issue.project}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
@@ -6,9 +6,32 @@ json.tags issue.show_issue_tags.each do |tag|
|
||||
json.partial! "api/v1/issues/issue_tags/simple_detail", locals: {tag: tag}
|
||||
end
|
||||
json.status_name issue.issue_status&.name
|
||||
json.status_id issue.status_id
|
||||
json.status do
|
||||
if issue.issue_status.present?
|
||||
json.partial! "api/v1/issues/statues/simple_detail", locals: {status: issue.issue_status}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
json.priority_name issue.priority&.name
|
||||
json.priority_id issue.priority_id
|
||||
json.priority do
|
||||
if issue.priority.present?
|
||||
json.partial! "api/v1/issues/issue_priorities/simple_detail", locals: {priority: issue.priority}
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
json.milestone_name issue.version&.name
|
||||
json.milestone_id issue.fixed_version_id
|
||||
json.root_id issue.root_id
|
||||
json.pm_issue_type issue.pm_issue_type
|
||||
json.pm_sprint_id issue.pm_sprint_id
|
||||
json.pm_project_id issue.pm_project_id
|
||||
json.time_scale issue.time_scale
|
||||
json.child_count issue.child_count
|
||||
|
||||
json.author do
|
||||
if issue.user.present?
|
||||
json.partial! "api/v1/users/simple_user", locals: {user: issue.user}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
json.total_issues_count @total_issues_count
|
||||
json.opened_count @opened_issues_count
|
||||
json.closed_count @closed_issues_count
|
||||
json.complete_count @complete_issues_count
|
||||
json.total_count @issues.total_count
|
||||
json.has_created_issues @project.issues.size > 0
|
||||
json.has_created_issues @project.present? ? @project.issues.size > 0 : 0
|
||||
json.issues @issues.each do |issue|
|
||||
if params[:only_name].present?
|
||||
json.(issue, :id, :subject, :project_issues_index)
|
||||
else
|
||||
json.partial! "simple_detail", locals: {issue: issue}
|
||||
json.partial! "api/v1/issues/simple_detail", locals: {issue: issue}
|
||||
end
|
||||
end
|
||||
@@ -1 +1 @@
|
||||
json.(priority, :id, :name)
|
||||
json.(priority, :id, :name,:pm_color)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
json.total_count @priorities.total_count
|
||||
json.priorities @priorities.each do |priority|
|
||||
json.partial! "simple_detail", locals: {priority: priority}
|
||||
json.partial! "api/v1/issues/issue_priorities/simple_detail", locals: {priority: priority}
|
||||
end
|
||||
@@ -1,8 +1,8 @@
|
||||
json.total_count @issue_tags.total_count
|
||||
json.issue_tags @issue_tags.each do |tag|
|
||||
if params[:only_name]
|
||||
json.partial! "simple_detail", locals: {tag: tag}
|
||||
json.partial! "api/v1/issues/issue_tags/simple_detail", locals: {tag: tag}
|
||||
else
|
||||
json.partial! "detail", locals: {tag: tag}
|
||||
json.partial! "api/v1/issues/issue_tags/detail", locals: {tag: tag}
|
||||
end
|
||||
end
|
||||
@@ -17,7 +17,7 @@ else
|
||||
json.notes journal.notes
|
||||
json.comments_count journal.comments_count
|
||||
json.children_journals journal.first_ten_children_journals.each do |journal|
|
||||
json.partial! "children_detail", journal: journal
|
||||
json.partial! "api/v1/issues/journals/children_detail", journal: journal
|
||||
end
|
||||
json.attachments journal.attachments do |attachment|
|
||||
json.partial! "api/v1/attachments/simple_detail", locals: {attachment: attachment}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
json.total_count @journals.total_count
|
||||
json.journals @journals do |journal|
|
||||
json.partial! "children_detail", journal: journal
|
||||
json.partial! "api/v1/issues/journals/children_detail", journal: journal
|
||||
end
|
||||
@@ -1 +1 @@
|
||||
json.partial! "detail", journal: @object_result
|
||||
json.partial! "api/v1/issues/journals/detail", journal: @object_result
|
||||
@@ -4,5 +4,5 @@ json.total_comment_journals_count @total_comment_journals_count
|
||||
json.total_count @journals.total_count
|
||||
json.journals @journals do |journal|
|
||||
journal.associate_attachment_container
|
||||
json.partial! "detail", journal: journal
|
||||
json.partial! "api/v1/issues/journals/detail", journal: journal
|
||||
end
|
||||
@@ -1 +1 @@
|
||||
json.partial! "detail", journal: @object_result
|
||||
json.partial! "api/v1/issues/journals/detail", journal: @object_result
|
||||
@@ -1 +1 @@
|
||||
json.(status, :id, :name)
|
||||
json.(status, :id, :name, :pm_color)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
json.total_count @statues.total_count
|
||||
json.statues @statues.each do |status|
|
||||
json.partial! "simple_detail", locals: {status: status}
|
||||
json.partial! "api/v1/issues/statues/simple_detail", locals: {status: status}
|
||||
end
|
||||
26
app/views/api/v1/projects/_detail.json.jbuilder
Normal file
26
app/views/api/v1/projects/_detail.json.jbuilder
Normal file
@@ -0,0 +1,26 @@
|
||||
json.(project, :id, :name, :identifier, :description, :forked_count, :praises_count, :forked_from_project_id, :is_public)
|
||||
json.mirror_url project.repository&.mirror_url
|
||||
json.type project.numerical_for_project_type
|
||||
json.praised project.praised_by?(current_user)
|
||||
json.last_update_time render_unix_time(project.updated_on)
|
||||
json.time_ago time_from_now(project.updated_on)
|
||||
json.language do
|
||||
if project.project_language.blank?
|
||||
json.nil!
|
||||
else
|
||||
json.id project.project_language.id
|
||||
json.name project.project_language.name
|
||||
end
|
||||
end
|
||||
json.category do
|
||||
if project.project_category.blank?
|
||||
json.nil!
|
||||
else
|
||||
json.id project.project_category.id
|
||||
json.name project.project_category.name
|
||||
end
|
||||
end
|
||||
json.topics project.project_topics.each do |topic|
|
||||
json.(topic, :id, :name)
|
||||
end
|
||||
json.url project.full_url
|
||||
9
app/views/api/v1/projects/pipelines/build_node.yaml.erb
Normal file
9
app/views/api/v1/projects/pipelines/build_node.yaml.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
steps:
|
||||
- name: <%=self.node.name %>
|
||||
uses: <%=self.full_name %>
|
||||
<%if self.action_node_inputs.present? %>
|
||||
with:
|
||||
<% self.action_node_inputs.each do |input| %>
|
||||
<%=input.name %>: ''
|
||||
<%end %>
|
||||
<%end %>
|
||||
62
app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb
Normal file
62
app/views/api/v1/projects/pipelines/build_pipeline.yaml.erb
Normal file
@@ -0,0 +1,62 @@
|
||||
# action name
|
||||
name: <%=@pipeline_name %>
|
||||
|
||||
# 什么时候触发这个workflow
|
||||
on:
|
||||
<%@on_nodes.each do |node| %>
|
||||
<%if node.name.to_s.include?("on-push") %>
|
||||
push:
|
||||
<% node.input_values.each_key do |key| %>
|
||||
<%=key %>:
|
||||
<% if node.input_values[key].blank? %>
|
||||
- *
|
||||
<% else %>
|
||||
<% node.input_values[key].to_s.split(",").each do |val| %>
|
||||
- <%=val %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%if node.name.to_s.include?("on-pull_request") %>
|
||||
pull_request:
|
||||
<% node.input_values.each_key do |key| %>
|
||||
<%=key %>:
|
||||
<% if node.input_values[key].blank? %>
|
||||
- *
|
||||
<% else %>
|
||||
<% node.input_values[key].to_s.split(",").each do |val| %>
|
||||
- <%=val %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%if node.name.to_s.include?("on-schedule") %>
|
||||
schedule:
|
||||
<% node.input_values.each_key do |key| %>
|
||||
- <%=key %>: "<%=node.input_values[key] %>"
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
jobs:
|
||||
job1:
|
||||
# 运行环境
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
<%@steps_nodes.each do |node| %>
|
||||
- name: <%=node.label || node.name %>
|
||||
<% if node.name !="shell" %>
|
||||
uses: <%=node.full_name %>
|
||||
<% end %>
|
||||
<%if node.input_values.present? %>
|
||||
with:
|
||||
<% node.input_values.each_key do |key| %>
|
||||
<%=key %>: '<%=node.input_values[key] %>'
|
||||
<%end %>
|
||||
<%end %>
|
||||
<%if node.run_values.present? %>
|
||||
<% node.run_values.each_key do |key| %>
|
||||
<%=key %>: '<%=node.run_values[key] %>'
|
||||
<%end %>
|
||||
<%end %>
|
||||
<% end %>
|
||||
8
app/views/api/v1/projects/pipelines/index.json.jbuilder
Normal file
8
app/views/api/v1/projects/pipelines/index.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.status 0
|
||||
json.message "success"
|
||||
|
||||
json.pipelines @pipelines.each do |pip|
|
||||
json.extract! pip, :id, :pipeline_name, :pipeline_status, :description, :file_name, :is_graphic_design,
|
||||
:repo_name, :repo_identifier, :branch, :event, :sha, :disable, :json, :yaml, :created_at, :updated_at
|
||||
# json.project
|
||||
end
|
||||
5
app/views/api/v1/projects/pipelines/show.json.jbuilder
Normal file
5
app/views/api/v1/projects/pipelines/show.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.status 0
|
||||
json.message "success"
|
||||
json.extract! @pipeline, :id, :pipeline_name, :pipeline_status, :description, :file_name, :is_graphic_design,
|
||||
:repo_name, :repo_identifier, :branch, :event, :sha, :disable, :json, :yaml, :created_at, :updated_at
|
||||
# json.project
|
||||
89
app/views/api/v1/projects/pipelines/test.yaml.erb
Normal file
89
app/views/api/v1/projects/pipelines/test.yaml.erb
Normal file
@@ -0,0 +1,89 @@
|
||||
name: Check dist<%= @name %>
|
||||
|
||||
# action name
|
||||
name: Test with Junit
|
||||
|
||||
# 什么时候触发这个workflow
|
||||
on:
|
||||
# push 到master分之的时候 这里可以指定多个
|
||||
#push:
|
||||
# branches:
|
||||
# - master
|
||||
# paths-ignore:
|
||||
# - '**.md'
|
||||
# pull request 到master分之的时候, 这里可以指定多个
|
||||
#pull_request:
|
||||
# branches:
|
||||
# - master
|
||||
# paths-ignore:
|
||||
# - '**.md'
|
||||
# 定时调度执行
|
||||
schedule:
|
||||
- cron: '26 10,11 * * *'
|
||||
env:
|
||||
https_proxy: http://172.20.32.253:3128
|
||||
http_proxy: http://172.20.32.253:3128
|
||||
|
||||
# 一个workflow可以由多个job组成,多个job可以并行运行
|
||||
jobs:
|
||||
junit:
|
||||
strategy:
|
||||
matrix:
|
||||
# 指定jdk 版本。可以指定多个版本 比如[8,11,17]
|
||||
java: [11]
|
||||
# 指定运行 os 版本 也是多个
|
||||
os: [ 'ubuntu-latest' ]
|
||||
# 运行环境,这里就是上面定义的多个 os
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
||||
steps:
|
||||
# 将job的工作目录指向$GITHUB_WORSPACES checkout@v2比较旧不推荐使用
|
||||
- name: Checkout codes
|
||||
uses: actions/checkout@v3
|
||||
#- name: Install Java and Maven
|
||||
# uses: actions/setup-java@v3
|
||||
# with:
|
||||
# java-version: '11'
|
||||
# distribution: 'temurin'
|
||||
# 设置jdk环境
|
||||
- name: download latest temurin JDK
|
||||
id: download_latest_jdk
|
||||
env:
|
||||
HTTPS_PROXY: http://172.20.32.253:3128
|
||||
HTTP_PROXY: http://172.20.32.253:3128
|
||||
#run: curl -o https://testgitea2.trustie.net/xxq250/licensee-identify-api-sss/raw/branch/master/openlogic-openjdk-11.0.22+7-linux-x64.tar.gz
|
||||
run: wget -O $RUNNER_TEMP/java_package.tar.gz "http://172.20.32.202:10082/xxq250/licensee-identify-api-sss/raw/branch/master/OpenJDK11U-jdk_x64_linux_hotspot_11.0.22_7.tar.gz"
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'jdkfile'
|
||||
jdkFile: ${{ runner.temp }}/java_package.tar.gz
|
||||
java-version: '11.0.0'
|
||||
architecture: x64
|
||||
mvn-toolchain-vendor: 'Oracle'
|
||||
# 设置maven 仓库缓存 避免每次构建时都重新下载依赖
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Test java version
|
||||
run: java -version
|
||||
- name: Set up Maven
|
||||
uses: stCarolas/setup-maven@v5
|
||||
with:
|
||||
maven-version: 3.8.2
|
||||
- name: Setup Maven mirrors
|
||||
uses: s4u/maven-settings-action@v3.0.0
|
||||
with:
|
||||
mirrors: '[{"id": "alimaven", "name": "aliyun maven", "mirrorOf": "central", "url": "http://172.20.32.181:30005/repository/aliyun-maven/"}]'
|
||||
- name: env show
|
||||
run: env
|
||||
- name: cat maven-settings.xml
|
||||
run: cat /root/.m2/settings.xml
|
||||
- name: Test with Maven
|
||||
run: mvn clean test -B -U
|
||||
env:
|
||||
https_proxy: http://172.20.32.253:3128
|
||||
http_proxy: http://172.20.32.253:3128
|
||||
@@ -3,7 +3,7 @@ if user.present?
|
||||
json.type user.type
|
||||
json.name user.real_name
|
||||
json.login user.login
|
||||
json.image_url url_to_avatar(user)
|
||||
json.image_url Rails.application.config_for(:configuration)['platform_url'] + "/" + url_to_avatar(user).to_s
|
||||
else
|
||||
json.nil!
|
||||
end
|
||||
@@ -7,4 +7,24 @@ json.projects @projects.each do |project|
|
||||
json.last_update_time render_unix_time(project.updated_on)
|
||||
json.full_last_update_time project.updated_on
|
||||
json.time_ago time_from_now(project.updated_on)
|
||||
json.language do
|
||||
if project.project_language.blank?
|
||||
json.nil!
|
||||
else
|
||||
json.id project.project_language.id
|
||||
json.name project.project_language.name
|
||||
end
|
||||
end
|
||||
json.category do
|
||||
if project.project_category.blank?
|
||||
json.nil!
|
||||
else
|
||||
json.id project.project_category.id
|
||||
json.name project.project_category.name
|
||||
end
|
||||
end
|
||||
json.topics project.project_topics.each do |topic|
|
||||
json.(topic, :id, :name)
|
||||
end
|
||||
json.url project.full_url
|
||||
end
|
||||
@@ -19,6 +19,7 @@ json.version_releasesed_count @project.releases_size(@user.try(:id), "released")
|
||||
json.permission render_permission(@user, @project)
|
||||
json.mirror_url @project&.repository.remote_mirror_url
|
||||
json.mirror @project&.repository.mirror_url.present?
|
||||
json.has_actions @project.try(:has_actions)
|
||||
json.web_site @project.page.try(:identifier)
|
||||
json.type @project.numerical_for_project_type
|
||||
json.open_devops @project.open_devops?
|
||||
|
||||
@@ -47,7 +47,7 @@ json.setting do
|
||||
|
||||
json.main_site current_laboratory.main_site?
|
||||
json.new_course default_course_links
|
||||
|
||||
json.is_local EduSetting.get("is_local") == "true"
|
||||
|
||||
json.add do
|
||||
json.array! @add
|
||||
|
||||
Reference in New Issue
Block a user