-
Notifications
You must be signed in to change notification settings - Fork 47
DO NOT MERGE/gather event ids to repair #3149
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
base: main
Are you sure you want to change the base?
DO NOT MERGE/gather event ids to repair #3149
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3149 +/- ##
========================================
- Coverage 6.56% 6.48% -0.08%
========================================
Files 176 180 +4
Lines 4389 4439 +50
Branches 481 489 +8
========================================
Hits 288 288
- Misses 4099 4149 +50
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What is the purpose of this PR? Are we sure that there are no events with manually configured event IDs that this would reset? Why exclude GRBs specifically?
function processFiles() { | ||
const folderPath = './app/archive.json' | ||
const results = [] as UpdateData[] | ||
fs.readdir(folderPath, (err, files) => { |
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.
Please use the fs/promises
module and async/await syntax over the fs
module and callback syntax.
console.error('Error reading directory:', err) | ||
return | ||
} | ||
files.forEach((file) => { |
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.
Please use:
result = input.map((item) => ...)
rather than:
const results = []
input.forEach((...) => {results.push(...)})
} | ||
|
||
function processFiles() { | ||
const folderPath = './app/archive.json' |
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.
Where does this file, archive.json, come from? Our downloadable archive is a tarball of JSON files, not one big JSON file.
Description
This is a script that uses the subject matchers in the app to go through the archive and find circulars that need to have their eventId's updated or corrected. Detailed instructions on how to use this script are found at the top of the script file.
Related Issue(s)
Resolves #3061
Testing
I have run this locally.