mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-03 05:27:42 +00:00
* Fix fork-skip guards for local test runs The fork skip read GITHUB_REPOSITORY with an upstream fallback, so local runs on a fork always ran the upstream-only guards. Share one helper that checks the origin remote when the variable is unset. Fixes #496. * test: accept the ssh:// origin form in the upstream-checkout helper An upstream clone whose origin is ssh://git@github.com/MadsLorentzen/ai-job-search(.git) must keep running the placeholder guards; the helper only knew the https and scp-style forms. Folded in at maintainer rebase per the #524 review. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Omarinho12345 <omarottelli720@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
5 files changed
+189
-7
No files matched your search
@@ -9,12 +9,14 @@ were not, so a full Path B/C run left `[YOUR_NAME]`, `[YOUR_EMAIL]` and
|
||||
on the drafter noticing. A real user (#420) ran `/setup` and then hand-edited both
|
||||
files to close the gap.
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
UPSTREAM = "MadsLorentzen/ai-job-search"
|
||||
try:
|
||||
from tests._upstream import is_upstream_checkout
|
||||
except ImportError: # `python -m unittest discover -s tests` imports test modules top-level
|
||||
from _upstream import is_upstream_checkout
|
||||
|
||||
REPO = Path(__file__).resolve().parent.parent
|
||||
COMMAND = REPO / ".claude" / "commands" / "setup.md"
|
||||
@@ -72,7 +74,7 @@ class SetupStep3ContactBlocks(unittest.TestCase):
|
||||
|
||||
|
||||
@unittest.skipIf(
|
||||
os.environ.get("GITHUB_REPOSITORY", UPSTREAM) != UPSTREAM,
|
||||
not is_upstream_checkout(),
|
||||
"template-placeholder guard targets the pristine upstream template; forks personalize 05-cv-templates.md and 06-cover-letter-templates.md via /setup",
|
||||
)
|
||||
class TemplatesStillCarryThePlaceholders(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user