Skip to content

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

Merged
merged 7 commits into from
Apr 22, 2025
Merged

Conversation

seymourisdead
Copy link
Member

No description provided.

Copy link

@MihaiBojin MihaiBojin left a 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) => {

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: {

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}`)

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:

  1. attempting to do X (this line)
  2. did X / did not do X in dry-run

Copy link
Member Author

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)
}
}

Choose a reason for hiding this comment

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

nit: formatting

@seymourisdead seymourisdead merged commit 237de17 into main Apr 22, 2025
2 checks passed
@seymourisdead seymourisdead deleted the backfill-created-updated-closed branch April 22, 2025 14:36
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