Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

feat: full sync for pull request comment #9

Merged
merged 5 commits into from
Jan 15, 2021
Merged

Conversation

Mini256
Copy link
Member

@Mini256 Mini256 commented Jan 14, 2021

Check List

  • feat: support full sync for pull request comment
  • test: add test for full sync for pull request comment
  • refactor: abstract out PullKey, IssueKey, RepoKey
  • refactor: refactor the time later than function
  • refactor: abstract out handle one comment logic for incremental sync
  • docs: add docs
  • docs: translate documents

@todo
Copy link

todo bot commented Jan 14, 2021

Sync Open PR Status.

// TODO: Sync Open PR Status.
// TODO: Sync Contributor Email.
}
await sleep(1000);
}


This comment was generated by todo based on a TODO comment in 5bc588f in #9. cc @ti-community-infra.

@todo
Copy link

todo bot commented Jan 14, 2021

Sync Contributor Email.

// TODO: Sync Contributor Email.
}
await sleep(1000);
}
}


This comment was generated by todo based on a TODO comment in 5bc588f in #9. cc @ti-community-infra.

@todo
Copy link

todo bot commented Jan 14, 2021

Batch sync PR comments.

// TODO: Batch sync PR comments.
async syncPullRequestReviews(query: SyncPullReviewsQuery) {
const { pull, reviews } = query;
reviews.forEach((review) => {
let commentReceived: SyncCommentQuery = {


This comment was generated by todo based on a TODO comment in 5bc588f in #9. cc @ti-community-infra.

@todo
Copy link

todo bot commented Jan 14, 2021

refactor the sync pull request function.

// TODO: refactor the sync pull request function.
async syncPullRequest(syncPullQuery: SyncPullQuery) {
const { owner, repo, pull } = syncPullQuery;
const pullSignature = `${owner}/${repo}#${pull.number}`;
// Get existing records from the database for comparison.


This comment was generated by todo based on a TODO comment in ce20ff0 in #9. cc @ti-community-infra.

@todo
Copy link

todo bot commented Jan 14, 2021

use time.laterThan instead of timeALaterThanTimeB.

// TODO: use time.laterThan instead of timeALaterThanTimeB.
// Ignore outdated PR data.
const isPRUpdated = timeALaterThanTimeB(
pull.updated_at,


This comment was generated by todo based on a TODO comment in ce20ff0 in #9. cc @ti-community-infra.

@Mini256
Copy link
Member Author

Mini256 commented Jan 15, 2021

@hi-rustin PTAL~

@Mini256 Mini256 changed the title WIP: feat: full sync from pull request comment feat: full sync from pull request comment Jan 15, 2021
@Mini256 Mini256 changed the title feat: full sync from pull request comment feat: full sync for pull request comment Jan 15, 2021
docs/design.md Show resolved Hide resolved
src/common/types.ts Show resolved Hide resolved
src/events/app/index.ts Show resolved Hide resolved
src/events/app/index.ts Outdated Show resolved Hide resolved
@todo
Copy link

todo bot commented Jan 15, 2021

Optimize the sleep time.

// TODO: Optimize the sleep time.
// In order to avoid frequent access to the API.
await sleep(1000);
}
}


This comment was generated by todo based on a TODO comment in 967091d in #9. cc @ti-community-infra.

@hi-rustin
Copy link
Contributor

Great, thanks!

@Mini256
Copy link
Member Author

Mini256 commented Jan 15, 2021

Great, thanks!

Thank you for your patience in reviewing.

@Mini256
Copy link
Member Author

Mini256 commented Jan 30, 2021

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants