| 22119 | return tuple(nums) |
| 22120 | |
| 22121 | def _resolve_github_repo_slug(): |
| 22122 | env_slug = (os.environ.get("INTELOSINT_GITHUB_REPO") or "").strip() |
| 22123 | if env_slug: |
| 22124 | return env_slug |
| 22125 | try: |
| 22126 | p = subprocess.run( |
| 22127 | ["git", "remote", "get-url", "origin"], |
| 22128 | cwd=str(Path(__file__).resolve().parent), |
| 22129 | capture_output=True, |
| 22130 | text=True, |
| 22131 | timeout=8 |
| 22132 | ) |
| 22133 | if p.returncode != 0: |
| 22134 | return "" |
| 22135 | url = (p.stdout or "").strip() |
| 22136 | m = re.search(r"github\.com[:/]+([^/]+/[^/.]+)", url, flags=re.IGNORECASE) |
| 22137 | return m.group(1) if m else "" |
| 22138 | except Exception: |
| 22139 | return "" |
| 22140 | |
| 22141 | @app.route('/api/update/check', methods=['POST']) |
| 22142 | def update_check(): |