forked from SwiftChainn/SwiftChain_Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit_commit.py
More file actions
42 lines (34 loc) · 1.5 KB
/
Copy pathgit_commit.py
File metadata and controls
42 lines (34 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python3
import subprocess
import sys
import os
os.chdir(r"c:\Users\Nuelthewave\Desktop\swiftchain\SwiftChain_Backend")
try:
# Add all changes
print("Adding files...")
subprocess.run(["git", "add", "-A"], check=True)
# Commit
print("Committing...")
message = """feat: Add mutation testing (StrykerJS) for service layer - Issue #114
- Create stryker.conf.json with service-layer-only mutation scope (src/services/**)
- Configure Jest runner with TypeScript checker plugin
- Set achievable break threshold at 60% baseline
- Add test:mutation npm script for mutation test execution
- Update .gitignore to exclude Stryker artifacts (.stryker-tmp, reports/)
- Include comprehensive documentation:
* MUTATION_TESTING_SETUP.md: detailed implementation and guidance
* MUTATION_TESTING_PR.md: PR description with expected results
All 24 services in src/services/ are covered for mutation testing.
No application code changes; tooling/config addition only.
Initial run will establish baseline mutation score for validating test quality."""
subprocess.run(["git", "commit", "-m", message], check=True)
print("\n✓ Successfully committed!")
print("\nNext steps:")
print(" git push -u origin feature/socket-metrics-enhancements")
print(" npm install && npm run test:mutation")
except subprocess.CalledProcessError as e:
print(f"Git error: {e}", file=sys.stderr)
sys.exit(1)
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
sys.exit(1)