-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Repository transfer should be confirmed by the new owner before the transfer actually occurs #5744
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
Closed
Closed
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
86bd92c
add migrations
adelowo a904524
save to repo_transfer and don't actually perform a transfer just yet
adelowo e5fb931
make sure there can only be one transfer process at any given time
adelowo f08acee
add status to check to make sure we check for only 'pending' transfers
adelowo be9b779
start working on cancellation of a repo transfer request
adelowo 771f814
add ability to cancel an ongoing transfer
adelowo ace5062
little cleanup
adelowo ac77491
fix build
adelowo 1c64269
added comments
adelowo 25386e1
fix review
adelowo 02906e2
complete repo transfer
adelowo 2e049da
Merge branch 'master' into repo_transfer
adelowo a7f7662
start work on email notification
adelowo ec154fd
cannot transfer an archived repo
adelowo ec3ece4
fix redirection
adelowo b515fd6
send email to user
adelowo 79f9952
transfer repository acknowledgement
adelowo 861d9ab
Merge branch 'master' into repo_transfer
adelowo 13984c2
use member of owner team email address for repo transfers to an organ…
adelowo 549aa0c
implement rejection of repo transfer
adelowo d749dda
fix link
adelowo 5b1b4c4
try to fix tests
adelowo a29a22e
tests for starting and cancelling a repo transfer
adelowo 7d701c1
fix mispellings
adelowo a155de7
add repo redirect after a successful repo transfer
adelowo 008f942
use 404 instead of unauthorized
adelowo 1943b82
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 95d6b0b
fix merge conflicts
adelowo 997d530
fix merge conflicts
adelowo 69a62f5
fix build issues
adelowo b192f03
write notifications
adelowo 8954618
fix godoc
adelowo 4cf79f7
Merge remote-tracking branch 'origin/master' into repo_transfer
adelowo 79f7ae4
Merge branch 'master' into repo_transfer
adelowo a5eb37c
Merge branch 'master' into repo_transfer
adelowo e093b20
Merge branch 'master' into repo_transfer
adelowo b7a5dc4
Merge branch 'master' into repo_transfer
adelowo b04ace2
Merge remote-tracking branch 'origin' into repo_transfer
adelowo efbbf45
fix merge conflicts
adelowo 3a8dcf1
Merge remote-tracking branch 'origin' into repo_transfer
adelowo 7e961ce
fix merge conflicts
adelowo 736dcb5
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo f339291
fix transfer logic and hook email up
adelowo bba603e
switch transfer logic to services/repo
adelowo 5c578fc
make repository transfer as accepted when user accepts
adelowo e7501ed
fix test
adelowo 557b353
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 4dff694
fix ci
adelowo e870ec0
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 5fe80cb
Merge remote-tracking branch 'origin' into repo_transfer
adelowo dd29d2f
add support for teams ID
adelowo f43d9a4
Add omit tag
adelowo e179100
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo b481a5a
update swagger
adelowo 2cd9093
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 8d8bb35
fix test
adelowo 114bc96
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 57336cc
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 4084c40
Fix swagger definition
adelowo bfd1bbd
Merge branch 'master' into repo_transfer
lafriks 90578de
update migration
adelowo 727dd45
Merge branch 'master' into repo_transfer
adelowo 0bab4a3
Merge branch 'master' of github.com:go-gitea/gitea into repo_transfer
adelowo 85c397f
Merge remote-tracking branch 'origin/master' into repo_transfer
adelowo 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- | ||
id: 1 | ||
user_id: 3 | ||
recipient_id: 1 | ||
status: 1 | ||
repo_id: 3 | ||
created_unix: 1553610671 | ||
updated_unix: 1553610671 |
This file contains hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2020 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package migrations | ||
|
||
import ( | ||
"code.gitea.io/gitea/modules/timeutil" | ||
|
||
"xorm.io/xorm" | ||
) | ||
|
||
func addRepoTransfer(x *xorm.Engine) error { | ||
type RepoTransfer struct { | ||
ID int64 `xorm:"pk autoincr"` | ||
UserID int64 | ||
RecipientID int64 | ||
RepoID int64 | ||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL created"` | ||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL updated"` | ||
Status bool | ||
TeamIDs []int64 | ||
} | ||
|
||
return x.Sync(new(RepoTransfer)) | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Should in case anyone is looking at this, it was moved to the newly created
repo_transfer.go
file https://github.com/go-gitea/gitea/pull/5744/files#diff-4a00b23928d7e63417b6a39f3052ec23R126