View Code? Open in Web Editor
NEW
๐ค A GitHub App that used to sync tidb community info to the database, for providing basic data for other bots.
Home Page: https://ti-community-infra.github.io/ti-sync-bot/
License: ISC License
Shell 0.45%
Dockerfile 0.21%
JavaScript 1.05%
TypeScript 98.29%
ti-sync-bot's People
Stargazers
ti-sync-bot's Issues
// TODO: Batch sync PR comments.
/**
* Handle reviews of a pull request.
* @param query
*/
async syncPullRequestReviews ( query : SyncPullReviewsQuery ) {
This issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
// TODO: Ensure that all pull requests from contributors can be obtained.
return await this . pullRepository . find ( {
user : login ,
} ) ;
This issue was generated by todo based on a TODO
comment in f2a46a5 when #28 was merged. cc @ti-community-infra .
// TODO: Avoid repeated processing contributor email when pr merged.
// Synchronize contributor mailboxes when pull request is merged.
if ( pullRequest . merged_at !== null ) {
// Fetch the patch of pull request.
const patch = await getPullRequestPatch (
context . pullRequest ( ) ,
This issue was generated by todo based on a TODO
comment in f2a46a5 when #28 was merged. cc @ti-community-infra .
Feature Request
Describe the feature you'd like:
Add a UI to show the progress of the synchronization to users. The progress can be for the repo, or for different types of synchronization tasks under the repo, such as issue, pull request, and comment.
Maybe we can do it with antd.
// TODO: Optimize the sleep time.
// In order to avoid frequent access to the API.
await sleep ( 1000 ) ;
}
}
This issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
// TODO: Sync Contributor Email.
}
// TODO: Optimize the sleep time.
// In order to avoid frequent access to the API.
await sleep ( 1000 ) ;
This issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
Feature Request
I have searched the issues of this repository and believe that this is not a duplicate.
Is your feature request related to a Issue or PR(Optional)
None
Describe the feature you'd like:
Do you have any ideas on how to implement it?(Optional)
// TODO: use the github client authed by installation id.
// Init Github client.
// Notice: This github client uses a TOKEN as the bot github account for access, in this case, we do not need to
// authorize for each installation through the Github APP, but this will also bring some restrictions.
const github = new ProbotOctokit ( {
auth : {
This issue was generated by todo based on a TODO
comment in 457381c when #1 was merged. cc @ti-community-infra .
// TODO: Refactor the LaterThan function.
/**
* Determine that whether time A later than time B.
* @param timeAStr String of time A.
* @param timeBStr String of time B.
* @return If time A later than time B, return true.
This issue was generated by todo based on a TODO
comment in 457381c when #1 was merged. cc @ti-community-infra .
Feature Request
Is your feature request related to a Issue or PR(Optional)
None
Describe the feature you'd like:
Combine BigQuery data with SIG data for analysis.
Do you have any ideas on how to implement it? (Optional)
// TODO: patch the relation field.
// Patch the relation field.
pullInDB . relation =
pull . author_association === "MEMBER" ? "member" : "not member" ;
// Patch the labels field.
This issue was generated by todo based on a TODO
comment in 457381c when #1 was merged. cc @ti-community-infra .
Feature Request
Is your feature request related to a Issue or PR (Optional)
None
Describe the feature you'd like:
Investigate ways to use GH Archive BigQuery and Metabase together.
Do you have any ideas on how to implement it? (Optional)
// TODO: Clean up the unused code temporarily left here.
describe ( "Ti Sync Bot" , ( ) => {
// let probot: any;
beforeAll ( ( ) => {
useContainer ( Container ) ;
This issue was generated by todo based on a TODO
comment in 457381c when #1 was merged. cc @ti-community-infra .
Feature Request
Related repository
Which project: ti-community-infra/ti-sync-bot, ti-community-infra/tichi
Describe the feature you'd like:
Unified definition of comment types between BOT.
// TODO: Incremental sync for issue comment.
break ;
}
}
This issue was generated by todo based on a TODO
comment in 045f1be when #20 was merged. cc @ti-community-infra .
// TODO: Patch the review update time.
// Notice: The payload of pull request review does not include update time. The update time of
// pull request will be changed due to review operations.
...review ,
} ) ;
break ;
This issue was generated by todo based on a TODO
comment in 045f1be when #20 was merged. cc @ti-community-infra .
// TODO: use time.laterThan instead of timeALaterThanTimeB.
// Ignore outdated PR data.
const isPRUpdated = timeALaterThanTimeB (
pull . updated_at ,
This issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
Feature Request
Describe the feature you'd like:
If the comment of the PR contains /lgtm
command, then it is also considered a review, and the last review time of the PR will be updated based on this judgment.
Feature Request
Describe the feature you'd like:
add test for app startup event.
// 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 issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
Feature Request
I have searched the issues of this repository and believe that this is not a duplicate.
Is your feature request related to a Issue or PR(Optional)
None
Describe the feature you'd like:
Do you have any ideas on how to implement it? (Optional)
// TODO: Sync issue comment.
}
// In order to avoid frequent access to the API.
This issue was generated by todo based on a TODO
comment in 045f1be when #20 was merged. cc @ti-community-infra .
// TODO: Sync Open PR Status.
// TODO: Sync Contributor Email.
}
// TODO: Optimize the sleep time.
// In order to avoid frequent access to the API.
This issue was generated by todo based on a TODO
comment in b944aa2 when #9 was merged. cc @ti-community-infra .
Bug Report
What is expected?
Robot comments should not be considered valid comments.
What is actually happening?
Robot comments will also change the last comment time of PR.
Bug Report
What is expected?
The field last_update_code_at
of table open_pr_status
should not be ON UPDATE CURRENT_TIMESTAMP
.
What is actually happening?
The definition of ON UPDATE CURRENT_TIMESTAMP
will make the database update the last_update_code_at
field when we only update last_comment_time
.