forked from Rockachopa/Timmy-time-dashboard
feat: code quality audit + autoresearch integration + infra hardening (#150)
This commit is contained in:
committed by
GitHub
parent
fd0ede0d51
commit
ae3bb1cc21
@@ -25,16 +25,18 @@ from config import settings
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Operations that require explicit confirmation before execution
|
||||
DESTRUCTIVE_OPS = frozenset({
|
||||
"push --force",
|
||||
"push -f",
|
||||
"reset --hard",
|
||||
"clean -fd",
|
||||
"clean -f",
|
||||
"branch -D",
|
||||
"checkout -- .",
|
||||
"restore .",
|
||||
})
|
||||
DESTRUCTIVE_OPS = frozenset(
|
||||
{
|
||||
"push --force",
|
||||
"push -f",
|
||||
"reset --hard",
|
||||
"clean -fd",
|
||||
"clean -f",
|
||||
"branch -D",
|
||||
"checkout -- .",
|
||||
"restore .",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -190,7 +192,9 @@ class GitHand:
|
||||
flag = "-b" if create else ""
|
||||
return await self.run(f"checkout {flag} {branch}".strip())
|
||||
|
||||
async def push(self, remote: str = "origin", branch: str = "", force: bool = False) -> GitResult:
|
||||
async def push(
|
||||
self, remote: str = "origin", branch: str = "", force: bool = False
|
||||
) -> GitResult:
|
||||
"""Push to remote. Force-push requires explicit opt-in."""
|
||||
args = f"push -u {remote} {branch}".strip()
|
||||
if force:
|
||||
|
||||
Reference in New Issue
Block a user