Skip to content

Commit 64ac32d

Browse files
authored
fix: configure git safe.directory in Docker container to resolve permission issues (#332)
* chore: remove useless log * fix: configure git safe.directory in Docker container to resolve permission issues
1 parent 1266cf6 commit 64ac32d

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ USER codeagent
4040
# 设置工作目录
4141
WORKDIR /workspace
4242

43+
# 配置Git safe.directory以解决挂载目录权限问题
44+
RUN git config --global --add safe.directory /workspace
45+
4346
# 默认命令
4447
CMD ["tail", "-f", "/dev/null"]

internal/events/parser.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"github.com/qiniu/codeagent/pkg/models"
1010

1111
"github.com/google/go-github/v58/github"
12-
"github.com/qiniu/x/xlog"
1312
)
1413

1514
// EventParser 事件解析器
@@ -70,9 +69,6 @@ func (p *EventParser) ParseWebhookEvent(
7069
deliveryID string,
7170
payload []byte,
7271
) (models.GitHubContext, error) {
73-
xl := xlog.NewWith(ctx)
74-
xl.Infof("Parsing webhook event: type=%s, delivery_id=%s", eventType, deliveryID)
75-
7672
// 验证事件类型
7773
if !models.IsValidEventType(eventType) {
7874
return nil, fmt.Errorf("unsupported event type: %s", eventType)

internal/webhook/handler.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ func (h *Handler) HandleWebhook(w http.ResponseWriter, r *http.Request) {
7878
}
7979

8080
ctx := reqid.NewContext(context.Background(), traceID)
81-
xl := xlog.NewWith(ctx)
82-
xl.Infof("Received webhook event via Enhanced Handler: %s", eventType)
83-
8481
// 5. 使用Enhanced Agent的统一事件处理,传递原始字节数据
8582
go func(eventType string, payload []byte, deliveryID string, traceCtx context.Context) {
8683
traceLog := xlog.NewWith(traceCtx)

0 commit comments

Comments
 (0)