-
Notifications
You must be signed in to change notification settings - Fork 2
Backfill created updated closed #66
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
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.
Left a few comments, nothing major. Would be great to include a short summary that explains what this code is aiming to do, maybe a few links to GH projects /screenshots showing before and after.
Thank you for writing it / we generally need more such code !!
}).filter(pr => Boolean(pr)) as Array<Pick<NeonProject, 'projectId' | 'projectNumber' | 'updatedAtFieldId' | 'createdAtFieldId' | 'closedAtFieldId'>>; | ||
console.log(config) | ||
|
||
export const backfill_created_updated_deleted = async (octokit: ProbotOctokit) => { |
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.
splitting this out in multiple functions would make it easier to understand the intent behind the code :)
while (pageInfo.hasNextPage) { | ||
try { | ||
const res: { | ||
search: { |
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.
nit: I would move this to a separate file (if possible), as it would make it easier to lint and edit/maintain long term
logger('error', e) | ||
} | ||
} | ||
logger('info', `Set created at for issue #${issue.number} ${issue.title} in project ${project.projectId} with value ${createdAtFieldDesiredValue}`) |
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.
nit: might be confusing in dry-run mode / consider two log lines:
- attempting to do X (this line)
- did X / did not do X in dry-run
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.
yeah, I agree. It's how i did that in other places, so I'll keep it this way for now
} catch(e) { | ||
logger('error', e) | ||
} | ||
} |
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.
nit: formatting
No description provided.