-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Update file names #1607
Update file names #1607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine, I moved the updateSiteData.js
and verifySiteData.js
files to the workflow folder (paths don't need to be changed) and gave them their own workflow which should run daily and fail if verifySiteData
fails.
.github/workflows/verifySiteData.js
Outdated
/** Script to verify code links in ./.problemSiteData.json */ | ||
|
||
const fs = require('fs'); | ||
const https = require('/opt/homebrew/lib/node_modules/sync-request'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this dependency may need to be added to your github actions.
Thanks @Ahmad-A0 - just had a couple questions on the automated workflows, depending on what you think it might be better to add additional GH workflows in a separate PR. |
…Data.js`" This reverts commit 5b3d951.
Yep sure, I'll open a new PR after this one is merged implementing any new workflows. |
I've also changed the base URL like you suggested, assuming you have no more tests to run on this branch. |
Thanks for the review, and for helping so much over the last year! It will be nice to finally close some of these issues. |
Question: At this point do all file names have (up to) 4 leading zeros? The reason I am asking is because the new leetcode-bot on the neetcode discord gets the solutions from this repo and sorta depends on a predictable naming scheme... |
Yep, all the problems linked from the site have 4 leading zeros. |
DO NOT MERGE - I WILL MANUALLY MERGE SO I CAN UPDATE THE SITE
Added four digit prefix to each file to sort them by problem number. Normalized file names using leetcode problem url (https://leetcode.com/problems/**two-sum**).
Updated the site data json[1][2] accordingly and verified that it works[3].
Note: This only updated file names that are apart of the NC All list on the site (about 305 problems total.) I would've updated the entire list but we didn't collect URL & problem number for all of them yet.
Misc: Deleted a handful of duplicate files. Also updated github workflow script to account for 4 digits, but did not manually verify.
[1]
updateSiteData.js
[2]
.problemSiteData.json
[3]
verifySiteData.js