Merge branch 'master' into flufmonster-patch-1
This commit is contained in:
commit
bc00567f8b
|
|
@ -69,9 +69,9 @@ and keep the compatibility on upgrade. To make sure you are
|
|||
running the test suite exactly like we do, you should install
|
||||
the CLI for [Drone CI](https://github.com/drone/drone), as
|
||||
we are using the server for continous testing, following [these
|
||||
instructions](http://readme.drone.io/usage/getting-started-cli). After that,
|
||||
you can simply call `drone exec` within your working directory and it will try
|
||||
to run the test suite locally.
|
||||
instructions](http://docs.drone.io/cli-installation/). After that,
|
||||
you can simply call `drone exec --local --build-event "pull_request"` within
|
||||
your working directory and it will try to run the test suite locally.
|
||||
|
||||
## Vendoring
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ pull request workflow to do that. And, we also use [LGTM](http://lgtm.co)
|
|||
to ensure every PR is reviewed by at least 2 maintainers.
|
||||
|
||||
Please try to make your pull request easy to review for us. And, please read
|
||||
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#best-practices-for-faster-reviews)* guide;
|
||||
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews)* guide;
|
||||
it has lots of useful tips for any project you may want to contribute.
|
||||
Some of the key points:
|
||||
|
||||
|
|
|
|||
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
|
@ -5,7 +5,7 @@
|
|||
branch = "master"
|
||||
name = "code.gitea.io/git"
|
||||
packages = ["."]
|
||||
revision = "0077debc17a58c821f4e62e815a54c1ab52da157"
|
||||
revision = "31f4b8e8c805438ac6d8914b38accb1d8aaf695e"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ func runServ(c *cli.Context) error {
|
|||
claims := jwt.MapClaims{
|
||||
"repo": repo.ID,
|
||||
"op": lfsVerb,
|
||||
"exp": now.Add(5 * time.Minute).Unix(),
|
||||
"exp": now.Add(setting.LFS.HTTPAuthExpiry).Unix(),
|
||||
"nbf": now.Unix(),
|
||||
}
|
||||
if user != nil {
|
||||
|
|
|
|||
|
|
@ -189,6 +189,8 @@ LFS_START_SERVER = false
|
|||
LFS_CONTENT_PATH = data/lfs
|
||||
; LFS authentication secret, change this yourself
|
||||
LFS_JWT_SECRET =
|
||||
; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
|
||||
LFS_HTTP_AUTH_EXPIRY = 20m
|
||||
|
||||
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
|
||||
[ssh.minimum_key_sizes]
|
||||
|
|
@ -412,7 +414,7 @@ ENABLE_FEDERATED_AVATAR = false
|
|||
|
||||
[attachment]
|
||||
; Whether attachments are enabled. Defaults to `true`
|
||||
ENABLE = true
|
||||
ENABLED = true
|
||||
; Path for attachments. Defaults to `data/attachments`
|
||||
PATH = data/attachments
|
||||
; One or more allowed types, e.g. image/jpeg|image/png
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
|
||||
- `LFS_CONTENT_PATH`: **./data/lfs**: Where to store LFS files.
|
||||
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.
|
||||
- `LFS_HTTP_AUTH_EXPIRY`: **20m**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail.
|
||||
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, redirects http requests
|
||||
on another (https) port.
|
||||
- `PORT_TO_REDIRECT`: **80**: Port used when `REDIRECT_OTHER_PORT` is true.
|
||||
|
|
|
|||
|
|
@ -136,10 +136,11 @@ var (
|
|||
}
|
||||
|
||||
LFS struct {
|
||||
StartServer bool `ini:"LFS_START_SERVER"`
|
||||
ContentPath string `ini:"LFS_CONTENT_PATH"`
|
||||
JWTSecretBase64 string `ini:"LFS_JWT_SECRET"`
|
||||
JWTSecretBytes []byte `ini:"-"`
|
||||
StartServer bool `ini:"LFS_START_SERVER"`
|
||||
ContentPath string `ini:"LFS_CONTENT_PATH"`
|
||||
JWTSecretBase64 string `ini:"LFS_JWT_SECRET"`
|
||||
JWTSecretBytes []byte `ini:"-"`
|
||||
HTTPAuthExpiry time.Duration `ini:"LFS_HTTP_AUTH_EXPIRY"`
|
||||
}
|
||||
|
||||
// Security settings
|
||||
|
|
@ -828,6 +829,9 @@ func NewContext() {
|
|||
LFS.ContentPath = filepath.Join(AppWorkPath, LFS.ContentPath)
|
||||
}
|
||||
|
||||
sec = Cfg.Section("LFS")
|
||||
LFS.HTTPAuthExpiry = sec.Key("LFS_HTTP_AUTH_EXPIRY").MustDuration(20 * time.Minute)
|
||||
|
||||
if LFS.StartServer {
|
||||
|
||||
if err := os.MkdirAll(LFS.ContentPath, 0700); err != nil {
|
||||
|
|
@ -947,7 +951,7 @@ func NewContext() {
|
|||
AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png,application/zip,application/gzip"), "|", ",", -1)
|
||||
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(4)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5)
|
||||
AttachmentEnabled = sec.Key("ENABLE").MustBool(true)
|
||||
AttachmentEnabled = sec.Key("ENABLED").MustBool(true)
|
||||
|
||||
TimeFormatKey := Cfg.Section("time").Key("FORMAT").MustString("RFC1123")
|
||||
TimeFormat = map[string]string{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package util
|
|||
import (
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
|
@ -56,16 +57,25 @@ func Max(a, b int) int {
|
|||
|
||||
// URLJoin joins url components, like path.Join, but preserving contents
|
||||
func URLJoin(base string, elems ...string) string {
|
||||
u, err := url.Parse(base)
|
||||
if !strings.HasSuffix(base, "/") {
|
||||
base += "/"
|
||||
}
|
||||
baseURL, err := url.Parse(base)
|
||||
if err != nil {
|
||||
log.Error(4, "URLJoin: Invalid base URL %s", base)
|
||||
return ""
|
||||
}
|
||||
joinArgs := make([]string, 0, len(elems)+1)
|
||||
joinArgs = append(joinArgs, u.Path)
|
||||
joinArgs = append(joinArgs, elems...)
|
||||
u.Path = path.Join(joinArgs...)
|
||||
return u.String()
|
||||
joinedPath := path.Join(elems...)
|
||||
argURL, err := url.Parse(joinedPath)
|
||||
if err != nil {
|
||||
log.Error(4, "URLJoin: Invalid arg %s", joinedPath)
|
||||
return ""
|
||||
}
|
||||
joinedURL := baseURL.ResolveReference(argURL).String()
|
||||
if !baseURL.IsAbs() && !strings.HasPrefix(base, "/") {
|
||||
return joinedURL[1:] // Removing leading '/' if needed
|
||||
}
|
||||
return joinedURL
|
||||
}
|
||||
|
||||
// Min min of two ints
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@ func TestURLJoin(t *testing.T) {
|
|||
"a", "b/c/"),
|
||||
newTest("a/b/d",
|
||||
"a/", "b/c/", "/../d/"),
|
||||
newTest("https://try.gitea.io/a/b/c#d",
|
||||
"https://try.gitea.io", "a/b", "c#d"),
|
||||
newTest("/a/b/d",
|
||||
"/a/", "b/c/", "/../d/"),
|
||||
newTest("/a/b/c",
|
||||
"/a", "b/c/"),
|
||||
newTest("/a/b/c#hash",
|
||||
"/a", "b/c#hash"),
|
||||
} {
|
||||
assert.Equal(t, test.Expected, URLJoin(test.Base, test.Elements...))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ no_reply_address_helper=Domain-Namen für Benutzer mit einer versteckten Emailad
|
|||
uname_holder=E-Mail-Adresse oder Benutzername
|
||||
password_holder=Passwort
|
||||
switch_dashboard_context=Kontext der Übersichtsseite wechseln
|
||||
my_repos=Repositories
|
||||
show_more_repos=Zeige mehr Repositories…
|
||||
collaborative_repos=Gemeinschaftliche Repositories
|
||||
my_orgs=Meine Organisationen
|
||||
|
|
@ -462,6 +463,7 @@ then_enter_passcode=Und gebe dann die angezeigte PIN der Anwendung ein:
|
|||
passcode_invalid=Die PIN ist falsch. Probiere es erneut.
|
||||
twofa_enrolled=Die Zwei-Faktor-Authentifizierung wurde für dein Konto aktiviert. Bewahre dein Einmalpasswort (%s) an einem sicheren Ort auf, da es nicht wieder angezeigt werden wird.
|
||||
|
||||
u2f_desc=Hardware-Sicherheitsschlüssel sind Geräte, die kryptografische Schlüssel beinhalten. Diese können für die Zwei-Faktor-Authentifizierung verwendet werden. Der Sicherheitsschlüssel muss den <a href="https://fidoalliance.org/">FIDO U2F</a>-Standard unterstützen.
|
||||
u2f_require_twofa=Du musst die Zwei-Faktor-Authentifizierung aktivieren, um Hardware-Sicherheitsschlüssel nutzen zu können.
|
||||
u2f_register_key=Sicherheitsschlüssel hinzufügen
|
||||
u2f_nickname=Nickname
|
||||
|
|
@ -691,6 +693,8 @@ issues.filter_sort.recentupdate=Kürzlich aktualisiert
|
|||
issues.filter_sort.leastupdate=Am Längsten nicht aktualisiert
|
||||
issues.filter_sort.mostcomment=Am meisten kommentiert
|
||||
issues.filter_sort.leastcomment=Am wenigsten kommentiert
|
||||
issues.filter_sort.mostforks=Meiste Forks
|
||||
issues.filter_sort.fewestforks=Wenigste Forks
|
||||
issues.action_open=Öffnen
|
||||
issues.action_close=Schließen
|
||||
issues.action_label=Label
|
||||
|
|
@ -1357,6 +1361,7 @@ repos.name=Name
|
|||
repos.private=Privat
|
||||
repos.watches=Beobachtungen
|
||||
repos.stars=Favoriten
|
||||
repos.forks=Forks
|
||||
repos.issues=Issues
|
||||
repos.size=Größe
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ u2f_error_1=Произошла неизвестная ошибка. Повтор
|
|||
u2f_error_2=Пожалуйста, убедитесь, что вы используете зашифрованное соединение (https://) и используете правильный URL.
|
||||
u2f_error_3=Серверу не удалось обработать ваш запрос.
|
||||
u2f_error_4=Представленный ключ не подходит для этого запроса. Если вы пытаетесь зарегистрировать его, убедитесь, что ключ еще не зарегистрирован.
|
||||
u2f_error_5=Таймаут достигнут до того, как ваш ключ был прочитан. Перезагрузите, чтобы повторить попытку.
|
||||
u2f_reload=Обновить
|
||||
|
||||
repository=Репозиторий
|
||||
|
|
@ -126,6 +127,7 @@ disable_gravatar_popup=Отключить Gravatar и сторонние ист
|
|||
federated_avatar_lookup_popup=Включите поиск федеративного аватара для использования службы с открытым исходным кодом на основе libravatar.
|
||||
disable_registration=Отключить самостоятельную регистрацию
|
||||
disable_registration_popup=Запретить самостоятельную регистрацию. Только администраторы смогут создавать новые учетные записи пользователей.
|
||||
allow_only_external_registration_popup=Включить регистрацию только через сторонние сервисы.
|
||||
openid_signin=Включение входа через OpenID
|
||||
openid_signin_popup=Включение входа через OpenID.
|
||||
openid_signup=Включить саморегистрацию OpenID
|
||||
|
|
@ -141,6 +143,7 @@ confirm_password=Подтвердить пароль
|
|||
admin_email=Адрес эл. почты
|
||||
install_btn_confirm=Установить Gitea
|
||||
test_git_failed=Не удалось проверить 'git' команду: %v
|
||||
sqlite3_not_available=Эта версия Gitea не поддерживает SQLite3. Пожалуйста, загрузите официальную бинарную версию из %s (не 'go build' версия).
|
||||
invalid_db_setting=Недопустимые параметры настройки базы данных: %v
|
||||
invalid_repo_path=Недопустимый путь к корню репозитория: %v
|
||||
save_config_failed=Не удалось сохранить конфигурацию: %v
|
||||
|
|
@ -429,6 +432,7 @@ confirm_delete_account=Подтвердите удаление
|
|||
[repo]
|
||||
owner=Владелец
|
||||
repo_name=Имя репозитория
|
||||
repo_name_helper=Лучшие названия репозиториев состоят их коротких, легко запоминаемых и уникальных ключевых слов.
|
||||
visibility=Видимость
|
||||
visiblity_helper=Сделать репозиторий приватным
|
||||
visiblity_fork_helper=(Изменение этого повлияет на все форки.)
|
||||
|
|
@ -539,6 +543,7 @@ editor.upload_files_to_dir=Загрузить файлы '%s'
|
|||
|
||||
commits.commits=Коммиты
|
||||
commits.find=Поиск
|
||||
commits.search_all=Все ветки
|
||||
commits.author=Автор
|
||||
commits.message=Сообщение
|
||||
commits.date=Дата
|
||||
|
|
@ -577,7 +582,9 @@ issues.delete_branch_at=`удалена ветка <b>%s</b> %s`
|
|||
issues.open_tab=%d открыто(ы)
|
||||
issues.close_tab=%d закрыто(ы)
|
||||
issues.filter_label=Метка
|
||||
issues.filter_label_no_select=Все метки
|
||||
issues.filter_milestone=Этап
|
||||
issues.filter_milestone_no_select=Все этапы
|
||||
issues.filter_assignee=Назначено
|
||||
issues.filter_type=Тип
|
||||
issues.filter_type.all_issues=Все задачи
|
||||
|
|
@ -628,6 +635,8 @@ issues.label_count=%d меток
|
|||
issues.label_open_issues=%d открытых задач
|
||||
issues.label_edit=Редактировать
|
||||
issues.label_delete=Удалить
|
||||
issues.label_modify=Изменить метку
|
||||
issues.label_deletion=Удалить метку
|
||||
issues.label.filter_sort.alphabetically=По алфавиту
|
||||
issues.label.filter_sort.reverse_alphabetically=С конца алфавита
|
||||
issues.label.filter_sort.by_size=Размер
|
||||
|
|
@ -765,6 +774,7 @@ settings.external_tracker_url=URL внешней системы отслежив
|
|||
settings.tracker_url_format=Внешний формат ссылки системы отслеживания ошибок.
|
||||
settings.tracker_issue_style.numeric=Цифровой
|
||||
settings.tracker_issue_style.alphanumeric=Буквенноцифровой
|
||||
settings.admin_settings=Настройки администратора
|
||||
settings.danger_zone=Опасная зона
|
||||
settings.new_owner_has_same_repo=У нового владельца уже есть хранилище с таким названием.
|
||||
settings.transfer=Передать права собственности
|
||||
|
|
@ -789,10 +799,15 @@ settings.discord_username=Имя пользователя
|
|||
settings.discord_icon_url=URL иконки
|
||||
settings.slack_color=Цвет
|
||||
settings.event_create=Создать
|
||||
settings.event_fork=Форкнуть
|
||||
settings.event_issues=Задачи
|
||||
settings.event_pull_request=Pull Request
|
||||
settings.event_push=Push
|
||||
settings.event_repository=Репозиторий
|
||||
settings.event_repository_desc=Репозиторий создан или удален.
|
||||
settings.add_hook_success=Webhook был добавлен.
|
||||
settings.update_webhook=Обновление Webhook
|
||||
settings.update_hook_success=Webhook был обновлен.
|
||||
settings.recent_deliveries=Недавние рассылки
|
||||
settings.hook_type=Тип перехватчика
|
||||
settings.slack_token=Slack токен
|
||||
|
|
@ -800,6 +815,7 @@ settings.slack_domain=Домен
|
|||
settings.slack_channel=Канал
|
||||
settings.deploy_keys=Ключи развертывания
|
||||
settings.add_deploy_key=Добавить ключ развертывания
|
||||
settings.is_writable=Разрешить запись
|
||||
settings.title=Заголовок
|
||||
settings.deploy_key_content=Содержимое
|
||||
settings.branches=Ветки
|
||||
|
|
@ -845,8 +861,11 @@ release.save_draft=Сохранить черновик
|
|||
release.deletion_success=Релиз был удалён.
|
||||
release.downloads=Загрузки
|
||||
|
||||
branch.name=Имя ветки
|
||||
branch.search=Поиск веток
|
||||
branch.already_exists=Ветка с именем '%s' уже существует.
|
||||
branch.delete_head=Удалить
|
||||
branch.delete=Удалить ветку '%s'
|
||||
branch.delete_html=Удалить ветку
|
||||
branch.create_branch=Создать ветку <strong>%s</strong>
|
||||
branch.create_from=из '%s'
|
||||
|
|
@ -870,9 +889,12 @@ create_team=Создать команду
|
|||
org_desc=Описание
|
||||
team_name=Название команды
|
||||
team_desc=Описание
|
||||
team_permission_desc=Разрешение
|
||||
team_unit_desc=Разрешить доступ к разделам репозитория
|
||||
|
||||
|
||||
settings=Настройки
|
||||
settings.options=Организация
|
||||
settings.full_name=Полное имя
|
||||
settings.website=Сайт
|
||||
settings.location=Местоположение
|
||||
|
|
@ -881,9 +903,15 @@ settings.update_setting_success=Настройки организации обн
|
|||
settings.delete=Удалить организацию
|
||||
settings.delete_account=Удалить эту организацию
|
||||
settings.confirm_delete_account=Подтвердить удаление
|
||||
settings.delete_org_title=Удалить организацию
|
||||
settings.delete_org_desc=Эта организация будет безвозвратно удалена. Продолжить?
|
||||
settings.hooks_desc=Добавьте webhooks, который будет вызываться для <strong>всех репозиториев</strong> под этой организации.
|
||||
|
||||
members.membership_visibility=Видимость участника команды:
|
||||
members.public=Видимый
|
||||
members.public_helper=скрыть
|
||||
members.private=Скрыт
|
||||
members.private_helper=сделать видимым
|
||||
members.member_role=Роль участника:
|
||||
members.owner=Владелец
|
||||
members.member=Участник
|
||||
|
|
@ -895,12 +923,18 @@ members.invite_now=Пригласите сейчас
|
|||
teams.join=Объединить
|
||||
teams.leave=Выйти
|
||||
teams.read_access=Доступ на чтение
|
||||
teams.read_access_helper=Участники могут просматривать и клонировать командные репозитории.
|
||||
teams.write_access=Доступ на запись
|
||||
teams.write_access_helper=Участники могут читать и выполнять push в командные репозитории.
|
||||
teams.admin_access=Доступ администратора
|
||||
teams.admin_access_helper=Участники могут выполнять pull, push в командные репозитории и добавлять соавторов в команду.
|
||||
teams.no_desc=Эта группа не имеет описания
|
||||
teams.settings=Настройки
|
||||
teams.members=Члены группы разработки
|
||||
teams.update_settings=Обновить настройки
|
||||
teams.delete_team=Удалить команду
|
||||
teams.add_team_member=Добавление члена группы разработки
|
||||
teams.delete_team_title=Удалить команду
|
||||
teams.delete_team_success=Команда удалена.
|
||||
teams.repositories=Репозитории группы разработки
|
||||
teams.search_repo_placeholder=Поиск репозитория…
|
||||
|
|
@ -958,6 +992,7 @@ dashboard.total_gc_pause=Итоговая задержка GC
|
|||
dashboard.last_gc_pause=Последняя пауза сборщика мусора
|
||||
dashboard.gc_times=Количество сборок мусора
|
||||
|
||||
users.name=Имя пользователя
|
||||
users.activated=Активирован
|
||||
users.admin=Администратор
|
||||
users.repos=Репозитории
|
||||
|
|
@ -970,6 +1005,7 @@ orgs.org_manage_panel=Управление организациями
|
|||
orgs.name=Название
|
||||
orgs.teams=Команды
|
||||
orgs.members=Участники
|
||||
orgs.new_orga=Новая организация
|
||||
|
||||
repos.repo_manage_panel=Управление репозиториями
|
||||
repos.owner=Владелец
|
||||
|
|
@ -994,6 +1030,8 @@ auths.bind_dn=Bind DN
|
|||
auths.bind_password=Привязать пароль
|
||||
auths.user_base=База для поиска пользователя
|
||||
auths.user_dn=DN пользователя
|
||||
auths.use_paged_search=Использовать постраничный поиск
|
||||
auths.search_page_size=Размер страницы
|
||||
auths.filter=Фильтр пользователя
|
||||
auths.admin_filter=Фильтр администратора
|
||||
auths.ms_ad_sa=Атрибуты поиска MS AD
|
||||
|
|
@ -1026,7 +1064,11 @@ auths.new_success=Метод аутентификации '%s' был добав
|
|||
auths.delete_auth_title=Удалить источник аутентификации
|
||||
|
||||
config.server_config=Конфигурация сервера
|
||||
config.app_name=Название сайта
|
||||
config.app_ver=Версия Gitea
|
||||
config.app_url=Базовый URL-адрес Gitea
|
||||
config.custom_conf=Путь к файлу конфигурации
|
||||
config.offline_mode=Локальный режим
|
||||
config.disable_router_log=Отключение журнала маршрутизатора
|
||||
config.run_mode=Режим выполнения
|
||||
config.git_version=Версия Git
|
||||
|
|
@ -1038,6 +1080,7 @@ config.reverse_auth_user=Имя пользователя для авториза
|
|||
|
||||
config.ssh_config=Конфигурация SSH
|
||||
config.ssh_enabled=SSH включён
|
||||
config.ssh_start_builtin_server=Использовать встроенный сервер
|
||||
config.ssh_port=Порт
|
||||
config.ssh_listen_port=Прослушиваемый порт
|
||||
config.ssh_root_path=Корневой путь
|
||||
|
|
@ -1050,15 +1093,21 @@ config.db_config=Конфигурация базы данных
|
|||
config.db_type=Тип
|
||||
config.db_host=Сервер
|
||||
config.db_name=Имя
|
||||
config.db_ssl_mode=SSL
|
||||
config.db_ssl_mode_helper=(только для "postgres")
|
||||
config.db_path=Путь
|
||||
config.db_path_helper=(для "sqlite3" и "tidb")
|
||||
|
||||
config.service_config=Сервисная конфигурация
|
||||
config.disable_register=Отключить самостоятельную регистрацию
|
||||
config.enable_openid_signin=Включение входа через OpenID
|
||||
config.show_registration_button=Показать кнопку регистрации
|
||||
config.disable_key_size_check=Отключить проверку на минимальный размер ключа
|
||||
config.enable_captcha=Включить CAPTCHA
|
||||
config.active_code_lives=Время жизни кода для активации
|
||||
config.reset_password_code_lives=Время жизни кода на сброс пароля
|
||||
config.enable_timetracking=Включить отслеживание времени
|
||||
config.default_enable_timetracking=Включить отслеживание времени по умолчанию
|
||||
|
||||
config.webhook_config=Конфигурация Webhooks
|
||||
config.queue_length=Длина очереди
|
||||
|
|
@ -1175,6 +1224,8 @@ raw_seconds=секунд
|
|||
raw_minutes=минут
|
||||
|
||||
[dropzone]
|
||||
default_message=Перетащите файл или кликните сюда для загрузки.
|
||||
invalid_input_type=Вы не можете загружать файлы этого типа.
|
||||
file_too_big=Размер файла ({{filesize}} МБ) больше чем максимальный размер ({{maxFilesize}} МБ).
|
||||
remove_file=Удалить файл
|
||||
|
||||
|
|
@ -1194,4 +1245,5 @@ error.no_gpg_keys_found=Не найден GPG ключ соответствую
|
|||
error.not_signed_commit=Неподписанный коммит
|
||||
|
||||
[units]
|
||||
error.unit_not_allowed=У вас нет доступа к этому разделу репозитория.
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ twofa=Двофакторна авторизація
|
|||
twofa_scratch=Двофакторний одноразовий пароль
|
||||
passcode=Код доступу
|
||||
|
||||
u2f_insert_key=Вставте ключ безпеки
|
||||
u2f_reload=Оновити
|
||||
|
||||
repository=Репозиторій
|
||||
|
|
@ -146,7 +147,7 @@ no_reply_address=Прихований поштовий домен
|
|||
[home]
|
||||
uname_holder=Ім'я користувача або Ел. пошта
|
||||
password_holder=Пароль
|
||||
switch_dashboard_context=Змінити дошку
|
||||
switch_dashboard_context=Переключити контекст панелі управління
|
||||
my_repos=Репозиторії
|
||||
show_more_repos=Показати більше репозиторіїв…
|
||||
collaborative_repos=Спільні репозиторії
|
||||
|
|
@ -292,6 +293,7 @@ twofa=Двофакторна авторизація
|
|||
account_link=Прив'язані облікові записи
|
||||
organization=Організації
|
||||
uid=Ідентифікатор Uid
|
||||
u2f=Ключі безпеки
|
||||
|
||||
public_profile=Загальнодоступний профіль
|
||||
profile_desc=Ваша адреса електронної пошти використовуватиметься для сповіщення та інших операцій.
|
||||
|
|
@ -305,6 +307,7 @@ continue=Продовжити
|
|||
cancel=Відміна
|
||||
language=Мова
|
||||
|
||||
lookup_avatar_by_mail=Знайти Аватар за адресою електронної пошти
|
||||
federated_avatar_lookup=Знайти зовнішній аватар
|
||||
enable_custom_avatar=Увімкнути користувацькі аватари
|
||||
choose_new_avatar=Оберіть новий аватар
|
||||
|
|
@ -462,7 +465,7 @@ pulls=Запити на злиття
|
|||
labels=Мітки
|
||||
milestones=Етап
|
||||
commits=Коміти
|
||||
commit=Змина
|
||||
commit=Коміт
|
||||
releases=Релізи
|
||||
file_raw=Неформатований
|
||||
file_history=Історія
|
||||
|
|
@ -559,6 +562,7 @@ issues.filter_sort.recentupdate=Нещодавно оновлено
|
|||
issues.filter_sort.leastupdate=Найдавніше оновлені
|
||||
issues.filter_sort.mostcomment=Найбільш коментовані
|
||||
issues.filter_sort.leastcomment=Найменш коментовані
|
||||
issues.filter_sort.mostforks=Найбільше форків
|
||||
issues.action_open=Відкрити
|
||||
issues.action_close=Закрити
|
||||
issues.action_label=Мітка
|
||||
|
|
@ -652,7 +656,7 @@ pulls.merged=Злито
|
|||
pulls.has_merged=Запит на злиття було об'єднано.
|
||||
pulls.can_auto_merge_desc=Цей запит можна об'єднати автоматично.
|
||||
pulls.cannot_auto_merge_desc=Цей запит на злиття не може бути злитий автоматично через конфлікти.
|
||||
pulls.cannot_auto_merge_helper=Злити вручну для вирішення конфліктів.
|
||||
pulls.cannot_auto_merge_helper=Злийте вручну для вирішення конфліктів.
|
||||
pulls.merge_pull_request=Об'єднати запит на злиття
|
||||
pulls.rebase_merge_pull_request=Зробити Rebase і злити
|
||||
pulls.squash_merge_pull_request=Об'єднати (Squash) і злити
|
||||
|
|
@ -755,6 +759,7 @@ settings.use_internal_wiki=Використовувати вбудовані В
|
|||
settings.use_external_wiki=Використовувати зовнішні Вікі
|
||||
settings.external_wiki_url=URL зовнішньої вікі
|
||||
settings.issues_desc=Увімкнути відстеження проблем в репозиторію
|
||||
settings.use_internal_issue_tracker=Використовувати вбудовану систему відстеження проблем
|
||||
settings.external_tracker_url=URL зовнішньої системи відстеження проблем
|
||||
settings.tracker_url_format=Формат URL зовнішнього трекера задач
|
||||
settings.tracker_issue_style.numeric=Цифровий
|
||||
|
|
@ -1108,6 +1113,7 @@ config.app_ver=Версія Gitea
|
|||
config.app_url=Базова URL-адреса Gitea
|
||||
config.custom_conf=Шлях до файлу конфігурації
|
||||
config.domain=Домен SSH сервера
|
||||
config.offline_mode=Локальний режим
|
||||
config.disable_router_log=Вимкнути логування роутеру
|
||||
config.run_user=Запуск від імені Користувача
|
||||
config.run_mode=Режим виконання
|
||||
|
|
@ -1228,6 +1234,7 @@ notices.type=Тип
|
|||
notices.type_1=Репозиторій
|
||||
notices.desc=Опис
|
||||
notices.op=Оп.
|
||||
notices.delete_success=Сповіщення системи були видалені.
|
||||
|
||||
[action]
|
||||
create_repo=створив(ла) репозиторій <a href="%s">%s</a>
|
||||
|
|
|
|||
53
public/swagger.v1.json
vendored
53
public/swagger.v1.json
vendored
|
|
@ -1028,7 +1028,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1338,7 +1340,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -3261,7 +3265,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -7376,11 +7382,13 @@
|
|||
"description": "AccessTokenList represents a list of API access token."
|
||||
},
|
||||
"Attachment": {
|
||||
"description": "Attachment",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Attachment"
|
||||
}
|
||||
},
|
||||
"AttachmentList": {
|
||||
"description": "AttachmentList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7389,11 +7397,13 @@
|
|||
}
|
||||
},
|
||||
"Branch": {
|
||||
"description": "Branch",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Branch"
|
||||
}
|
||||
},
|
||||
"BranchList": {
|
||||
"description": "BranchList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7402,11 +7412,13 @@
|
|||
}
|
||||
},
|
||||
"Comment": {
|
||||
"description": "Comment",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Comment"
|
||||
}
|
||||
},
|
||||
"CommentList": {
|
||||
"description": "CommentList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7415,11 +7427,13 @@
|
|||
}
|
||||
},
|
||||
"DeployKey": {
|
||||
"description": "DeployKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DeployKey"
|
||||
}
|
||||
},
|
||||
"DeployKeyList": {
|
||||
"description": "DeployKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7428,6 +7442,7 @@
|
|||
}
|
||||
},
|
||||
"EmailList": {
|
||||
"description": "EmailList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7436,11 +7451,13 @@
|
|||
}
|
||||
},
|
||||
"GPGKey": {
|
||||
"description": "GPGKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GPGKey"
|
||||
}
|
||||
},
|
||||
"GPGKeyList": {
|
||||
"description": "GPGKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7449,6 +7466,7 @@
|
|||
}
|
||||
},
|
||||
"Hook": {
|
||||
"description": "Hook",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7457,6 +7475,7 @@
|
|||
}
|
||||
},
|
||||
"HookList": {
|
||||
"description": "HookList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7465,11 +7484,13 @@
|
|||
}
|
||||
},
|
||||
"Issue": {
|
||||
"description": "Issue",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Issue"
|
||||
}
|
||||
},
|
||||
"IssueList": {
|
||||
"description": "IssueList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7478,11 +7499,13 @@
|
|||
}
|
||||
},
|
||||
"Label": {
|
||||
"description": "Label",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Label"
|
||||
}
|
||||
},
|
||||
"LabelList": {
|
||||
"description": "LabelList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7494,11 +7517,13 @@
|
|||
"description": "MarkdownRender is a rendered markdown document"
|
||||
},
|
||||
"Milestone": {
|
||||
"description": "Milestone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Milestone"
|
||||
}
|
||||
},
|
||||
"MilestoneList": {
|
||||
"description": "MilestoneList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7507,11 +7532,13 @@
|
|||
}
|
||||
},
|
||||
"Organization": {
|
||||
"description": "Organization",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Organization"
|
||||
}
|
||||
},
|
||||
"OrganizationList": {
|
||||
"description": "OrganizationList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7520,11 +7547,13 @@
|
|||
}
|
||||
},
|
||||
"PublicKey": {
|
||||
"description": "PublicKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PublicKey"
|
||||
}
|
||||
},
|
||||
"PublicKeyList": {
|
||||
"description": "PublicKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7533,11 +7562,13 @@
|
|||
}
|
||||
},
|
||||
"PullRequest": {
|
||||
"description": "PullRequest",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PullRequest"
|
||||
}
|
||||
},
|
||||
"PullRequestList": {
|
||||
"description": "PullRequestList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7546,11 +7577,13 @@
|
|||
}
|
||||
},
|
||||
"Release": {
|
||||
"description": "Release",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Release"
|
||||
}
|
||||
},
|
||||
"ReleaseList": {
|
||||
"description": "ReleaseList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7559,11 +7592,13 @@
|
|||
}
|
||||
},
|
||||
"Repository": {
|
||||
"description": "Repository",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Repository"
|
||||
}
|
||||
},
|
||||
"RepositoryList": {
|
||||
"description": "RepositoryList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7572,6 +7607,7 @@
|
|||
}
|
||||
},
|
||||
"SearchResults": {
|
||||
"description": "SearchResults",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchResults"
|
||||
},
|
||||
|
|
@ -7580,16 +7616,19 @@
|
|||
}
|
||||
},
|
||||
"ServerVersion": {
|
||||
"description": "ServerVersion",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ServerVersion"
|
||||
}
|
||||
},
|
||||
"Status": {
|
||||
"description": "Status",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Status"
|
||||
}
|
||||
},
|
||||
"StatusList": {
|
||||
"description": "StatusList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7598,11 +7637,13 @@
|
|||
}
|
||||
},
|
||||
"Team": {
|
||||
"description": "Team",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Team"
|
||||
}
|
||||
},
|
||||
"TeamList": {
|
||||
"description": "TeamList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7611,11 +7652,13 @@
|
|||
}
|
||||
},
|
||||
"TrackedTime": {
|
||||
"description": "TrackedTime",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TrackedTime"
|
||||
}
|
||||
},
|
||||
"TrackedTimeList": {
|
||||
"description": "TrackedTimeList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7624,11 +7667,13 @@
|
|||
}
|
||||
},
|
||||
"User": {
|
||||
"description": "User",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/User"
|
||||
}
|
||||
},
|
||||
"UserList": {
|
||||
"description": "UserList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7637,6 +7682,7 @@
|
|||
}
|
||||
},
|
||||
"WatchInfo": {
|
||||
"description": "WatchInfo",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/WatchInfo"
|
||||
}
|
||||
|
|
@ -7670,6 +7716,7 @@
|
|||
"description": "APINotFound is a not found empty response"
|
||||
},
|
||||
"parameterBodies": {
|
||||
"description": "parameterBodies",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EditAttachmentOptions"
|
||||
},
|
||||
|
|
|
|||
6
public/vendor/VERSIONS
vendored
6
public/vendor/VERSIONS
vendored
|
|
@ -17,9 +17,6 @@ Version: 1.5.9
|
|||
File(s): /vendor/plugins/gitgraph/gitgraph.js
|
||||
Version: 9b492e8bf1ddf7908a4997b8f83fa38a809a9da3
|
||||
|
||||
File(s): /vendor/plugins/autolink/autolink.js
|
||||
Version: 741f66f
|
||||
|
||||
File(s): /vendor/plugins/vue/vue.min.js
|
||||
Version: 2.1.10
|
||||
|
||||
|
|
@ -50,6 +47,9 @@ Version: 1.10.1
|
|||
File(s): /vendor/plugins/pdfjs/
|
||||
Version: 1.4.20
|
||||
|
||||
File(s): /vendor/plugins/u2f/
|
||||
Version: 1.0.8
|
||||
|
||||
File(s): /vendor/assets/font-awesome/fonts/
|
||||
Version: 4.6.0
|
||||
|
||||
|
|
|
|||
5
public/vendor/librejs.html
vendored
5
public/vendor/librejs.html
vendored
|
|
@ -45,11 +45,6 @@
|
|||
<td><a href="https://github.com/bluef/gitgraph.js/blob/master/LICENSE">BSD 3-Clause</a></td>
|
||||
<td><a href="https://github.com/bluef/gitgraph.js">gitgraph.js-latest</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/vendor/plugins/autolink/autolink.js">autolink.min.js</a></td>
|
||||
<td><a href="https://github.com/egoist/autolink.js/blob/master/LICENSE">Expat</a></td>
|
||||
<td><a href="https://github.com/egoist/autolink.js">autolink.js-latest</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/vendor/plugins/vue/vue.min.js">vue.min.js</a></td>
|
||||
<td><a href="https://github.com/vuejs/vue/blob/dev/LICENSE">Expat</a></td>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ func GetRawFile(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
if !ctx.Repo.HasAccess() {
|
||||
ctx.Status(404)
|
||||
return
|
||||
|
|
@ -85,7 +86,8 @@ func GetArchive(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
repoPath := models.RepoPath(ctx.Params(":username"), ctx.Params(":reponame"))
|
||||
gitRepo, err := git.OpenRepository(repoPath)
|
||||
if err != nil {
|
||||
|
|
@ -121,7 +123,8 @@ func GetEditorconfig(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
ec, err := ctx.Repo.GetEditorconfig()
|
||||
if err != nil {
|
||||
if git.IsErrNotExist(err) {
|
||||
|
|
|
|||
|
|
@ -8,60 +8,70 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Issue
|
||||
// swagger:response Issue
|
||||
type swaggerResponseIssue struct {
|
||||
// in:body
|
||||
Body api.Issue `json:"body"`
|
||||
}
|
||||
|
||||
// IssueList
|
||||
// swagger:response IssueList
|
||||
type swaggerResponseIssueList struct {
|
||||
// in:body
|
||||
Body []api.Issue `json:"body"`
|
||||
}
|
||||
|
||||
// Comment
|
||||
// swagger:response Comment
|
||||
type swaggerResponseComment struct {
|
||||
// in:body
|
||||
Body api.Comment `json:"body"`
|
||||
}
|
||||
|
||||
// CommentList
|
||||
// swagger:response CommentList
|
||||
type swaggerResponseCommentList struct {
|
||||
// in:body
|
||||
Body []api.Comment `json:"body"`
|
||||
}
|
||||
|
||||
// Label
|
||||
// swagger:response Label
|
||||
type swaggerResponseLabel struct {
|
||||
// in:body
|
||||
Body api.Label `json:"body"`
|
||||
}
|
||||
|
||||
// LabelList
|
||||
// swagger:response LabelList
|
||||
type swaggerResponseLabelList struct {
|
||||
// in:body
|
||||
Body []api.Label `json:"body"`
|
||||
}
|
||||
|
||||
// Milestone
|
||||
// swagger:response Milestone
|
||||
type swaggerResponseMilestone struct {
|
||||
// in:body
|
||||
Body api.Milestone `json:"body"`
|
||||
}
|
||||
|
||||
// MilestoneList
|
||||
// swagger:response MilestoneList
|
||||
type swaggerResponseMilestoneList struct {
|
||||
// in:body
|
||||
Body []api.Milestone `json:"body"`
|
||||
}
|
||||
|
||||
// TrackedTime
|
||||
// swagger:response TrackedTime
|
||||
type swaggerResponseTrackedTime struct {
|
||||
// in:body
|
||||
Body api.TrackedTime `json:"body"`
|
||||
}
|
||||
|
||||
// TrackedTimeList
|
||||
// swagger:response TrackedTimeList
|
||||
type swaggerResponseTrackedTimeList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,36 +8,42 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// PublicKey
|
||||
// swagger:response PublicKey
|
||||
type swaggerResponsePublicKey struct {
|
||||
// in:body
|
||||
Body api.PublicKey `json:"body"`
|
||||
}
|
||||
|
||||
// PublicKeyList
|
||||
// swagger:response PublicKeyList
|
||||
type swaggerResponsePublicKeyList struct {
|
||||
// in:body
|
||||
Body []api.PublicKey `json:"body"`
|
||||
}
|
||||
|
||||
// GPGKey
|
||||
// swagger:response GPGKey
|
||||
type swaggerResponseGPGKey struct {
|
||||
// in:body
|
||||
Body api.GPGKey `json:"body"`
|
||||
}
|
||||
|
||||
// GPGKeyList
|
||||
// swagger:response GPGKeyList
|
||||
type swaggerResponseGPGKeyList struct {
|
||||
// in:body
|
||||
Body []api.GPGKey `json:"body"`
|
||||
}
|
||||
|
||||
// DeployKey
|
||||
// swagger:response DeployKey
|
||||
type swaggerResponseDeployKey struct {
|
||||
// in:body
|
||||
Body api.DeployKey `json:"body"`
|
||||
}
|
||||
|
||||
// DeployKeyList
|
||||
// swagger:response DeployKeyList
|
||||
type swaggerResponseDeployKeyList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// ServerVersion
|
||||
// swagger:response ServerVersion
|
||||
type swaggerResponseServerVersion struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import (
|
|||
// not actually a response, just a hack to get go-swagger to include definitions
|
||||
// of the various XYZOption structs
|
||||
|
||||
// parameterBodies
|
||||
// swagger:response parameterBodies
|
||||
type swaggerParameterBodies struct {
|
||||
AddCollaboratorOption api.AddCollaboratorOption
|
||||
|
|
|
|||
|
|
@ -8,24 +8,28 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Organization
|
||||
// swagger:response Organization
|
||||
type swaggerResponseOrganization struct {
|
||||
// in:body
|
||||
Body api.Organization `json:"body"`
|
||||
}
|
||||
|
||||
// OrganizationList
|
||||
// swagger:response OrganizationList
|
||||
type swaggerResponseOrganizationList struct {
|
||||
// in:body
|
||||
Body []api.Organization `json:"body"`
|
||||
}
|
||||
|
||||
// Team
|
||||
// swagger:response Team
|
||||
type swaggerResponseTeam struct {
|
||||
// in:body
|
||||
Body api.Team `json:"body"`
|
||||
}
|
||||
|
||||
// TeamList
|
||||
// swagger:response TeamList
|
||||
type swaggerResponseTeamList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,95 +8,111 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Repository
|
||||
// swagger:response Repository
|
||||
type swaggerResponseRepository struct {
|
||||
// in:body
|
||||
Body api.Repository `json:"body"`
|
||||
}
|
||||
|
||||
// RepositoryList
|
||||
// swagger:response RepositoryList
|
||||
type swaggerResponseRepositoryList struct {
|
||||
// in:body
|
||||
Body []api.Repository `json:"body"`
|
||||
}
|
||||
|
||||
// Branch
|
||||
// swagger:response Branch
|
||||
type swaggerResponseBranch struct {
|
||||
// in:body
|
||||
Body api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// BranchList
|
||||
// swagger:response BranchList
|
||||
type swaggerResponseBranchList struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// Hook
|
||||
// swagger:response Hook
|
||||
type swaggerResponseHook struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// HookList
|
||||
// swagger:response HookList
|
||||
type swaggerResponseHookList struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// Release
|
||||
// swagger:response Release
|
||||
type swaggerResponseRelease struct {
|
||||
// in:body
|
||||
Body api.Release `json:"body"`
|
||||
}
|
||||
|
||||
// ReleaseList
|
||||
// swagger:response ReleaseList
|
||||
type swaggerResponseReleaseList struct {
|
||||
// in:body
|
||||
Body []api.Release `json:"body"`
|
||||
}
|
||||
|
||||
// PullRequest
|
||||
// swagger:response PullRequest
|
||||
type swaggerResponsePullRequest struct {
|
||||
// in:body
|
||||
Body api.PullRequest `json:"body"`
|
||||
}
|
||||
|
||||
// PullRequestList
|
||||
// swagger:response PullRequestList
|
||||
type swaggerResponsePullRequestList struct {
|
||||
// in:body
|
||||
Body []api.PullRequest `json:"body"`
|
||||
}
|
||||
|
||||
// Status
|
||||
// swagger:response Status
|
||||
type swaggerResponseStatus struct {
|
||||
// in:body
|
||||
Body api.Status `json:"body"`
|
||||
}
|
||||
|
||||
// StatusList
|
||||
// swagger:response StatusList
|
||||
type swaggerResponseStatusList struct {
|
||||
// in:body
|
||||
Body []api.Status `json:"body"`
|
||||
}
|
||||
|
||||
// WatchInfo
|
||||
// swagger:response WatchInfo
|
||||
type swaggerResponseWatchInfo struct {
|
||||
// in:body
|
||||
Body api.WatchInfo `json:"body"`
|
||||
}
|
||||
|
||||
// SearchResults
|
||||
// swagger:response SearchResults
|
||||
type swaggerResponseSearchResults struct {
|
||||
Body api.SearchResults `json:"body"`
|
||||
}
|
||||
|
||||
// AttachmentList
|
||||
// swagger:response AttachmentList
|
||||
type swaggerResponseAttachmentList struct {
|
||||
//in: body
|
||||
Body []api.Attachment `json:"body"`
|
||||
}
|
||||
|
||||
// Attachment
|
||||
// swagger:response Attachment
|
||||
type swaggerResponseAttachment struct {
|
||||
//in: body
|
||||
|
|
|
|||
|
|
@ -8,18 +8,21 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// User
|
||||
// swagger:response User
|
||||
type swaggerResponseUser struct {
|
||||
// in:body
|
||||
Body api.User `json:"body"`
|
||||
}
|
||||
|
||||
// UserList
|
||||
// swagger:response UserList
|
||||
type swaggerResponseUserList struct {
|
||||
// in:body
|
||||
Body []api.User `json:"body"`
|
||||
}
|
||||
|
||||
// EmailList
|
||||
// swagger:response EmailList
|
||||
type swaggerResponseEmailList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -223,6 +223,10 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
|
|||
|
||||
var output bytes.Buffer
|
||||
lines := strings.Split(fileContent, "\n")
|
||||
//Remove blank line at the end of file
|
||||
if len(lines) > 0 && lines[len(lines)-1] == "" {
|
||||
lines = lines[:len(lines)-1]
|
||||
}
|
||||
for index, line := range lines {
|
||||
line = gotemplate.HTMLEscapeString(line)
|
||||
if index != len(lines)-1 {
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName))
|
||||
}
|
||||
|
||||
// EditWiki render wiki modify page
|
||||
|
|
@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName))
|
||||
}
|
||||
|
||||
// DeleteWikiPagePost delete wiki page
|
||||
|
|
|
|||
12
templates/home.tmpl
vendored
12
templates/home.tmpl
vendored
|
|
@ -28,7 +28,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Plattformübergreifend
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea läuft überall. <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
Gitea läuft überall. <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> kompiliert für: Windows, macOS, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multi-plateforme
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea tourne partout où <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> peut être compilé : Windows, Mac OS X, Linux, ARM, etc. Choisissez votre préféré !
|
||||
Gitea tourne partout où <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> peut être compilé : Windows, macOS, Linux, ARM, etc. Choisissez votre préféré !
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multiplatforma
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea funciona en cualquier parte, <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> puede compilarse en: Windows, Mac OS X, Linux, ARM, etc. !Elige tu favorita!
|
||||
Gitea funciona en cualquier parte, <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> puede compilarse en: Windows, macOS, Linux, ARM, etc. !Elige tu favorita!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multi-plataforma
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea roda em qualquer sistema operacional em que <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> consegue compilar: Windows, Mac OS X, Linux, ARM, etc. Escolha qual você gosta mais!
|
||||
Gitea roda em qualquer sistema operacional em que <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> consegue compilar: Windows, macOS, Linux, ARM, etc. Escolha qual você gosta mais!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -253,7 +253,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Кроссплатформенный
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener" href="http://golang.org/">Go</a>: Windows, Mac OS X, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
|
||||
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener" href="http://golang.org/">Go</a>: Windows, macOS, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Cross-platform
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea runs anywhere <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
|
||||
Gitea runs anywhere <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
32
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
32
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
|
|
@ -9,6 +9,8 @@ import (
|
|||
"container/list"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mcuadros/go-version"
|
||||
)
|
||||
|
||||
// GetRefCommitID returns the last commit ID string of given reference (branch or tag).
|
||||
|
|
@ -274,7 +276,7 @@ func (repo *Repository) CommitsCountBetween(start, end string) (int64, error) {
|
|||
func (repo *Repository) commitsBefore(id SHA1, limit int) (*list.List, error) {
|
||||
cmd := NewCommand("log")
|
||||
if limit > 0 {
|
||||
cmd.AddArguments("-"+ strconv.Itoa(limit), prettyLogFormat, id.String())
|
||||
cmd.AddArguments("-"+strconv.Itoa(limit), prettyLogFormat, id.String())
|
||||
} else {
|
||||
cmd.AddArguments(prettyLogFormat, id.String())
|
||||
}
|
||||
|
|
@ -316,15 +318,35 @@ func (repo *Repository) getCommitsBeforeLimit(id SHA1, num int) (*list.List, err
|
|||
}
|
||||
|
||||
func (repo *Repository) getBranches(commit *Commit, limit int) ([]string, error) {
|
||||
stdout, err := NewCommand("for-each-ref", "--count="+ strconv.Itoa(limit), "--format=%(refname)", "--contains", commit.ID.String(), BranchPrefix).RunInDir(repo.Path)
|
||||
if version.Compare(gitVersion, "2.7.0", ">=") {
|
||||
stdout, err := NewCommand("for-each-ref", "--count="+strconv.Itoa(limit), "--format=%(refname:strip=2)", "--contains", commit.ID.String(), BranchPrefix).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
branches := strings.Fields(stdout)
|
||||
return branches, nil
|
||||
}
|
||||
|
||||
stdout, err := NewCommand("branch", "--contains", commit.ID.String()).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
refs := strings.Split(stdout, "\n")
|
||||
branches := make([]string, len(refs)-1)
|
||||
for i, ref := range refs[:len(refs)-1] {
|
||||
branches[i] = strings.TrimPrefix(ref, BranchPrefix)
|
||||
|
||||
var max int
|
||||
if len(refs) > limit {
|
||||
max = limit
|
||||
} else {
|
||||
max = len(refs) - 1
|
||||
}
|
||||
|
||||
branches := make([]string, max)
|
||||
for i, ref := range refs[:max] {
|
||||
parts := strings.Fields(ref)
|
||||
|
||||
branches[i] = parts[len(parts)-1]
|
||||
}
|
||||
return branches, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user