-
-
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
Feature: Archive repos #5009
Feature: Archive repos #5009
Conversation
Do not merge with master but try rebasing on master branch |
062b168
to
16a96f3
Compare
@lafriks done (actually, resetting was much faster) |
I tried to use this icon for the "this repo is archived"-indicator, but it seems like the version of octicon we're using is outdated. After that, I looked for a way to update it (in a seperate pr) but apparantly github has removed icon font usage entirely, meaning we'd need to update every icon in the whole project to use svg icons instead... So I'm sticking with the icon from semantic ui for now. |
routers/repo/setting.go
Outdated
} | ||
if err := repo.ToggleArchiveRepo(); err != nil { | ||
log.Error(4, "Tried to archive a repo: %s", err) | ||
ctx.Error(500) |
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.
This will be ignored since ctx.Redirect
will use a 3XX HTTP code.
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.
Codecov Report
@@ Coverage Diff @@
## master #5009 +/- ##
==========================================
- Coverage 37.93% 37.89% -0.05%
==========================================
Files 328 328
Lines 48141 48190 +49
==========================================
- Hits 18264 18261 -3
- Misses 27252 27299 +47
- Partials 2625 2630 +5
Continue to review full report at Codecov.
|
You mean I should just explicitly check if the repo is archived when someone tries to create an issue/pr? |
@kolaente maybe somebody want to search issues on an archive repo? |
By the way, wouldn't we want to make it request for the name of |
@adelowo I don't think it's nessecary to have a name-check as this can easily be undone, not like renaming the repo. |
@adelowo which other changes cannot be updated in github? |
@kolaente conflict with CSS @jonasfranz please update review |
@techknowlogick resolved conflicts |
@kolaente Thanks 😄 |
I have been waiting so long for this feature and now it has been finally added! |
Thanks for merging this! |
template: repo/header:11:10: executing "repo/header" at <.IsArchived>: can't evaluate field IsArchived in type *models.Repository This didn't come with a migration. I keep on getting this error. I know when I tested earlier, it was fine :) |
Did it create the table column? Normally it syncs all structs automatically, so it should exist (which is why I didn't create a dedicated migration). |
|
Did you customize the header? |
I just tried it on try.gitea.io where it works without issues... |
No... I do have a clean branch, no customizations Will |
No idea why /shrug |
This pr adds the ability to archive a repo, as described in #1353.
When a repo is archived, it is not possible to push to it, neither the creation of new issues or pull requests. In all lists (~Dashboard/Search/Explore/Profiles), the repo is marked with a tiny inicator if its archived.
Blocked by go-gitea/go-sdk#122
Off-Topic: I actually don't know why this pr shows up with 391 commits 🤔, so if anyone knows how to resolve this, please tell me.
Screenshots