-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Display when a repo was archived #22664
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
Merged
Merged
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0516ddc
Add archive date
JakobDev 4cceff0
Use local date format
JakobDev 0e2b687
Fix lint
JakobDev 90b7e33
Use DEFAULT 0
JakobDev 0f2c93b
Use snake case
JakobDev 84cebb4
Use .ID instead .Where
JakobDev d61042b
Merge branch 'main' into archivedate
JakobDev 09a6d15
Merge branch 'main' into archivedate
JakobDev b09dabe
Add migration
JakobDev 5ebc651
Try to fix Migration again
JakobDev 66342e3
Make Migration number bigger
JakobDev 954fa64
Merge branch 'main' into archivedate
JakobDev 9780e24
fix Migration syntax
JakobDev bc14719
Use Datetime function
JakobDev 548d9c8
Changes requested by delv
JakobDev 25a56fd
Apply requested changes
JakobDev e6cf7d2
Update Migration SQL command
JakobDev 2531960
Don't use Pointer
JakobDev 0c79350
Merge branch 'main' into archivedate
silverwind f56e2ed
Merge branch 'main' into archivedate
silverwind 03fb26a
Fix broken translations
JakobDev b72d5ab
Try to make Migration work with all Databases
JakobDev 9b56907
Merge branch 'main' into archivedate
silverwind 207332e
Merge branch 'main' into archivedate
GiteaBot aebcdba
Do requested changes
JakobDev 4616611
Merge branch 'main' into archivedate
JakobDev c189ca9
Check the sync returned argument
lunny 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1_20 //nolint | ||
|
||
import ( | ||
"code.gitea.io/gitea/modules/timeutil" | ||
|
||
"xorm.io/xorm" | ||
) | ||
|
||
func AddArchivedUnixToRepository(x *xorm.Engine) error { | ||
type Repository struct { | ||
ArchivedUnix timeutil.TimeStamp `xorm:"DEFAULT 0"` | ||
} | ||
|
||
x.Sync(new(Repository)) | ||
|
||
_, err := x.Exec("UPDATE repository SET archived_unix = updated_unix WHERE is_archived = ? AND archived_unix = 0", true) | ||
return err | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Uh oh!
There was an error while loading. Please reload this page.