This commit is contained in:
@@ -95,9 +95,11 @@ public class ApiChangeNotifier {
|
|||||||
sb.append(MarkdownStyles.quoteKvBold("新路径", "`已删除`")).append("\n");
|
sb.append(MarkdownStyles.quoteKvBold("新路径", "`已删除`")).append("\n");
|
||||||
} else {
|
} else {
|
||||||
sb.append(MarkdownStyles.quoteKvBold("原路径",
|
sb.append(MarkdownStyles.quoteKvBold("原路径",
|
||||||
MarkdownStyles.colorWarning(report.getOldUri()) + " " + MarkdownStyles.colorWarning("[旧路径]"))).append("\n");
|
formatUriWithMethod(report.getHttpMethod(), report.getOldUri(), false)
|
||||||
|
+ " " + MarkdownStyles.colorWarning("[旧路径]"))).append("\n");
|
||||||
sb.append(MarkdownStyles.quoteKvBold("新路径",
|
sb.append(MarkdownStyles.quoteKvBold("新路径",
|
||||||
MarkdownStyles.colorInfo(report.getUri()) + " " + MarkdownStyles.colorInfo("[新路径]"))).append("\n");
|
formatUriWithMethod(report.getHttpMethod(), report.getUri(), true)
|
||||||
|
+ " " + MarkdownStyles.colorInfo("[新路径]"))).append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取 .gitea/config.yaml,提供检测开关、扫描目录、企微配置等。
|
* 读取 .gitea/workflows/code-check-config.yaml,提供检测开关、扫描目录、企微配置等。
|
||||||
*/
|
*/
|
||||||
public class AppConfig {
|
public class AppConfig {
|
||||||
private boolean masterEnabled = true;
|
private boolean masterEnabled = true;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ checker:
|
|||||||
|
|
||||||
# 类变更检测(Vo/Dto/Entity/Model 字段增删改等)
|
# 类变更检测(Vo/Dto/Entity/Model 字段增删改等)
|
||||||
class_check:
|
class_check:
|
||||||
enabled: false
|
enabled: true
|
||||||
dto_entity_conversion:
|
dto_entity_conversion:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ class_check:
|
|||||||
|
|
||||||
# API 变更检测(路径 / 请求方式 / 参数),与 class_check 同级
|
# API 变更检测(路径 / 请求方式 / 参数),与 class_check 同级
|
||||||
api_check:
|
api_check:
|
||||||
enabled: true
|
enabled: false
|
||||||
exclude_framework_params: true
|
exclude_framework_params: true
|
||||||
endpoint_scan:
|
endpoint_scan:
|
||||||
controllers:
|
controllers:
|
||||||
@@ -1 +1,53 @@
|
|||||||
name: CodeChecker 变更检测
|
name: CodeChecker 变更检测
|
||||||
|
run-name: ${{ gitea.actor }}的CodeChecker变更检测
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- class-check
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
code-check:
|
||||||
|
if: ${{ gitea.ref != 'refs/heads/pre' && gitea.ref != 'refs/heads/dev' && gitea.ref != 'refs/heads/master-2.0' }}
|
||||||
|
runs-on: jdk11
|
||||||
|
steps:
|
||||||
|
- name: 检出代码
|
||||||
|
run: |
|
||||||
|
git config --global http.sslVerify false
|
||||||
|
git clone "https://${{ gitea.token }}@git.niujiekeji.com/${{ gitea.repository }}.git" .
|
||||||
|
git checkout ${{ gitea.sha }}
|
||||||
|
|
||||||
|
- name: 检查配置文件与预编译 jar
|
||||||
|
run: |
|
||||||
|
if [ ! -f .gitea/workflows/code-check-config.yaml ]; then
|
||||||
|
echo "错误: 缺少 .gitea/workflows/code-check-config.yaml"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -f .gitea/workflows/code-checker.jar ]; then
|
||||||
|
echo "错误: 缺少 .gitea/workflows/code-checker.jar"
|
||||||
|
echo "请本地执行: powershell -File scripts/build-code-checker.ps1"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 验证 JDK
|
||||||
|
run: |
|
||||||
|
echo "Java: $(java -version 2>&1 | head -1)"
|
||||||
|
|
||||||
|
- name: 执行 CodeChecker 变更检测
|
||||||
|
run: |
|
||||||
|
OLD_SHA=$(git rev-parse HEAD~1 2>/dev/null || echo "")
|
||||||
|
if [ -z "$OLD_SHA" ]; then
|
||||||
|
echo "首次提交,跳过变更检测"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
COMMIT_TIME=$(git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S')
|
||||||
|
java -jar .gitea/workflows/code-checker.jar \
|
||||||
|
--config .gitea/workflows/code-check-config.yaml \
|
||||||
|
--repo-root . \
|
||||||
|
--old-sha "$OLD_SHA" \
|
||||||
|
--new-sha "$(git rev-parse HEAD)" \
|
||||||
|
--modifier "${{ gitea.actor }}" \
|
||||||
|
--modify-time "$COMMIT_TIME"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -192,7 +192,7 @@ public class ApplyClockInController {
|
|||||||
* @param applyAttendanceOutsideDto 表单对象
|
* @param applyAttendanceOutsideDto 表单对象
|
||||||
* @return java.lang.Object
|
* @return java.lang.Object
|
||||||
*/
|
*/
|
||||||
@PostMapping("/outside1")
|
@PostMapping("/outside")
|
||||||
public Object create(@RequestBody @Valid ApplyAttendanceOutsideDto applyAttendanceOutsideDto) {
|
public Object create(@RequestBody @Valid ApplyAttendanceOutsideDto applyAttendanceOutsideDto) {
|
||||||
if (StringUtil.isNotEmpty(applyAttendanceOutsideDto.getSpecialBusinessId())) {
|
if (StringUtil.isNotEmpty(applyAttendanceOutsideDto.getSpecialBusinessId())) {
|
||||||
applyAttendanceOutsideDto.setClockInId(applyAttendanceOutsideDto.getSpecialBusinessId());
|
applyAttendanceOutsideDto.setClockInId(applyAttendanceOutsideDto.getSpecialBusinessId());
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
public class ApplyAttendanceOutsideDto {
|
public class ApplyAttendanceOutsideDto {
|
||||||
|
|
||||||
/** 审批id */
|
/** 审批id */
|
||||||
private Integer taskId;
|
private String taskId;
|
||||||
/** 流程标题 */
|
/** 流程标题 */
|
||||||
private String flowTitle;
|
private String flowTitle;
|
||||||
/** 申请人id */
|
/** 申请人id */
|
||||||
|
|||||||
Reference in New Issue
Block a user