Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent duplicates being created with the same URL #765

Merged
merged 13 commits into from
Oct 8, 2024

Conversation

paulrobertlloyd
Copy link
Collaborator

@paulrobertlloyd paulrobertlloyd commented Oct 6, 2024

Fixes #731.

  • Use md5 hash of published date to create slug token; this means the slug remains a constant value, and therefore so does the URL (including those that include a slug token)
  • Use replaceOne with upsert when creating new posts
  • Use replaceOne with upsert when creating new files
  • Update Bitbucket store to not attempt to create a new file if already exists
  • Update file system store to not create a new file if already exists
  • Update FTP store to not create a new file if already exists
  • Update GitHub store to not create a new file if already exists
  • Update Gitea store to not create a new file if already exists
  • Update GitLab store to not create a new file if already exists
  • Update S3 store to not create a new file if already exists

@paulrobertlloyd paulrobertlloyd added this to the v1.0 milestone Oct 6, 2024
@paulrobertlloyd paulrobertlloyd changed the title Prevent duplicate posts being created with the same URL Prevent duplicates being created with the same URL Oct 6, 2024
@paulrobertlloyd paulrobertlloyd force-pushed the fix/731-prevent-duplicates branch 5 times, most recently from 0f45ee6 to 3e03b26 Compare October 8, 2024 19:20
@paulrobertlloyd paulrobertlloyd marked this pull request as ready for review October 8, 2024 19:36
@paulrobertlloyd paulrobertlloyd force-pushed the fix/731-prevent-duplicates branch from 3e03b26 to 8806da1 Compare October 8, 2024 19:48
@paulrobertlloyd paulrobertlloyd merged commit e1468c4 into main Oct 8, 2024
1 check failed
@paulrobertlloyd paulrobertlloyd deleted the fix/731-prevent-duplicates branch October 8, 2024 19:54
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.

Duplication prevention
1 participant