-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Sync issues, PRs, labels, milestones, comments from GitHub mirrors #20311
Open
harryzcy
wants to merge
136
commits into
go-gitea:main
Choose a base branch
from
harryzcy:sync-issue-pr-and-more
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
6f51310
Define interfaces syncing new issues/PRs
harryzcy 2bcb4c9
Support getting new issues from github
harryzcy c54aa4e
Put issue reactions code in a seperate function
harryzcy 8532fa3
Rename function to getIssueReactions
harryzcy ad8eb2b
Support getting new PRs from github
harryzcy 40c3b32
Fix issue that new PRs not returned
harryzcy 039e505
Allow migration items with mirroring for GitHub
harryzcy a3ca5b0
Fix a comment
harryzcy 176009e
Create relevant functions for uploader
harryzcy 698d6be
Optimize topics creation and updates
harryzcy fb82294
Support updating labels
harryzcy 22835e4
Fix error not returned error
harryzcy 98a8e69
Update Uploader interface
harryzcy 7b7b166
Support updating issues
harryzcy 0932caa
Some cleanups
harryzcy 5ffadeb
Support updating pull requests
harryzcy 6d24299
Support updating milestones
harryzcy faa0d0b
Fix milestone migrations
harryzcy 5895807
Fix: exec sql with session
harryzcy b96fe66
Fix test
harryzcy 696f58f
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy 8127c25
Provide preliminary implementation for releases
harryzcy 07ba080
Support updating comments
harryzcy 9892ae1
Add closed date to milestones
harryzcy 97d47b2
Fix xorm usage
harryzcy 9f5721f
Revert previous change
harryzcy 9ac5518
Fix issue updates
harryzcy 2ae6e4c
Add sync repository function
harryzcy 06cc290
Get new comments/reviews
harryzcy aa7f59e
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy 5b1c73e
Allow syncing with mirror option checked
harryzcy f627311
Display pull request for mirror repo
harryzcy 9ee3ba5
Disable issue on mirror repo
harryzcy 5a1dda4
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy 4f67c5d
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy bbd4648
Add sync items to Mirror struct
harryzcy a0303a2
Support syncing reviews
harryzcy 8874bf5
Merge branch 'main' into sync-issue-pr-and-more
harryzcy dd20d7d
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy c733415
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 73a5a7c
Fix lint issue caused by merge
harryzcy 12851f2
Avoid duplicate code
harryzcy e3a16ff
Fix SPDX-License-Identifier
harryzcy e7b9e02
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 1c8b8ef
Add comments
harryzcy 9af6292
Fix error when syncing comments when PR is not synced
harryzcy acd0ad2
CheckAndEnsureSafePR was ignored when merging
harryzcy 6b8300f
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 9887d8d
Fix download pr tests
harryzcy 8481bcf
Correctly format ISO 8601 time
harryzcy 448ccfd
Update comments
harryzcy 8fb9956
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 786d15f
Fix a sql query
harryzcy a2df3f1
Merge branch 'main' into sync-issue-pr-and-more
harryzcy d9cfdb1
Merge branch 'main' into sync-issue-pr-and-more
harryzcy b5edfea
Merge branch 'main' into sync-issue-pr-and-more
harryzcy e50ab38
Fix lint
harryzcy d83b2ef
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 15d16a5
Identify the right place to do continuous sync
harryzcy ce51877
Sync mirror after migration
harryzcy 78945eb
Enable github sync flag and fix panics
harryzcy a3a4015
Correctly store mirror setting in migration
harryzcy b8f8ab4
Fix: don't delete repo when sync failed
harryzcy de2f2a7
Fix error when syncing milestones
harryzcy 3a72ed9
Update label identification method
harryzcy ef82e4e
Fix lint
harryzcy 244c263
Merge branch 'main' into sync-issue-pr-and-more
harryzcy e52964c
Use correct last synced time
harryzcy 82fe9d5
Correctly get issue id
harryzcy 81cf9fc
Fix PR request sync issue
harryzcy 994da85
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 6855c81
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 6e3b980
Add OriginalID for milestones
harryzcy 186a9a9
Add OriginalID to comments
harryzcy 837c09e
Update comment for label struct
harryzcy b094125
Merge branch 'main' into sync-issue-pr-and-more
harryzcy cbed118
Add OriginalID to Release
harryzcy 2b31c33
Won't hit rate limit with github actions
harryzcy 3d9b7ed
Fix: include originalID in getAllCommentsSince
harryzcy f7e9422
Identify comment by original_id only
harryzcy 328fdaf
Add OriginalID to reviews and review comments
harryzcy 78a00af
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 87c9238
Enable TestGiteaUploadRepo only when token
harryzcy a48b1f3
Fix: update all cols including false boolean value
harryzcy 0fedce2
Comment out code that cause bug with releases
harryzcy d8c0634
Another place to comment out
harryzcy 7406559
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 26b2fd9
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 0b50deb
Merge branch 'main' into sync-issue-pr-and-more
harryzcy bcb8866
Temp disable fast tag syncing for mirrors
harryzcy 80a9877
Refactor release syncing
harryzcy c535198
Refactor again
harryzcy 6c99fbb
Fix bug
harryzcy e199b95
Flip bool and add comments
harryzcy 7511099
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 5169422
Make some error messages lowercased
harryzcy 36c2378
Expose context
harryzcy 35ab3bb
No magic literal
harryzcy 4d2cb07
Add comments for OriginalID
harryzcy 6962c14
Update log text
harryzcy 4a33b2a
Revert sync wiki setting check
harryzcy 884cb6d
Default sync items setting to false
harryzcy 775af9e
Merge branch 'main' into sync-issue-pr-and-more
harryzcy fa40aa7
Expose one more context
harryzcy 2a66750
Update comment
harryzcy d2ef14c
Plural
harryzcy 9bfd3e3
Expose more context
harryzcy e39d0ff
Fix a comment issue and early return for prs
harryzcy ee77675
Fix comment sync error
harryzcy eacc3ed
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 197489b
Fix lint
harryzcy 049faf8
Somehow git merge didn't delete this file
harryzcy e28fa78
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 99f9102
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 3b8291f
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 065469c
Fix functions that gets moved in #26969
harryzcy 4886e18
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 218c8f5
Remove unnecessary variables
harryzcy 3103563
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 079814f
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 71dfb67
Merge branch 'main' into sync-issue-pr-and-more
harryzcy a9247f9
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 079ea08
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 323215f
Merge branch 'main' into sync-issue-pr-and-more
harryzcy 77fd657
Fix build issues from merge
harryzcy 18fffc0
Apply suggestion
harryzcy a52447b
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
harryzcy e677d96
Avoid jquery
harryzcy db4aa34
Merge branch 'main' into sync-issue-pr-and-more
harryzcy b143f4a
Merge branch 'main' into sync-issue-pr-and-more
harryzcy e8119df
Fix build errors
harryzcy df0a535
Merge branch 'main' into sync-issue-pr-and-more
harryzcy e2aaa1a
Merge branch 'main' into sync-issue-pr-and-more
harryzcy cee300a
Merge branch 'main' into sync-issue-pr-and-more
harryzcy d706aa5
Change `interface{}` to `any`
harryzcy 8211411
Merge branch 'main' into sync-issue-pr-and-more
harryzcy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Optimize topics creation and updates
- Loading branch information
commit 698d6be490f97d02b3e0985c3202c9e5580d7171
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So you delete all existing topics that are not contained in the newly synced names?
That's neither what the function name indicates, nor what I would expect.
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.
That's what this PR does right now.
What would you expect it to do? I'm happy to change that.
I would think that topics on Gitea would usually be the same as topics on a remote source like GitHub.