Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/agent_tools/core/orchestrators/gh_pr_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def _handle_sense() -> Result:
"2. Synthesize a professional squash commit message for `override` following the 'details.json_format' layout.\n"
" - 'title': A professional squash commit subject.【STRICT】MUST satisfy 'details.subject_regex'.\n"
" - 'body': The detailed body should explain the 'why' and 'how' (not just 'what'), especially for complex logic changes. 【STRICT】single line max `details.body_wrap_length` chars.\n"
" - 【NOTICE】 You cannot directly use the PR's commit information; you must reorganize the language based on the PR information to form a new commit message.\n"
"3. Call 'gh_pr_merge_flow' with point='merge' and your 'override' object.\n"
),
details={
Expand Down
16 changes: 8 additions & 8 deletions src/agent_tools/core/orchestrators/git_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ def _handle_push() -> Result:
branch_info = get_branch_context(refresh=True)
is_protected = _is_protected_branch(refresh=True)

if branch_info.ahead == 0:
return Result(
status="success",
message="Local branch is already up-to-date with remote.",
workflow=WORKFLOW,
)

if branch_info.upstream:
# 这里保护分支本地领先不能提交,如果是相同的话提示成功,如果落后的话不应该存在返回错误吧
# 有远程且为最新
if branch_info.ahead == 0:
return Result(
status="success",
message="Local branch is already up-to-date with remote.",
workflow=WORKFLOW,
)
# 这里保护分支本地领先不能提交
if is_protected:
return Result(
status="error",
Expand Down
Loading