Compare commits

...

No commits in common. "master" and "master" have entirely different histories.

660 changed files with 2103 additions and 71583 deletions

View File

@ -1,80 +0,0 @@
version: 2
name: test
description: ""
global:
concurrent: 1
<<<<<<< HEAD
=======
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset-operator: AND
>>>>>>> origin/master
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
<<<<<<< HEAD
docker_username: ((docker.username))
docker_password: ((docker.passward))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center"'
image_tag: '"latest"'
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: git_clone_0.git_path
=======
image_name: '""'
image_tag: '"latest"'
registry_address: '""'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: '"."'
>>>>>>> origin/master
image_push: true
build_args: '""'
needs:
- git_clone_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
<<<<<<< HEAD
remote_url: '"https://gitlink.org.cn/wangmingqiang/gitlink_help_center.git"'
=======
remote_url: '""'
>>>>>>> origin/master
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
<<<<<<< HEAD
ssh_pass: ((ssh.passward))
ssh_ip: '"47.97.180.226"'
ssh_port: '"3000"'
ssh_user: '"root"'
ssh_cmd: "'ls'"
=======
ssh_ip: '""'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '""'
>>>>>>> origin/master
needs:
- docker_image_build_0

View File

@ -1,29 +0,0 @@
version: 2
name: work
description: ""
global:
concurrent: 1
workflow:
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh.passward))
ssh_ip: '"47.97.180.226"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop ghc_group7 && docker rm ghc_group7 && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group7:latest
&& docker run -d -p 3000:3000 --name ghc_group7
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group7:latest"'
needs:
- start
- ref: start
name: 开始
task: start

View File

@ -1,35 +0,0 @@
version: 2
name: 【测试环境】合并请求通过后自动更新
description: 合并请求通过后自动更新
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: pr
ruleset:
- param-ref: merged
operator: EQ
value: "true"
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((hnxjy_test_83.password))
ssh_ip: '"111.8.36.180"'
ssh_port: '"120"'
ssh_user: '"root"'
ssh_cmd: '"cd /root/docusaurus/config/dir/awesometic-docs && git pull"'
needs:
- start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0

View File

@ -15,7 +15,7 @@ workflow:
build_action: '"build"'
build_args: '""'
install_args: '""'
registry_url: '""'
registry_url: '"https://registry.npmmirror.com/"'
disturl_url: '""'
sass_binary_site_url: '""'
package_management_type: '"yarn"'

View File

@ -1,38 +1,24 @@
version: 2
name: "2"
name: 实验一
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh.passward))
ssh_ip: '"47.97.180.226"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop ghc_group7 && docker rm ghc_group7 && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group7:latest
&& docker run -d -p 3000:3000 --name ghc_group7
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group7:latest"'
needs:
- docker_image_build_0
- ref: docker_image_build_0
name: docker镜像构建
task: docker_image_build@1.6.0
input:
docker_username: ((Docker.name))
docker_password: ((Docker.passward))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group7"'
docker_username: ((nudt_devops.nudt_devops))
docker_password: ((nudt_devops.nudt_devops))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5"'
image_tag: '"latest"'
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
@ -46,10 +32,31 @@ workflow:
name: git clone
task: git_clone@1.2.9
input:
remote_url: '"https://gitlink.org.cn/wangmingqiang/gitlink_help_center.git"'
username: ((ganshihao21.ganshihao21_user))
password: ((ganshihao21.ganshihao21))
remote_url: '"https://gitlink.org.cn/shuaihao/gitlink_help_center.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
needs:
- start
- ref: ssh_cmd_0
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_pass: ((ssh_key.ssh_key))
ssh_ip: '"47.96.164.145"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '"docker stop ghc_group5 && docker rm ghc_group5 && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5:latest
&& docker run -d -p 3000:3000 --name ghc_group5
registry.cn-guangzhou.aliyuncs.com/nudt_devops/gitlink_help_center_group5:latest"'
needs:
- docker_image_build_0
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0

View File

@ -3,20 +3,22 @@ name: 未命名项目
description: ""
global:
concurrent: 1
trigger:
webhook: gitlink@1.0.0
event:
- ref: push
ruleset-operator: AND
workflow:
- ref: start
name: 开始
task: start
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0
- ref: git_clone_0
name: git clone
task: git_clone@1.2.9
input:
remote_url: '""'
username: ((ganshihao21.ganshihao21_user))
password: ((ganshihao21.ganshihao21))
remote_url: '"https://gitlink.org.cn/ganshihao21/reposync.git"'
ref: '"refs/heads/master"'
commit_id: '""'
depth: 1
@ -26,12 +28,14 @@ workflow:
name: docker镜像构建
task: docker_image_build@1.6.0
input:
image_name: '""'
docker_username: ((nudt_devops.nudt_devops))
docker_password: ((nudt_devops.nudt_devops))
image_name: '"registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group5"'
image_tag: '"latest"'
registry_address: '""'
registry_address: '"registry.cn-guangzhou.aliyuncs.com"'
docker_file: '"Dockerfile"'
docker_build_path: '"."'
workspace: '"."'
workspace: git_clone_0.git_path
image_push: true
build_args: '""'
needs:
@ -40,10 +44,19 @@ workflow:
name: ssh执行命令
task: ssh_cmd@1.1.1
input:
ssh_ip: '""'
ssh_pass: ((ssh_key.ssh_key))
ssh_ip: '"47.96.164.145"'
ssh_port: '"22"'
ssh_user: '"root"'
ssh_cmd: '""'
ssh_cmd: '"docker stop abc_group5 && docker rm abc_group5 && docker pull
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group5:latest &&
docker run -d -p 3000:3000 --name abc_group5
registry.cn-guangzhou.aliyuncs.com/nudt_devops/reposync_group5:latest"'
needs:
- docker_image_build_0
- ref: end
name: 结束
task: end
needs:
- ssh_cmd_0

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/gitlink_help_center.iml" filepath="$PROJECT_DIR$/.idea/gitlink_help_center.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -1,6 +1,5 @@
FROM node:18-alpine
LABEL maintainer="wangmingqiang <wangmingqiang21@nudt.edu.cn>"
LABEL maintainer="yuankaifneg <2894340009@qq.com>"
WORKDIR /gitlink_help_center
@ -8,4 +7,4 @@ COPY ./ /gitlink_help_center/
RUN yarn install
RUN npm run build -- --locale zh-cn
CMD ["npm", "run", "serve"]
CMD ["npm", "run", "serve"]

View File

