mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +00:00
Codify the box-only #4 customizations into Git so the AWS deployment (which deploys from this repo) actually applies them — previously only the retired sh-openswe box had them. - prompt.py: branch names feature|bug|hotfix/<kebab> (optional <KEY->); imperative PR titles with no conventional-commit type: prefix; PR body Summary/Validation/Tests/Notes; handbook commit format. Rewrite the collaboration template from an attribution MANDATE to a PROHIBITION — no Co-authored-by bot trailer, no "Made by [Open SWE]" footer, no agent/AI notes on any artifact. - github_comments.py: add @seahaven-openswe (the deployed App slug) to the mention triggers. - authorship.py: remove the now-unused attribution helpers (build_pr_attribution_footer, add_bot_coauthor_trailer, add_pr_collaboration_note, PR_ATTRIBUTION_*). Keep OPEN_SWE_BOT_* — server.py still uses them for the sandbox git identity. - Flip the attribution unit tests to assert the no-attribution behavior; drop tests for the removed helpers. Commits stay authored as the triggering user for now — flipping authorship to the bot account depends on the Vercel preview-deploy constraint and is deferred to #11. Refs: #4 #11 Claude-Session: https://claude.ai/code/session_01DMhLf4G5V8MStJQyAW95hi
19 lines
661 B
Python
19 lines
661 B
Python
from __future__ import annotations
|
|
|
|
from agent.utils.authorship import resolve_triggering_user_identity
|
|
|
|
|
|
def test_resolve_identity_from_config_uses_user_noreply_email() -> None:
|
|
config = {
|
|
"configurable": {
|
|
"source": "slack",
|
|
"github_login": "mason-gh",
|
|
"github_user_id": 4321,
|
|
"slack_thread": {"triggering_user_name": "Mason"},
|
|
}
|
|
}
|
|
identity = resolve_triggering_user_identity(config)
|
|
assert identity is not None
|
|
assert identity.commit_name == "Mason"
|
|
assert identity.commit_email == "4321+mason-gh@users.noreply.github.com"
|
|
assert identity.github_login == "mason-gh"
|