Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4fe41f0
Removed duplicate Bluesky entry in data.json
frogtheastronaut Oct 2, 2025
876e58b
fix(sites): Remediate false positive for Blitz Tactics
shreyasNaik0101 Oct 3, 2025
91f3b16
fix(sites): Update BoardGameGeek URL structure and detection method
dollaransh17 Oct 3, 2025
3e653c4
fix(sites): Remove BoardGameGeek - unreliable detection
dollaransh17 Oct 3, 2025
c5e209d
fix(sites): Implement BoardGameGeek API detection as suggested
dollaransh17 Oct 4, 2025
94c0138
fix(sites): Remove BoardGameGeek due to incompatible detection
dollaransh17 Oct 4, 2025
3079e7a
fix(ci): Use merge-base for correct target validation
shreyasNaik0101 Oct 4, 2025
4d00884
fix(ci): Implement secure diff logic per feedback
shreyasNaik0101 Oct 4, 2025
70e3c0d
fix(ci): Address review feedback for correctness and efficiency
shreyasNaik0101 Oct 5, 2025
9e3448d
fix(sites): So , Implemented BoardGameGeek using username validation API
dollaransh17 Oct 5, 2025
83a38db
Merge pull request #2582 from dollaransh17/fix/boardgamegeek-false-po…
ppfeister Oct 5, 2025
f0510a1
Add support for WakaTime
akh7177 Oct 5, 2025
d0e005d
Merge pull request #2609 from akh7177/Add-support-for-WakaTime
ppfeister Oct 5, 2025
b9e28b9
Merge pull request #2588 from shreyasNaik0101/fix/correct-ci-diff
ppfeister Oct 5, 2025
a88adb0
Merge pull request #2559 from frogtheastronaut/master
ppfeister Oct 5, 2025
0cf110e
Merge branch 'master' into fix/remediate-blitztactics
shreyasNaik0101 Oct 5, 2025
d2835e5
Merge pull request #2568 from shreyasNaik0101/fix/remediate-blitztactics
ppfeister Oct 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 31 additions & 10 deletions .github/workflows/validate_modified_targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,57 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v5
with:
# Checkout the base branch but fetch all history to avoid a second fetch call
ref: ${{ github.base_ref }}
fetch-depth: 1
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
python-version: "3.13"

- name: Install Poetry
uses: abatilo/actions-poetry@v4
with:
poetry-version: 'latest'
poetry-version: "latest"

- name: Install dependencies
run: |
poetry install --no-interaction --with dev

- name: Drop in place updated manifest from base
- name: Prepare JSON versions for comparison
run: |
cp sherlock_project/resources/data.json data.json.base
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr --depth=1
git show pr:sherlock_project/resources/data.json > sherlock_project/resources/data.json
cp sherlock_project/resources/data.json data.json.head
# Fetch only the PR's branch head (single network call in this step)
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr

# Find the merge-base commit between the target branch and the PR branch
MERGE_BASE=$(git merge-base origin/${{ github.base_ref }} pr)
echo "Comparing PR head against merge-base commit: $MERGE_BASE"

# Safely extract the file from the PR's head and the merge-base commit
git show pr:sherlock_project/resources/data.json > data.json.head
git show $MERGE_BASE:sherlock_project/resources/data.json > data.json.base

# CRITICAL FIX: Overwrite the checked-out data.json with the one from the PR
# This ensures that pytest runs against the new, updated file.
cp data.json.head sherlock_project/resources/data.json

- name: Discover modified targets
id: discover-modified
run: |
CHANGED=$(
python - <<'EOF'
import json
with open("data.json.base") as f: base = json.load(f)
with open("data.json.head") as f: head = json.load(f)
import sys
try:
with open("data.json.base") as f: base = json.load(f)
with open("data.json.head") as f: head = json.load(f)
except FileNotFoundError as e:
print(f"Error: Could not find {e.filename}", file=sys.stderr)
sys.exit(1)
except json.JSONDecodeError as e:
print(f"Error: Could not decode JSON from a file - {e}", file=sys.stderr)
sys.exit(1)

changed = []
for k, v in head.items():
Expand All @@ -63,6 +82,8 @@ jobs:
echo -e ">>> Changed targets: \n$(echo $CHANGED | tr ',' '\n')"
echo "changed_targets=$CHANGED" >> "$GITHUB_OUTPUT"

# --- The rest of the steps below are unchanged ---

- name: Validate modified targets
if: steps.discover-modified.outputs.changed_targets != ''
continue-on-error: true
Expand Down
33 changes: 17 additions & 16 deletions sherlock_project/resources/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
"username_claimed": "blue"
},
"Blitz Tactics": {
"errorType": "status_code",
"errorMsg": "That page doesn't exist",
"errorType": "message",
"url": "https://blitztactics.com/{}",
"urlMain": "https://blitztactics.com/",
"username_claimed": "Lance5500"
Expand All @@ -278,14 +279,7 @@
"urlMain": "https://bsky.app/",
"username_claimed": "mcuban"
},
"BoardGameGeek": {
"errorType": "message",
"regexCheck": "^[a-zA-Z0-9_]*$",
"errorMsg": "User not found",
"url": "https://boardgamegeek.com/user/{}",
"urlMain": "https://boardgamegeek.com",
"username_claimed": "blue"
},

"BongaCams": {
"errorType": "status_code",
"isNSFW": true,
Expand All @@ -299,6 +293,14 @@
"urlMain": "https://www.bookcrossing.com/",
"username_claimed": "blue"
},
"BoardGameGeek": {
"errorMsg": "\"isValid\":true",
"errorType": "message",
"url": "https://boardgamegeek.com/user/{}",
"urlMain": "https://boardgamegeek.com/",
"urlProbe": "https://api.geekdo.com/api/accounts/validate/username?username={}",
"username_claimed": "blue"
},
"BraveCommunity": {
"errorType": "status_code",
"url": "https://community.brave.com/u/{}/",
Expand Down Expand Up @@ -2320,6 +2322,12 @@
"urlMain": "https://discourse.wicg.io/",
"username_claimed": "stefano"
},
"Wakatime": {
"errorType": "status_code",
"url": "https://wakatime.com/@{}",
"urlMain": "https://wakatime.com/",
"username_claimed": "blue"
},
"Warrior Forum": {
"errorType": "status_code",
"url": "https://www.warriorforum.com/members/{}.html",
Expand Down Expand Up @@ -2865,13 +2873,6 @@
"urlMain": "https://znanylekarz.pl",
"username_claimed": "janusz-nowak"
},
"Bluesky": {
"errorType": "status_code",
"url": "https://bsky.app/profile/{}.bsky.social",
"urlProbe": "https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor={}.bsky.social",
"urlMain": "https://bsky.app/",
"username_claimed": "mcuban"
},
"Platzi": {
"errorType": "status_code",
"errorCode": 404,
Expand Down
Loading