Skip to content

fix: wait for draft issues to populate in copy project#53

Merged
dsanders11 merged 1 commit intomainfrom
fix/copy-project-interpolation
Mar 5, 2025
Merged

fix: wait for draft issues to populate in copy project#53
dsanders11 merged 1 commit intomainfrom
fix/copy-project-interpolation

Conversation

@dsanders11
Copy link
Owner

Something has changed on the GitHub side and now when copying a project it appears draft issues populate in an async manner so we need to wait for them before continuing with interpolation.

@dsanders11 dsanders11 requested a review from Copilot March 5, 2025 23:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR addresses an asynchronous delay in populating draft issues when copying a project by implementing a polling mechanism that waits for the draft issues to fully populate before proceeding with template interpolation.

  • Introduces a wait loop in copy-project.ts to poll for draft issue completion using the new getProject API.
  • Updates tests to mock the new getProject function appropriately.

Reviewed Changes

File Description
src/copy-project.ts Implements a polling mechanism to wait for draft issues to populate.
tests/copy-project.test.mts Updates tests to provide proper mocks for the new getProject API.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/copy-project.ts:86

  • [nitpick] Consider extracting the loop limit '10' into a named constant to improve readability and ease future adjustments.
for (let i = 0; i < 10; i++) {

@dsanders11 dsanders11 marked this pull request as ready for review March 5, 2025 23:14
@dsanders11 dsanders11 merged commit 7fc3c54 into main Mar 5, 2025
8 checks passed
@dsanders11 dsanders11 deleted the fix/copy-project-interpolation branch March 5, 2025 23:14
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