@ -86,8 +86,22 @@
```
## 前端build成中文 i18n中可编辑对应中文内容
```
npm run build -- --locale zh-CN
启动 npm run serve
```
启动
```
npm run serve
```
### 开发模式
启动
```
npm run dev
```

View File

@ -1,33 +0,0 @@
import os
import json
import requests
from pdfminer.high_level import extract_text
import re
def send_pdf_and_get_response(message):
# Moonshot API 密钥
MOONSHOT_API_KEY = "fea58b082997a69f199264ce8221430a.zC0hu8lce49CNBPJ"
# 构造请求的 headers
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {MOONSHOT_API_KEY}',
}
# 构造请求数据
data = {
"model": "glm-4", # Moonshot 模型
"messages": [
{"role": "user", "content":message}
],
"temperature": 0.01, # 温度参数,控制助手回复的多样性
}
# 发送 POST 请求
response = requests.post('https://open.bigmodel.cn/api/paas/v4/chat/completions', headers=headers, data=json.dumps(data))
response_json = response.json()
# 提取助手的回复
assistant_response = response_json#['choices'][0]['message']['content']
return assistant_response
print(send_pdf_and_get_response(1))

View File

@ -2,6 +2,74 @@
sidebar_label: 'bot安装'
sidebar_position: 1
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var aElements = document.getElementsByTagName('a');
var hzh = ['bot安装','bot安装'];
var hen = ['Bot Installation','Bot Installation'];
var azh = ['跳到主要内容','','帮助中心','','','','','','','','','','','','','','','','','','','','','机器人(Bot)','编辑此页','上一页 bot市场','下一页bot 配置','网站首页','关于我们','教学实践','合作伙伴','API文档','Git常用命令','引擎使用手册','服务协议','官网邮箱gitlink@ccf.org.cn','QQ群','公众号'];
var aen = ['Jump to main content','','Help Center','','','','','','','','','','','','','','','','','','','','','Robot (Bot)','Edit this page','last page Bot market','next page Bot configuration','Website homepage','About Us','Teaching practice','Partners','API documentation','Common Git commands','Engine User Manual','Service Agreement','Official website email: gitlink@ccf.org.cn','QQ group','Official Account'];
var zhtranalate = ['Bot安装是进行bot安装和管理控制的重要模块主要包括bot安装、安装查询、安装管理等功能。','在bot详情页用户点击“安装此Bot”按钮后可以看到该bot工作所需的各项权限信息。若用户同意授予bot所需的相关权限即可进行安装。用户可选择将bot安装到所有仓库用户拥有的所有仓库也可以选择指定的仓库进行安装。','','在个人“设置”或者“仓库设置”中用户可以看到目前已经安装的Bot情况点击“配置”按钮可以对bot安装情况进行配置点击“卸载”按钮可以进行卸载。','','在bot安装配置页中用户可以掌握该bot的安装位置和工作状态。若用户需要更改bot的工作仓库时可以进行更改安装位置。bot的工作状态包括激活和挂起用户可根据需要对bot的状态进行调整将其挂起或者激活会影响到bot对仓库数据的访问权限。','','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot installation is an important module for bot installation and management control, which mainly includes functions such as bot installation, installation queries, and installation management.','On the bot details page, after clicking the "Install this bot" button, users can see the necessary permission information for the bot to work. If the user agrees to grant the necessary permissions to the bot, installation can proceed. Users can choose to install the bot in all warehouses (all warehouses owned by the user) or select a specified warehouse for installation.','','In personal "settings" or "warehouse settings", users can see the current installation status of bots. Click the "configure" button to configure the bot installation status, and click the "uninstall" button to uninstall.','','In the bot installation configuration page, users can grasp the installation location and working status of the bot. If the user needs to change the workspace of the bot, they can change the installation location. The working status of bots includes activation and suspension. Users can adjust the status of bots as needed. Suspending or activating bots can affect their access to warehouse data.','','© Copyright 2024 CCF Open Source Development Committee','Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
if (aElements[0].innerText == azh[0]){
for (var i = 0; i < aElements.length; i++) {
if (aElements[i].innerText != ''){
if (i < aElements.length){
aElements[i].innerText = aen[i];
}
}
}
}
else{
for (var i = 0; i < aElements.length; i++) {
if (aElements[i].innerText != ''){
if (i < aElements.length){
aElements[i].innerText = azh[i];
}
}
}
}
}}>中/英</MyButton>
# bot安装

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot市场'
sidebar_position: 4
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot市场','bot市场'];
var hen = ['Bot Market','Bot Market'];
var zhtranalate = ['Bot市场是进行Bot分享与复用的重要模块主要包括bot的搜索发现详情查看等功能。','Bot市场主页中展示了目前所有已经上架市场的bot简要信息包括bot的头像名称开发者简介和安装次数等信息用户可根据这些基本信息初步判断该bot是否符合自己的项目需求。','在bot市场主页中用户可以选择指定的bot种类筛选出特定分类的bot在这个种类范围内进行搜索与选择。','此外用户通过在搜索栏中输入关键字进行搜索可检索出内容包含指定关键字的相关bot。','用户可结合种类筛选和关键字搜索缩小范围在市场中快速找到符合项目相关需求的bot。','','在bot市场页中用户点击指定的bot卡片即可进入该bot的详情页。Bot的详情页包含bot的头像名称开发者种类和详细介绍等信息用户可在此掌握该bot的各项介绍进一步判断是否将其安装到指定仓库中。','','在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。','去市场看看吧!','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['The bot market is an important module for sharing and reusing bots, mainly including functions such as searching, discovering, and viewing details of bots.' , 'The Bot Market homepage displays brief information about all bots that have been put on the market, including their avatars, names, developers, introductions, and installation times. Users can use this basic information to preliminarily determine whether the bot meets their project requirements.' , 'On the bot market homepage, users can select a specific type of bot, filter out specific categories of bots, and search and select within this category range.' , 'In addition, users can search for relevant bots containing specified keywords by entering keywords in the search bar.' , 'Users can combine category filtering and keyword search to narrow down the scope and quickly find bots that meet project related needs in the market.' , '' , 'In the bot market page, users can click on the specified bot card to enter the details page of the bot. The details page of the bot includes information such as the bot avatar, name, developer, type, and detailed introduction. Users can grasp the various introductions of the bot here and further determine whether to install it in the designated warehouse.' , '' , 'In the bot details page, if users believe that the bot meets their project requirements, they can click the "Install this bot" button to learn about the bots permission information and install it in the designated warehouse. For more information on installation, please refer to the "Bot Installation" section' , 'Go take a look at the market!' , '©Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trustie& IntelliDE 京ICP备13000930号'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot市场
@ -21,4 +67,16 @@ Bot市场主页中展示了目前所有已经上架市场的bot简要信息
![botmarket2](../../static/img/bot/botmarket2.png)
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。
去市场看看吧!
<MyButton onClick={() => {
location.href = "https://www.gitlink.org.cn/softbot";
}}>Bot市场</MyButton>

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot开发'
sidebar_position: 3
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot开发','bot开发'];
var hen = ['Bot Development','Bot Development'];
var zhtranalate = ['Bot开发是开发者进行bot注册的重要模块。' , '在个人“设置”中用户可以看到目前已经注册的bot列表点击对应bot的“编辑”按钮可以对已注册的bot进行配置点击“Bot注册”按钮开始注册新的bot。' , '' , '在注册页中开发者需要填写bot注册的相关信息包括bot的名称、Webhook 地址详细介绍等系统将对开发者输入的信息进行合法性校验确保bot各项信息的完整性和有效性。此外系统将自动生成bot的唯一标识同时调用 GitLink 平台的相关接口生成bot的身份凭证信息包括客户端密钥和私钥等。' , '开发者需通过这些身份信息结合平台接口进行bot身份认证后调用相关接口完成bot的相关功能。' , '平台开发API链接待完善https://www.gitlink.org.cn/docs/api#introduction' , '' , '' , '©Copyright 2024 CCF 开源发展委员会' , 'Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot development is an important module for developers to register their bots.' , 'In personal settings, users can see a list of registered bots and click the "Edit" button on the corresponding bot to configure the registered bots; Click the "Bot Registration" button to start registering a new bot.' , '' , 'In the registration page, developers need to fill in the relevant information for bot registration, including the name of the bot, Webhook address, detailed introduction, etc. The system will verify the legality of the information entered by the developer to ensure the completeness and validity of all bot information. In addition, the system will automatically generate a unique identifier for the bot, and call the relevant interfaces of the GitLink platform to generate the identity credential information of the bot, including the client key and private key.' , 'Developers need to use these identity information in combination with the platform interface for bot identity authentication, and then call the relevant interface to complete the relevant functions of the bot.' , 'Platform development API link (to be improved): https://www.gitlink.org.cn/docs/api#introduction' , '' , '' , '© Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot开发

View File

@ -2,6 +2,52 @@
sidebar_label: 'bot配置'
sidebar_position: 2
---
import MyButton from './mybutton';
<MyButton onClick={() => {
var pElements = document.getElementsByTagName('p');
var hElements = document.getElementsByTagName('h1');
var hzh = ['bot配置','bot配置'];
var hen = ['Bot Configure','Bot Configure'];
var zhtranalate = ['Bot配置是开发者进行bot维护和配置的重要模块主要包括bot基本信息维护、权限&订阅事件管理、高级选项配置等功能。','Bot的基本信息维护中开发者可以看到bot的各项基本信息并可以根据需要对bot的头像名称Webhook地址等进行修改。','','Bot的权限&订阅事件管理中开发者可根据对仓库资源的访问需要为bot分配不同的权限和等级比如增加代码库权限将拉取请求的写权限变为读权限等。开发者还能更改当前bot订阅的事件列表比如订阅代码库推送取消拉取请求分配订阅等以实现bot功能的更新与升级。','','Bot高级选项配置中开发者可以改变bot的公私有状态从而影响到bot的使用范围。需要注意的是公开状态下的bot在已有其他仓库安装的情况下不能变成私有。开发者可选择将bot上架到市场需要填写上架信息包括市场简介主要功能次要功能等各项信息。','开发者还能进行bot的删除和转让操作发起转让意味着更改bot的所有权需要输入接受者的用户名。在接受者确定接受后即可完成bot的所有权变更拒绝则会取消本次的转让操作。','','©Copyright 2024 CCF 开源发展委员会','Powered by Trustie& IntelliDE 京ICP备13000930号'];
var entranslate = ['Bot configuration is an important module for developers to maintain and configure bots, mainly including basic bot information maintenance, permission&subscription event management, advanced option configuration, and other functions.' , 'In the basic information maintenance of bots, developers can see various basic information of bots and modify their avatars, names, Webhook addresses, etc. as needed.' , '' , 'In the permission and subscription event management of bots, developers can assign different permissions and levels to bots based on their access needs to warehouse resources, such as adding code library permissions, changing write permissions for pull requests to read permissions, etc. Developers can also modify the event list of the current bot subscription, such as subscribing to code library push notifications, canceling pull request allocation subscriptions, etc., to achieve updates and upgrades of bot functionality.' , '' , 'In the advanced options configuration of bots, developers can change the public and private status of bots, thereby affecting their usage scope. It should be noted that bots in public status cannot become private when installed in other warehouses. Developers can choose to put their bots on the market and need to fill in the listing information, including market introduction, main functions, secondary functions, and other related information.' , 'Developers can also perform bot deletion and transfer operations, initiating transfer means changing the ownership of the bot, and the recipients username needs to be entered. After the recipient confirms acceptance, the ownership change of the bot can be completed. Refusal will cancel the transfer operation.' , '' , '© Copyright 2024 CCF Open Source Development Committee' , 'Powered by Trust&IntelliDE Beijing ICP Preparation No. 13000930'];
if (pElements[0].innerText == zhtranalate[0]){
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = entranslate[i];
}
}
}
}
else{
for (var i = 0; i < pElements.length; i++) {
if (pElements[i].innerText != ''){
if (i < pElements.length){
pElements[i].innerText = zhtranalate[i];
}
}
}
}
if (hElements[0].innerText == hzh[0]){
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hen[i];
}
}
}
}
else{
for (var i = 0; i < hElements.length; i++) {
if (hElements[i].innerText != ''){
if (i < hElements.length){
hElements[i].innerText = hzh[i];
}
}
}
}
}}>中/英</MyButton>
# Bot配置

View File

@ -0,0 +1,13 @@
import React from 'react';
import styles from './mybutton.module.css'; // 假设你有一个CSS模块文件来定义样式
const MyButton = ({ onClick, children, className = '' }) => (
<button
onClick={onClick}
className={`${styles.myButton} ${className}`} // 使用CSS模块样式
>
{children}
</button>
);
export default MyButton;

View File

@ -0,0 +1,21 @@
.myButton {
background-color: #30a834; /* Green */
border: none;
color: #fff; /* 改为白色或其他与绿色背景对比明显的颜色 */
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
position: absolute;
right: 0;
/* 还可以添加其他样式,比如过渡效果、阴影等 */
transition: background-color 0.3s ease; /* 背景色变化的过渡效果 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 简单的阴影效果 */
}
.myButton:hover {
background-color: #288f2c; /* 鼠标悬停时改变背景色 */
}

View File

@ -69,6 +69,25 @@ GitLink确实开源是CCF官方指定的开源创新服务平台旨在
<h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2>
<p>第三方服务使用及设置[3个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/通知/通知简介">
<h2 class="text--truncate cardTitle" title="通知">通知</h2>
<p>通知简介及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/个人主页建站/建站流程">
<h2 class="text--truncate cardTitle" title="个人主页建站">个人主页建站</h2>
<p>个人主页建站使用及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/平台公告">
<h2 class="text--truncate cardTitle" title="平台公告">平台公告</h2>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/服务协议/GitLink服务协议">
<h2 class="text--truncate cardTitle" title="服务协议">服务协议</h2>
<p>GitLink服务协议[1个文档]</p>
</a></article>
</section>
</div>
</div>

View File

@ -1,4 +1,11 @@
---
sidebar_label: '代码提交'
sidebar_position: 3
---
---
### **1. 代码提交入口**
用户可以通过项目代码库中间的文件下的“上传文件”按键来上传文件。
![](../../static/img/代码库管理/代码提交/上传文件入口.png)<br/>
### **2. 上传文件**
进入上传文件页面后,如下图所示,拖动文件,选择提交变更的分支的单击”创建项目“按键即可完成创建。
![](../../static/img/代码库管理/代码提交/上传文件.png)<br/>

View File

@ -1,4 +1,13 @@
---
sidebar_label: '分支管理'
sidebar_position: 5
---
---
### **1. 查看分支**
在代码库栏下,如下图所示,用户可以点击代码库分支从而查看当前项目的所有分支,并且选择对其进行操作。
![](../../static/img/代码库管理/分支管理/分支管理方式1.jpg)<br/>
### **2. 合并分支**
在“和并请求PR”下点击“新建合并请求”后
![](../../static/img/代码库管理/分支管理/分支管理方式3.png)<br/>
如下图所示,用户可以选择源分支与目标分支以及填写分支信息后提交分支合并请求。
![](../../static/img/代码库管理/分支管理/分支管理方式2.png)<br/>

View File

@ -1,4 +1,19 @@
---
sidebar_label: '文件管理'
sidebar_position: 4
---
---
### **1. 文件管理位置**
在代码库界面,可直接对代码库中该分支下的文件进行操作,如下图所示。
![](../../static/img/代码库管理/文件管理/文件管理入口.png)<br/>
### **2. 进入目录**
点击进入相关目录,找到要编辑的文件,如下图所示。
![](../../static/img/代码库管理/文件管理/进入文件所在目录.png)<br/>
### **3. 进入文件编辑页面**
在线编辑文件,单击文件,即可进入编辑文件页面,如下图所示。
![](../../static/img/代码库管理/文件管理/进入文件编辑界面.png)<br/>
### **4. 编辑文件**
编辑界面右侧有三个按钮,分别是“下载”、“编辑”和“删除”,点击下载即可将文件下载到本地,编辑则可在线编辑文档,删除则将文件从代码库中删除,按钮位置如下图所示。
![](../../static/img/代码库管理/文件管理/文件编辑按钮.png)<br/>

View File

@ -3,4 +3,11 @@ sidebar_label: '代码评审'
sidebar_position: 3
---
# 代码评审
# 代码评审
### **1. 进入代码评审**
如下图所示,点击“代码评审”按钮可以进入代码评审
![](../../static/img/PR/进入代码评审.png)<br/>
### **2. 代码评审界面**
如下图所示用户可以在该界面下查看该PR操作要合并的新的代码并对其进行评审。
![](../../static/img/PR/具体代码评审.png)<br/>

View File

@ -9,20 +9,20 @@ sidebar_position: 9
## Web IDE 核心能力
对标有容器的标准版,极速版 IDE 主要在读、写、运行、提交等方面进行了探索:
**1. 读:**
**1. 读:**
- a. 适配了多种代码托管平台,例如 Gitlink、Github、Gitlab 等代码托管平台,业务可以非常方便的使用代码服务的能力
- b. 内置了包括 Java、TS/JS、C++、Go、Python、Rust 等几十种常见语言的语法高亮支持
- c. 支持了如 Git Blame、GitGraph 等代码阅读辅助插件
**2. 写:**
**2. 写:**
- a. 支持 HTML/CSS/JS/Markdown 等在线语言服务能力,支持错误诊断能力
- b. 浏览器文件系统
**3. 运行:**
**3. 运行:**
- a. 支持基于 Skypack 的前端代码运行方案
- b. 支持基于 Pyodide 的 Python 运行
**4. 提交:**
**4. 提交:**
- a. 支持 WebSCM提供分支切换/新增、代码提交等能力
如果说以 CodeMirror、Monaco 为代表的浏览器 IDE 组件为 Web IDE 1.0,那拥有上述能力的极速版 Web IDE 就是 Web IDE 2.0。极速版 Web IDE 方案在蚂蚁内部与 2021 年 4 月上线,承接了代码阅读、代码评审、在线笔试、代码检查结果反馈、轻量在线研发等众多场景,同年 8 月 vscode.dev 和 github.dev 上线,与之相比,极速版 Web IDE 利用 OpenSumi 框架的高扩展性,业务可以更加深度的定制模块与插件,让业务有多的想象空间。
@ -72,7 +72,7 @@ Gitlink 代码阅读场景虽然接入极速版 IDE 编辑器,但文件树、
![](/img/di_san_fang/WebIDE/JS语言服务提示.png)
<center>JS语言服务提示</center>
- 3. 提供了 Java、Go、Python、C++、Php 的在线语言服务能力,支持简单的定义跳转、查找引用等功能,让大家更加方便的阅读代码
- 3.提供了 Java、Go、Python、C++、Php 的在线语言服务能力,支持简单的定义跳转、查找引用等功能,让大家更加方便的阅读代码
![](/img/di_san_fang/WebIDE/python查看引用.png)
<center>Python 查看引用</center>

View File

@ -62,6 +62,6 @@ sidebar_position: 1
## 用户操作流程
![](../../static/img/di_san_fang/重晴鸟代码溯源/用户操作流程.png)<br/>
![](../../static/img/di_san_fang/重晴鸟代码溯源/用户操作流程(新).png)<br/>
<center>用户操作流程</center><br/>

View File

@ -1,4 +1,21 @@
---
sidebar_label: '组织成员管理'
sidebar_position: 4
---
---
# 成员管理Members Management
在 个人所管理的项目当中的**仓库设置**当中的**成员管理**可以进入成员管理界面
![](/img/Org/imageOrg14.png)
## 成员查询和添加
在成员管理界面当中,可以进行组织成员的查询和添加
![](/img/Org/imageOrg14.png)
## 成员邀请权限设置
管理员可以对邀请成员的权限进行设置
![](/img/Org/imageOrg15.png)
此外,也可以复制邀请链接的方式来更方便地邀请成员加入到项目当中来
**注**:此项功能仅对管理员可见

View File

@ -1,4 +1,15 @@
---
sidebar_label: '模板导入及导出'
sidebar_position: 2
---
---
# 确实开源帮助中心
## 模板的导入及导出管理
#### 1.模板导入
通过点击wiki界面的**导入模板**按钮即可导入本地的txtmarkdown等格式文件进行Wiki文档的创建当前平台此项功能尚在开发测试环节
[](/img/wiki/img4.png)
#### 2.模板导出
当前平台此项功能尚在开发测试环节
<br/>

View File

@ -3,20 +3,21 @@ sidebar_label: '维基页面管理'
sidebar_position: 1
---
# 维基界面管理
**1.维基界面**
GitLink项目安排了专门的**维基(Wiki)界面** 来展示项目的一些情况
**2.创建维基内容**
# 确实开源帮助中心
## 维基界面管理
#### 1.维基界面
GitLink项目安排了专门的**维基(Wiki)界面**来展示项目的一些情况
[](/img/wiki/img1.png)
#### 2.创建维基内容
在初始化的维基界面当中点击**创建Wiki文档**或者**导入模板**即可进行Wiki文档的编辑
<br/>
![](/img/wiki1.png)
**3.进行Wiki文档的编辑**
#### 3.进行Wiki文档的编辑
点击**创建Wiki文档**后即跳转到编辑界面,初始内容为空白的文档
也可以通过勾选添加模板来进行模板的导入,平台提供的模板包括周报和月报的格式
完成编辑后点击左下角的的保存即可
![](/img/wiki2.png)
[](/img/wiki/img3.png)
也可以通过勾选*添加模板*来进行模板的导入,平台提供的模板包括*周报*和*月报*的格式
[](/img/wiki/img2.png)
完成编辑后点击左下角的的保存即可

View File

@ -1,4 +0,0 @@
{
"label": "联系我们",
"position": 101
}

View File

@ -1,19 +0,0 @@
---
sidebar_label: '联系'
sidebar_position: 1
---
# 联系渠道
如果你有问题,可以通过以下方式联系我们
1.邮箱2023210156@qq.com
2.开发维护人员电话
王顺康110
肖帆18879439530
刘屹涛119
王明强12011

View File

@ -12,6 +12,7 @@ sidebar_position: 2
![](/img/notice/home_notice.png)
<br/>
或在头像下拉列表中选择设置可以进入消息通知设置界面;
![](/img/notice/into_notice.png)
#### 2.进行通知设置

View File

@ -1,4 +0,0 @@
{
"label": "问题反馈",
"position": 200
}

View File

@ -1,28 +0,0 @@
---
sidebar_label: '常见问题'
sidebar_position: 1
---
import { MDXCreateElement } from '@mdx-js/react';
import YourComponent from '../../src/pages/MyForm';
# 常见问题
## 常见问题罗列
1. 问冲突Conflicts当合并分支或拉取远程更改时可能会出现冲突怎么办
答:解决冲突的方法包括手动编辑文件以解决冲突、使用图形化工具进行解决、或者取消合并并重新尝试。
2. 问提交错误Committing Mistakes可能会不小心提交了错误的文件或信息。
答:可以使用 git commit --amend 命令来修改最近一次提交,或者使用交互式 rebase 来修改历史记录。
3. 问丢失提交Lost Commits有时可能会意外丢失提交记录。
答:可以使用 git reflog 命令来查找丢失的提交,然后将其恢复。
4. 问分支管理问题Branch Management Issues可能会遇到创建、合并、删除分支时的问题。
答:确保在操作分支之前了解清楚分支的当前状态,并使用正确的命令来执行相应的操作。
## 提出你的问题
<YourComponent />

View File

@ -16,6 +16,12 @@ module.exports = {
scripts: [],
// stylesheets: ['styles/dark-mode.css'],
themeConfig: {
docs:{
sidebar:{
hideable:true,
},
},
metadata:[
{name:"Keywords",content:"Gitlink,forgeplus,GitLink,gitLink,GitLink,gitlink,帮助中心"},
{name:"hostname",content:"gitlink.org.cn"},
@ -41,6 +47,7 @@ module.exports = {
respectPrefersColorScheme: true,
},
navbar: {
hideOnScroll:true,
style:"dark",
title: '',
logo: {
@ -58,6 +65,11 @@ module.exports = {
position: 'left',
label: '帮助中心'
},
{
type: 'docsVersionDropdown',
position: 'left',
dropdownActiveClassDisabled: true
},
// {
// href: 'https://github.com/boxyhq',
// position: 'right',
@ -170,8 +182,6 @@ module.exports = {
],
i18n: {
defaultLocale: 'zh-cn',
locales: ['zh-cn','en'],
locales: ['zh-cn'],
},
};

1
gitee私人令牌.txt Normal file
View File

@ -0,0 +1 @@
23e041136cc43bcfa244f806799f5640

4592
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,8 +19,6 @@
"@docusaurus/plugin-client-redirects": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/mdx": "^3.0.1",
"@mdx-js/react": "1.6.22",
"@node-rs/jieba": "^1.7.0",
"clsx": "1.2.1",

View File

@ -6,12 +6,4 @@ module.exports = {
label: 'Docs',
}
],
module: {
rules: [
{
test: /\.mdx$/,
use: ['babel-loader', '@mdx-js/loader']
}
]
}
};

View File

@ -1,34 +0,0 @@
import React, { useState } from 'react';
import axios from 'axios';
const YourComponent = () => {
const [message, setMessage] = useState('');
const [assistantResponse, setAssistantResponse] = useState('');
const handleSubmit = async (event) => {
event.preventDefault();
try {
const response = await axios.post('http://127.0.0.1:5000/moonshot', { message });
setAssistantResponse(response.data.assistantResponse);
} catch (error) {
console.error('Error communicating with backend:', error);
}
};
return (
<div>
<form onSubmit={handleSubmit}>
<input type="text" value={message} onChange={(e) => setMessage(e.target.value)} />
<button type="submit">提交</button>
</form>
<div>
AI回复: {assistantResponse}
</div>
</div>
);
};
export default YourComponent;

View File

@ -1,22 +0,0 @@
import React from 'react';
import { useTranslation } from '@docusaurus/Translate';
function LanguageSwitcher() {
const { currentLocale, locales, localeMetadata } = useTranslation();
const handleLanguageChange = (e) => {
window.location.href = `/${e.target.value}/`;
};
return (
<select value={currentLocale} onChange={handleLanguageChange}>
{locales.map((locale) => (
<option key={locale} value={locale}>
{localeMetadata[locale].name}
</option>
))}
</select>
);
}
export default LanguageSwitcher;

View File

@ -1,10 +1,6 @@
import React from 'react';
import { ThemeClassNames } from '@docusaurus/theme-common';
import Layout from '@theme/Layout';
<<<<<<< HEAD
import LanguageSwitcher from './LanguageSwitcher';
=======
>>>>>>> origin/master
import styles from './styles.module.css';
import ListItem from './ListItem';
@ -30,10 +26,6 @@ export default function BlogListPage(props) {
{posts.map(({ content }) => (
<ListItem key={content.metadata.permalink} content={content} />
))}
<<<<<<< HEAD
<LanguageSwitcher />
=======
>>>>>>> origin/master
</div>
</main>
</Layout>

0
static/images/devices/launchacologo.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

0
static/images/devices/mobileapp.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
static/images/devices/webapp.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
static/images/logo.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
static/img/wiki/img1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
static/img/wiki/img2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
static/img/wiki/img3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
static/img/wiki/img4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,4 @@
{
"label": "机器人(Bot)",
"position": 8
}

View File

@ -0,0 +1,20 @@
---
sidebar_label: 'bot安装'
sidebar_position: 1
---
# bot安装
Bot安装是进行bot安装和管理控制的重要模块主要包括bot安装、安装查询、安装管理等功能。
在bot详情页用户点击“安装此Bot”按钮后可以看到该bot工作所需的各项权限信息。若用户同意授予bot所需的相关权限即可进行安装。用户可选择将bot安装到所有仓库用户拥有的所有仓库也可以选择指定的仓库进行安装。
![botinstall1](../../../static/img/bot/botinstall1.png)
在个人“设置”或者“仓库设置”中用户可以看到目前已经安装的Bot情况点击“配置”按钮可以对bot安装情况进行配置点击“卸载”按钮可以进行卸载。
![botinstall2](../../../static/img/bot/botinstall2.png)
在bot安装配置页中用户可以掌握该bot的安装位置和工作状态。若用户需要更改bot的工作仓库时可以进行更改安装位置。bot的工作状态包括激活和挂起用户可根据需要对bot的状态进行调整将其挂起或者激活会影响到bot对仓库数据的访问权限。
![botinstall3](../../../static/img/bot/botinstall3.png)

View File

@ -0,0 +1,24 @@
---
sidebar_label: 'bot市场'
sidebar_position: 4
---
# Bot市场
Bot市场是进行Bot分享与复用的重要模块主要包括bot的搜索发现详情查看等功能。
Bot市场主页中展示了目前所有已经上架市场的bot简要信息包括bot的头像名称开发者简介和安装次数等信息用户可根据这些基本信息初步判断该bot是否符合自己的项目需求。
在bot市场主页中用户可以选择指定的bot种类筛选出特定分类的bot在这个种类范围内进行搜索与选择。
此外用户通过在搜索栏中输入关键字进行搜索可检索出内容包含指定关键字的相关bot。
用户可结合种类筛选和关键字搜索缩小范围在市场中快速找到符合项目相关需求的bot。
![botmarket1](../../../static/img/bot/botmarket1.png)
在bot市场页中用户点击指定的bot卡片即可进入该bot的详情页。Bot的详情页包含bot的头像名称开发者种类和详细介绍等信息用户可在此掌握该bot的各项介绍进一步判断是否将其安装到指定仓库中。
![botmarket2](../../../static/img/bot/botmarket2.png)
在bot详情页中若用户认为该bot满足自己的项目需求可点击“安装此Bot”按钮了解该bot的权限信息将其安装到指定的仓库中关于安装的更多介绍可见“Bot安装”部分。

View File

@ -0,0 +1,22 @@
---
sidebar_label: 'bot开发'
sidebar_position: 3
---
# Bot开发
Bot开发是开发者进行bot注册的重要模块。
在个人“设置”中用户可以看到目前已经注册的bot列表点击对应bot的“编辑”按钮可以对已注册的bot进行配置点击“Bot注册”按钮开始注册新的bot。
![botcreate1](../../../static/img/bot/botcreate1.png)
在注册页中开发者需要填写bot注册的相关信息包括bot的名称、Webhook 地址详细介绍等系统将对开发者输入的信息进行合法性校验确保bot各项信息的完整性和有效性。此外系统将自动生成bot的唯一标识同时调用 GitLink 平台的相关接口生成bot的身份凭证信息包括客户端密钥和私钥等。
开发者需通过这些身份信息结合平台接口进行bot身份认证后调用相关接口完成bot的相关功能。
平台开发API链接待完善https://www.gitlink.org.cn/docs/api#introduction
![botcreate2](../../../static/img/bot/botcreate2.png)
![botcreate3](../../../static/img/bot/botcreate3.png)

View File

@ -0,0 +1,23 @@
---
sidebar_label: 'bot配置'
sidebar_position: 2
---
# Bot配置
Bot配置是开发者进行bot维护和配置的重要模块主要包括bot基本信息维护、权限&订阅事件管理、高级选项配置等功能。
Bot的基本信息维护中开发者可以看到bot的各项基本信息并可以根据需要对bot的头像名称Webhook地址等进行修改。
![botconfig1](../../../static/img/bot/botconfig1.png)
Bot的权限&订阅事件管理中开发者可根据对仓库资源的访问需要为bot分配不同的权限和等级比如增加代码库权限将拉取请求的写权限变为读权限等。开发者还能更改当前bot订阅的事件列表比如订阅代码库推送取消拉取请求分配订阅等以实现bot功能的更新与升级。
![botconfig2](../../../static/img/bot/botconfig2.png)
Bot高级选项配置中开发者可以改变bot的公私有状态从而影响到bot的使用范围。需要注意的是公开状态下的bot在已有其他仓库安装的情况下不能变成私有。开发者可选择将bot上架到市场需要填写上架信息包括市场简介主要功能次要功能等各项信息。
开发者还能进行bot的删除和转让操作发起转让意味着更改bot的所有权需要输入接受者的用户名。在接受者确定接受后即可完成bot的所有权变更拒绝则会取消本次的转让操作。
![botconfig3](../../../static/img/bot/botconfig3.png)

View File

@ -0,0 +1,4 @@
{
"label": "DevOps引擎(Engine)",
"position": 6
}

View File

@ -0,0 +1,12 @@
---
sidebar_label: '代码流水线'
sidebar_position: 5
---
# 代码流水线
可以通过代码的形式(YAML格式)来配置流水线,首先选择代码流水线和对应的分支:
![code_workflow1](../../../static/img/engine/code_workflow1.jpg)
编辑流水线代码,其流水线名称描述、触发器、全局参数、执行串行/并发和流水线编排等概念同图形流水线,具体描述如下:
![code_workflow2](../../../static/img/engine/code_workflow2.png)

View File

@ -0,0 +1,15 @@
---
sidebar_label: '参数配置'
sidebar_position: 2
---
# 参数配置
可在流水线中使用,实现动态参数配置;有字符串、数字、布尔三种类型。
![parameter1](../../../static/img/engine/parameter1.png)
在流水线的配置中通过如下方式获取参数:
![parameter2](../../../static/img/engine/parameter2.png)

View File

@ -0,0 +1,50 @@
---
sidebar_label: '图形流水线'
sidebar_position: 4
---
# 图形流水线
## 基本信息
可以编辑流水线的名称、描述
同一仓库下的流水线名称不能重复
![vis_workflow1](../../../static/img/engine/vis_workflow1.png)
## 触发器
注:流水线编排时,触发器要放在开始节点之前;目前一条流水线仅添加支持一个触发器
* 定时触发器cron可通过填写cron表达式设置触发的具体时间
![vis_workflow2](../../../static/img/engine/vis_workflow2.png)
* 事件触发器GitLink_Webhook给出了常见的代码变更事件触发包括推送代码、合并请求、创建标签
![vis_workflow3](../../../static/img/engine/vis_workflow3.png)
## 全局参数
添加后可在当前流水线中使用
![vis_workflow4](../../../static/img/engine/vis_workflow4.png)
使用实例
![vis_workflow5](../../../static/img/engine/vis_workflow5.png)
## 并发执行
![vis_workflow6](../../../static/img/engine/vis_workflow6.png)
开启后同一流水线可同时并发执行n个流水线实例每触发一次我们得到一个流水线实例
![vis_workflow7](../../../static/img/engine/vis_workflow7.png)
若未开启则当前流水线实例执行中后面的实例处于排队状态最多可排队5个实例。当前实例执行完成下一个实例开始执行。
![vis_workflow8](../../../static/img/engine/vis_workflow8.png)
## 流水线编排
每条流水线必须要有一个开始节点、结束节点,至少一个任务节点。支持串行编排和并行编排。

View File

@ -0,0 +1,16 @@
---
sidebar_label: '密钥设置'
sidebar_position: 3
---
# 密钥设置
将账号密码、密钥、证书等存放到密钥管理里,配置后可直接在流水线中使用,避免因直接填写引起的泄露风险。
![secret1](../../../static/img/engine/secret1.png)
使用示例
注:节点输入参数中,下拉选项为密钥类型,需要提前配置好密钥在流水线中选择使用
![secret2](../../../static/img/engine/secret2.png)

View File

@ -0,0 +1,13 @@
---
sidebar_label: '引擎简介'
sidebar_position: 1
---
# 引擎
引擎(Engine)是GitLink提供的一款DevOps工具通过简单的节点编排来构建开发、测试、部署流水线从而创建自动化的软件交付流程。
它可以实现持续的代码集成,让开发者能尽早发现质量问题,快速定位修复,提升软件开发效率和质量;自动化的代码扫描、编译打包、单元测试,把研发团队从重复的工作中解放出来,聚焦到更有价值的事情上。
![engine_intro](../../../static/img/engine/engine_intro.jpg)
在引擎页面中,用户可以创建和编辑图形流水线或代码流水线、设置外部参数、管理密钥等操作。

View File

@ -0,0 +1,10 @@
---
sidebar_label: '执行记录查询'
sidebar_position: 6
---
# 执行记录查询
用户可以查看流水线的运行状态
![result](../../../static/img/engine/result.png)

View File

@ -0,0 +1,74 @@
---
sidebar_label: "介绍"
label: "介绍"
sidebar_position: 1
slug: /
---
# 关于GitLink
GitLink确实开源是CCF官方指定的开源创新服务平台旨在以“为开源创新服务”为使命以“成为开源创新的汇聚地”为愿景秉承“创新、开放、协作、共享”的价值观致力于为大规模开源开放协同创新助力赋能打造创新成果孵化和新工科人才培养的开源创新生态
![](/img/ccf_gitlink.png)
# 平台功能
- **分布式协作开发**:支持在线文件编辑、分支管理、贡献统计、仓库复刻、合并请求;
- **一站式过程管理**支持疑修、里程碑、通知提醒、标签归档、Wiki文档、组织管理
- **高效流水线运维**:提供轻量级工作流引擎,并支持自定义配置、静态扫描、制品构建;
- **多层次代码分析**:支持代码溯源分析、许可证风险分析、开源漏洞检测和加固建议;
- **多维度用户画像**:支持开发活动统计、贡献日历、能力建模、角色与专业定位分析。
# 帮助文档
帮助文档有助于您全面了解GitLink平台让我们一起为开源创新贡献力量
<div class="row">
<div class="col col--12">
<section class="row list">
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/快速开始/注册GitLink账号">
<h2 class="text--truncate cardTitle" title="快速开始">快速开始</h2>
<p>帮助用户快速注册使用平台[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/代码库管理/仓库创建">
<h2 class="text--truncate cardTitle" title="代码库管理">代码库管理</h2>
<p>代码库使用及设置[8个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/组织管理/组织简介">
<h2 class="text--truncate cardTitle" title="组织管理">组织管理</h2>
<p>组织使用及设置[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/疑修/疑修简介">
<h2 class="text--truncate cardTitle" title="疑修">疑修</h2>
<p>疑修(Issue)使用及设置[7个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/合并请求/合并请求简介">
<h2 class="text--truncate cardTitle" title="合并请求">合并请求</h2>
<p>合并请求(Pull Request)使用及设置[5个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/DevOps引擎/引擎简介">
<h2 class="text--truncate cardTitle" title="DevOps引擎">DevOps引擎</h2>
<p>DevOps引擎(Engine)使用及设置[6个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/维基/模板导入及导出">
<h2 class="text--truncate cardTitle" title="维基">维基</h2>
<p>维基(Wiki)使用及设置[2个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/Bot市场/bot安装">
<h2 class="text--truncate cardTitle" title="Bot市场">Bot市场</h2>
<p>Bot市场使用及设置[4个文档]</p>
</a></article>
<article class="col col--6 margin-bottom--lg">
<a class="card padding--lg cardContainer" href="/第三方服务/跨平台代码同步">
<h2 class="text--truncate cardTitle" title="第三方服务">第三方服务</h2>
<p>第三方服务使用及设置[3个文档]</p>
</a></article>
</section>
</div>
</div>

View File

@ -0,0 +1,4 @@
{
"label": "个人主页建站",
"position": 13
}

View File

@ -0,0 +1,69 @@
---
sidebar_label: '建站工具'
sidebar_position: 2
---
# 个人建站工具
个人主页建站是一个免费的静态网页托管服务,可用于托管静态个人主页、个人博客等静态页面。个人建站不同工具如下
### Hugo工具
使用Hugo 工具创建的仓库需要将代码仓库中config.toml 文件中的 baseURL 修改
将值改成 个人建站服务中显示的网站地址,
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么 config.toml 中的 baseURL 应该为 http://KingChan.gitlink.net
![img](../../../static/img/个人主页建站/建站工具1.png)
修改完毕后点击提交
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,开始部署
![img](../../../static/img/建站工具3.png)
静态页面预览
![img](../../../static/img/建站工具4.png)
### jekyll工具
如果是jekyll项目
使用jekyll工具创建的个人站点需要对代码仓库中 _config.yml文件中的 baseurl和url两个值进行修改jekyll的配置文件比较特殊需要根据 个人建站服务 中显示的 网站地址
内容修改两个值。
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么结果如下:
baseurl: "/"
url: "http://KingChan.gitlink.net"
![img](../../../static/img/建站工具5.png)
修改完成后点击 提交变更
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,前往建站服务开始部署
![img](../../../static/img/建站工具7.png)
![img](../../../static/img/建站工具8.png)
### hexo工具
如果是 hexo项目
使用Hexo工具创建的仓库需要将代码仓库中_config.yml 文件中的 url修改
将值改成 个人建站服务中显示的网站地址,
例如: 现在有一个网站地址为 http://KingChan.gitlink.net
那么 _config.toml 中的 url应该为 http://KingChan.gitlink.net
![img](../../../static/img/建站工具9.png)
修改完毕后提交变更
![img](../../../static/img/个人主页建站/建站工具2.png)
提交完成后,前往建站服务开始部署
![img](../../../static/img/建站工具11.png)
![img](../../../static/img/建站工具12.png)
![img](../../../static/img/建站工具13.png)
### file 工具
文档格式工具,使用该工具会部署所选中分支下的所有文件。
注: 以上所有工具都可以使用 gh-pages 分支,在部署时选中 gh-pages 分支,则会按照文档格式工具部署,也就是部署分支下的所有文件。

View File

@ -0,0 +1,50 @@
---
sidebar_label: '建站流程'
sidebar_position: 1
---
# 个人建站流程
### 我的站点
鼠标移动至右上角头像位置,点击设置进入我的设置界面
![img](../../../static/img/建站工具/1.png)
点击左测面板中 个人建站 - 我的站点
![img](../../../static/img/建站工具/3.png)
### 创建站点
在我的站点界面点击 新建站点 按钮,进入新建站点界面
在新建站点界面输入站点名称,此名称将在我的站点列表中展示
并且选择对应的建站工具与主题我们为您提供了3种不同的工具每个工具10种主题一共30种供您挑选
![img](../../../static/img/建站工具/4.png)
填写完毕后,点击页面下方蓝色按钮: 创建站点
![img](../../../static/img/建站工具/5.png)
这样您就拥有了一个网站,并且有了一个代码仓库。
在仓库的 服务 一栏中 个人建站服务的操作界面,这里您可以查看一些您的站点状态、站点名称、网站地址、建站工具、建站时间
### 部署站点
![img](../../../static/img/建站工具/6.png)
点击去部署按钮,选择想要部署的分支后点击确定
![img](../../../static/img/建站工具/7.png)
等待程序运行一会儿后,会返回一些服务器部署信息给您
部署成功后您就可以访问站点了。点击网站地址就可以跳转
![img](../../../static/img/建站工具/8.png)
### 部署完成
![img](../../../static/img/建站工具/9.png)

View File

@ -0,0 +1,41 @@
---
sidebar_label: 'WebIDE'
sidebar_position: 9
---
### **1. 语言服务**
● 支持近 40 种语言的语法高亮
● 支持 JavaScript/TypeScript、HTML、CSS、JSON、Markdown 的基于 LSP (Language Server Protocol) 语言特性功能,具备智能提示和大纲信息以及单文件内跳转。
● 支持 Java、Go、Python、C++、Php 的基于 Tree Sitter 的在线语言服务能力,提供查看引用、符号搜索等特性
### **2. WebIDE 入口**
从 Gitlink 仓库首页 点击Web IDE 按键即可进入
![](../../../static/img/代码库管理/WebIDE/WebIDE入口.png)<br/>
### **3. 分支**
支持分支切换:点击左下角分支名即可切换分支。
![](../../../static/img/代码库管理/WebIDE/WebIDE切换分支.png)<br/>
### **4. 搜索**
当前支持 Gitlink 仓库内代码搜索(支持单词匹配和文件过滤)和文件搜索。
![](../../../static/img/代码库管理/WebIDE/WebIDE搜索.png)<br/>
### **5. 行高亮**
支持单行或多行高亮,点击行号即可高亮行,按住 Shift 可选中连续多行。
![](../../../static/img/代码库管理/WebIDE/WebIDE行高亮.png)<br/>
### **6. Blame**
支持查看单行 blame 信息hover 后可展示详细信息。
![](../../../static/img/代码库管理/WebIDE/WebIDEblame.png)<br/>
### **7. Graph**
支持 graph 视图,可查看分支 commits 历史以及每个 commit 详细文件变更,并支持文件 diff 查看。底部状态栏左下角点击 Git Graph 或在命令面板输入 View Git Graph即可打开 Git Graph 视图。
![](../../../static/img/代码库管理/WebIDE/WebIDEGraph.png)<br/>
### **8. WebSCM**
可以在极速版新建分支,修改代码后在 SCM 面板看到变更文件列表,写完 commit message 后提交到 Gitlink 上。如果想快速修改一些文件可以不用在本地修改,直接通过极速版修改代码一次性提交。
### **9. 代码在线运行**
● 集成了基于 skypack 的更加轻量的 CodeSwing 插件,可以在极速版去运行前端代码。
● 集成了基于 Pyodide 的 Code-Runner-For-Web 插件,可以将 Python 的运行搬到浏览器上。
![](../../../static/img/代码库管理/WebIDE/WebIDE代码在线运行.png)<br/>

View File

@ -0,0 +1,38 @@
---
sidebar_label: 'Webhook'
sidebar_position: 8
---
### **1. Webhook模块入口**
在项目主页点击“仓库设置”按键再点击“网络钩子”按键即可进入仓库的Webhook模块。
![](../../../static/img/代码库管理/Webhook/Webhook入口.png)<br/>
### **2. 添加Webhook**
单击“添加Webhook”按键可进入配置Webhook页面
![](../../../static/img/代码库管理/Webhook/添加Webhook.png)<br/>
![](../../../static/img/代码库管理/Webhook/Webhook配置.png)<br/>
### **3. 编辑Webhook**
添加Webhook后如下图所示可以通过点击右侧”编辑“按键来对每个Webhook进行编辑操作。
![](../../../static/img/代码库管理/Webhook/编辑Webhook.png)<br/>
### **4. 删除Webhook**
添加Webhook后如下图所示可以通过点击右侧”删除“按键来对每个Webhook进行删除操作。
![](../../../static/img/代码库管理/Webhook/删除webhook.png)<br/>
### **5. Webhook支持的事件类型**
在GitLink中Webhook支持的事件类型如下
- 推送git推送到存储库
- 代码库:创建或删除代码库
- 创建:创建分支或标签
- 删除:删除分支或标签
- 合并请求:合并请求被打开、被关闭、被重新打开或被编辑
- 合并请求分配:合并请求被分配或取消分配
- 合并请求收入里程碑:合并请求被记录或取消记录于里程碑中
- 合并请求被评论:合并请求评论被创建、编辑或删除
- 合并请求标签:合并请求的标签被更新或清除
- 合并请求审查:合并请求被批准、拒绝或提出审查意见,审查人员的修改,审查线程已解决或未解决
- 合并请求被同步:合并请求被同步

View File

@ -0,0 +1,4 @@
{
"label": "代码库管理",
"position": 2
}

View File

@ -0,0 +1,11 @@
---
sidebar_label: '仓库创建'
sidebar_position: 1
---
### **1. 仓库创建入口**
用户可以通过平台主页右上角的按键以及个人主页参与项目模块的“新建”按键来创建仓库。
![](../../../static/img/代码库管理/仓库创建/仓库创建.png)<br/>
### **2. 填写项目基本信息**
进入新建项目页面后,如下图所示,填写拥有者、项目名称、项目标识等信息,单击”创建项目“按键即可完成创建。
![](../../../static/img/代码库管理/仓库创建/新建项目.png)<br/>

View File

@ -0,0 +1,11 @@
---
sidebar_label: '仓库设置'
sidebar_position: 2
---
### **1. 仓库设置入口**
在仓库主页点击“仓库设置”按键即可进入仓库设置模块。仓库设置中可以修改项目的基本信息、进行成员管理、配置webhook、设置分支以及安装bot。
![](../../../static/img/代码库管理/仓库设置/仓库设置.png)<br/>
### **2. 基本设置**
进入仓库设置模块后,单击”基本设置“按键,进入基本设置模块,如下图所示,可以对项目的项目名称、项目标识、项目简介、项目类别、项目语言等基本信息进行修改。单击“转移”按键可以将仓库转移给其他用户和组织,单击“删除本仓库“按键可以删除本仓库。
![](../../../static/img/代码库管理/仓库设置/基本设置.png)<br/>

View File

@ -0,0 +1,4 @@
---
sidebar_label: '代码提交'
sidebar_position: 3
---

View File

@ -0,0 +1,4 @@
---
sidebar_label: '分支管理'
sidebar_position: 5
---

View File

@ -0,0 +1,23 @@
---
sidebar_label: '成员管理'
sidebar_position: 7
---
### **1. 成员管理入口**
在仓库主页,点击“仓库设置”按键,再点击”成员管理“按键,即可进入成员管理模块,如下图所示。
![](../../../static/img/代码库管理/成员管理/成员管理入口.png)<br/>
### **2. 筛选、搜索项目成员**
进入成员管理模块后,可以通过”角色筛选“按键来筛选项目成员类型,通过”搜索“按键可以检索具体的项目成员,如下图所示。
![](../../../static/img/代码库管理/成员管理/筛选、搜索项目成员.png)<br/>
### **3. 筛选、搜索项目成员**
进入成员管理模块后,可以通过”添加成员“按键来添加项目成员,左侧搜索框检索到具体用户并选中后,单击”添加成员“按键即可成功添加项目成员。
![](../../../static/img/代码库管理/成员管理/添加成员.png)<br/>
### **4. 项目成员权限管理**
进入成员管理模块后,单击项目成员右侧的角色栏,可以选择赋予该名项目成员的权限等级,如下图所示。
![](../../../static/img/代码库管理/成员管理/项目成员权限管理.png)<br/>
### **5. 删除项目成员**
进入成员管理模块后,单击项目成员右侧的”删除“按键,可以删除改名项目成员,如下图所示。
![](../../../static/img/代码库管理/成员管理/删除项目成员.png)<br/>

View File

@ -0,0 +1,4 @@
---
sidebar_label: '文件管理'
sidebar_position: 4
---

View File

@ -0,0 +1,29 @@
---
sidebar_label: '标签和发行版管理'
sidebar_position: 6
---
### **1. 标签和发行版管理入口**
在仓库主页,点击“代码库”按键,再点击”标签“按键,即可进入标签和发行版管理模块,如下图所示。
![](../../../static/img/代码库管理/标签和发行版管理/标签和发行版管理入口.png)<br/>
### **2. 删除标签**
进入标签和发行版管理模块后,点击标签右侧“删除”按键,即可实现对标签的删除操作,如下图所示。
![](../../../static/img/代码库管理/标签和发行版管理/删除标签.png)<br/>
### **3. 查看发行版**
进入标签和发行版管理模块后,点击”发行版”按键即可查看项目的发行版,如下图所示。
![](../../../static/img/代码库管理/标签和发行版管理/查看发行版.png)<br/>
### **4. 创建发行版**
进入标签和发行版管理模块后,点击标签右侧”创建发行版”按键,即可快速创建绑定该标签的发行版,如下图所示。
![](../../../static/img/代码库管理/标签和发行版管理/发布新版本.png)<br/>
### **5. 修改发行版**
进入标签和发行版管理模块后,点击发行版右侧的修改按键,即可进入发行版的修改页面,如下图所示。完成发行版的修改后,单击”保存发行版“按键即可保存修改内容。
![](../../../static/img/代码库管理/标签和发行版管理/修改发行版.png)<br/>
![](../../../static/img/代码库管理/标签和发行版管理/发行版修改页面.png)<br/>
### **6. 删除发行版**
进入标签和发行版管理模块后,点击发行版右侧的删除按键,即可进入发行版的删除页面,如下图所示。
![](../../../static/img/代码库管理/标签和发行版管理/删除发行版.png)<br/>

View File

@ -0,0 +1,4 @@
{
"label": "合并请求(PR)",
"position": 5
}

View File

@ -0,0 +1,6 @@
---
sidebar_label: '代码评审'
sidebar_position: 3
---
# 代码评审

View File

@ -0,0 +1,22 @@
---
sidebar_label: '创建合并请求'
sidebar_position: 2
---
# 创建合并请求
1. 进入需要发起合并请求的项目的“**合并请求(PR)**”界面,点击上方的“**新建合并请求**”按钮后,进入合并请求发布界面,如下所示:
![合并请求模块](/img/PR/imagePR2.png)
![合并请求发布界面](/img/PR/imagePR3.png)
2. 选择需要合并的**源分支**和**目标分支**其中源分支为已完成代码开发、需要合并其代码变更的分支目标分支为要并入代码变更的分支既可以是同一仓库下的其他分支branch也可以是被复刻的源仓库下的分支
3. 选中分支后,填写本次合并请求的标题和描述内容,为审查者提供辅助理解本次合并请求的信息,进而加快合并请求审查过程(见 ***代码评审*** 一节);
4. 此外,用户还可以在右侧边栏中指定审查人员、添加里程碑、标记以及优先级(合并请求本质上是一个疑修,这些操作与疑修模块中的操作含义相同或相近,所以可以参照疑修章节中的介绍辅助理解);
5. 最后信息填写完毕后,点击底部的“**创建**”按钮即可提交您的第一个合并请求了🎉🎉🎉!
![创建合并请求](/img/PR/imagePR4.png)

View File

@ -0,0 +1,100 @@
---
sidebar_label: '合并模式简介'
sidebar_position: 4
---
# 合并模式简介
在审阅人审查完开发者提交的代码变更后,便可以决定是否将这些提交合并进主分支`master`中。
然而对于不同分支间的提交合并存在多种合并模式下图为GitLink中支持的合并模式包括**合并请求**、**变基并合并**、**变基合并 --no-ff**以及**压缩提交并合并**四种。
![合并模式](/img/PR/imagePR5.png)
1. **合并请求**
**合并请求**是最常用的合并模式,以下图为例,开发者在主分支`master`的提交3处拉取了开发分支`dev`然后分别提交了A、B、C然后在`master`分支上进行合并。
快进合并前:
![快进合并前](/img/PR/imagePR6.png)
快进合并后:
![快进合并后](/img/PR/imagePR7.png)
**注意**:可以看到,合并的过程就是直接把`master`指针移动到了`dev`指针处,这种合并被称为**快进fast-forward**之所以出现这种情形是因为在提交3之后`master`分支上没有新的提交,所以通过直接快进`master`指针就可以完成合并;但如果在`master`分支上也有新的提交,就需要进行实质性的合并了,如下面两幅图所示:
在合并前,`dev`分支上提交A之后、提交B之前`master`分支上提交了4这时合并`dev`分支就不能简单地快进移动,而是要比较两个分支上更改的内容,然后进行合并;
非快进合并前:
![非快进合并前](/img/PR/imagePR8.png)
合并之后提交A、B、C都会按时间线加入`master`的提交记录中并且会生成一个新的提交D用于记录合并这件事情此外如果合并过程中发生了冲突即两个分支对同一个文件进行了修改则需要手动处理冲突这种合并方式就是**非快进no fast-forward**,这也是**合并请求**模式下的默认方式!
非快进合并后:
![非快进合并后](/img/PR/imagePR9.png)
为了方便理解,可以以线性方式查看合并后的`master`分支上的提交记录
![线性的提交记录](/img/PR/imagePR10.png)
**总结**:在**合并请求**模式下,默认采用**非快进**合并开发分支到`master`分支上,而**非快进**方式会生成一个特殊的提交用于记录此次合并事件!
2. **变基并合并**
从**合并请求**后`master`分支上的提交记录可以看出,两个分支的提交记录可能会交叉在一起,这可能会给后续开发带来困扰,而**变基并合并**可以解决这个问题。
**变基并合并**包括两个操作:**变基**、**合并**。首先是变基,以下图为例,`dev`分支是从提交3处拉取出来的所以提交3就是`dev`的基,而变基操作就是改变`dev`的基,使其变为`master`分支上最新的一次提交。当然,变基过程中可能会出现冲突,则需要手动处理。
变基前:
![变基前](/img/PR/imagePR8.png)
变基后、合并前:
![变基后_合并前](/img/PR/imagePR11.png)
`dev`分支变基之后,`master`分支就没有“更新”的提交了,所以此时进行合并,就得到了如下的结果
合并后:
![合并后](/img/PR/imagePR12.png)
**总结**:在**变基并合并**模式下,开发分支`dev`可以先进行变基操作,使其上的提交看起来都是在`master`分支最新的提交基础上进行的,然后再通过**快进**方式合并回`master`分支,从而起到整理提交记录的作用!
3. **变基合并 --no-ff**
因为**变基并合并**进行合并操作时,默认采用**快进**方式,这样在`master`分支上就没有一个特殊的提交用于记录这次合并事件,所以可以使用`--no-ff`**no fast-forward**)选项申明采用**非快进**方式进行合并。
`--no-ff`合并前:
![--no-ff合并前](/img/PR/imagePR11.png)
`--no-ff`合并后:
![--no-ff合并后](/img/PR/imagePR13.png)
**总结**:通过`--no-ff`选项,可以显式声明在合并时采用**非快进**方式,这样就可以在`master`分支中添加一个记录合并事件的提交!
4. **压缩提交并合并**
在`dev`或者`feature`这样的开发分支中,开发者为了完成某个需求会进行多次提交,然而这些琐碎的提交信息在合并回`master`分支后,会使`master`上的提交记录臃肿混乱,所以需要在合并前,对这些提交进行压缩。如图所示,压缩操作是在`master`分支上进行的,本质是将`dev`分支上进行的变更施加到`master`分支维护的文件上然后将这些修改用新的提交5保存最后提交。
压缩前:
![压缩前](/img/PR/imagePR8.png)
压缩后、提交前:
![压缩后_提交前](/img/PR/imagePR14.png)
提交后:
![提交后](/img/PR/imagePR15.png)
**总结**:在合并前,先对开发分支上的琐碎提交进行压缩,可以使`master`分支上的提交信息更简洁,但是要注意,这种合并模式本质上是`master`分支一次性保存`dev`上的变更,并创建新的提交记录这些变更,所以提交者发生了变化!

View File

@ -0,0 +1,6 @@
---
sidebar_label: '合并请求关联疑修'
sidebar_position: 5
---
# 合并请求关联疑修

Some files were not shown because too many files have changed in this diff Show More