Skip to content

Preserve site model input and fix XLSX output path#2900

Open
kadirawkz wants to merge 1 commit intosherlock-project:masterfrom
kadirawkz:master
Open

Preserve site model input and fix XLSX output path#2900
kadirawkz wants to merge 1 commit intosherlock-project:masterfrom
kadirawkz:master

Conversation

@kadirawkz
Copy link
Copy Markdown

Summary:

  • Preserves the site model input.
  • Fixes the XLSX output path.

Files changed:

  • sherlock_project/sherlock.py: 9 insertions, 1 deletion
  • sherlock_project/sites.py: 1 insertion, 1 deletion

Details:

  • Ensures the original site model input is retained during processing.
  • Corrects the path used for XLSX output to prevent file location issues.

Copilot AI review requested due to automatic review settings April 12, 2026 22:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to (1) preserve SiteInformation’s username_unclaimed value from the site model input instead of overwriting it, and (2) ensure XLSX exports respect --folderoutput like the CSV export already does.

Changes:

  • Stop overwriting SiteInformation.username_unclaimed during initialization (intended to preserve the input value).
  • Build the XLSX output path using --folderoutput (and create the folder if needed) before writing the Excel file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sherlock_project/sites.py Changes how username_unclaimed is set on SiteInformation.
sherlock_project/sherlock.py Writes XLSX output to the correct folder when --folderoutput is used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sherlock_project/sites.py
Comment on lines 58 to 60
self.username_claimed = username_claimed
self.username_unclaimed = secrets.token_urlsafe(32)
self.username_unclaimed = username_unclaimed
self.information = information
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SiteInformation.username_unclaimed is now taken from the username_unclaimed parameter, but SitesInformation currently constructs SiteInformation(...) without passing any unclaimed username from the loaded site data. As a result, every site will use the constructor default, and because that default is computed at function-definition time (username_unclaimed=secrets.token_urlsafe(10)), all instances will share the same value. To actually preserve the site model input, pass through site_data[site_name].get("username_unclaimed") (or similar) when constructing SiteInformation, and change the constructor default to something like None so a fresh token can be generated per-instance when missing.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants