MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / _resolve_github_repo_slug

Function _resolve_github_repo_slug

IntelOSINT.py:22121–22139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22119 return tuple(nums)
22120
22121def _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'])
22142def update_check():

Callers 1

update_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected