Merge branch 'master' into letsencrypt
This commit is contained in:
commit
e5afbb9b65
|
|
@ -75,6 +75,7 @@ pipeline:
|
||||||
- make lint
|
- make lint
|
||||||
- make fmt-check
|
- make fmt-check
|
||||||
- make swagger-check
|
- make swagger-check
|
||||||
|
- make swagger-validate
|
||||||
- make misspell-check
|
- make misspell-check
|
||||||
- make test-vendor
|
- make test-vendor
|
||||||
- make build
|
- make build
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Make sure to perform a clean build before running tests:
|
||||||
|
|
||||||
## Run all tests via local drone
|
## Run all tests via local drone
|
||||||
```
|
```
|
||||||
drone exec --local --build.event "pull_request"
|
drone exec --local --build-event "pull_request"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run sqlite integrations tests
|
## Run sqlite integrations tests
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,10 @@ func (c *Comment) AfterLoad(session *xorm.Session) {
|
||||||
|
|
||||||
// AfterDelete is invoked from XORM after the object is deleted.
|
// AfterDelete is invoked from XORM after the object is deleted.
|
||||||
func (c *Comment) AfterDelete() {
|
func (c *Comment) AfterDelete() {
|
||||||
|
if c.ID <= 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
_, err := DeleteAttachmentsByComment(c.ID, true)
|
_, err := DeleteAttachmentsByComment(c.ID, true)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -448,6 +448,11 @@ func DeleteReleaseByID(id int64, u *User, delTag bool) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rel.Repo = repo
|
||||||
|
if err = rel.LoadAttributes(); err != nil {
|
||||||
|
return fmt.Errorf("LoadAttributes: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
mode, _ := accessLevel(x, u.ID, rel.Repo)
|
mode, _ := accessLevel(x, u.ID, rel.Repo)
|
||||||
if err := PrepareWebhooks(rel.Repo, HookEventRelease, &api.ReleasePayload{
|
if err := PrepareWebhooks(rel.Repo, HookEventRelease, &api.ReleasePayload{
|
||||||
Action: api.HookReleaseDeleted,
|
Action: api.HookReleaseDeleted,
|
||||||
|
|
|
||||||
|
|
@ -1848,6 +1848,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
|
||||||
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
|
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
attachments := make([]*Attachment, 0, 5)
|
attachments := make([]*Attachment, 0, 5)
|
||||||
if err = sess.
|
if err = sess.
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Здравейте %s, имате непотвърден а
|
||||||
resend_mail=Щракнете тук, за да се изпрати ново писмо за потвърждение
|
resend_mail=Щракнете тук, за да се изпрати ново писмо за потвърждение
|
||||||
reset_password=Нулиране на паролата
|
reset_password=Нулиране на паролата
|
||||||
reset_password_helper=Щракнете тук, за да нулирате паролата си
|
reset_password_helper=Щракнете тук, за да нулирате паролата си
|
||||||
password_too_short=Размерът на паролата не може да бъде по-малък от %d знака.
|
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
activate_account=Моля активирайте Вашия профил
|
activate_account=Моля активирайте Вашия профил
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Zdravím, %s, máte nepotvrzenou e-mailovou adresu (<b>%s</
|
||||||
resend_mail=Klikněte zde pro odeslání aktivačního e-mailu
|
resend_mail=Klikněte zde pro odeslání aktivačního e-mailu
|
||||||
reset_password=Obnova vašeho hesla
|
reset_password=Obnova vašeho hesla
|
||||||
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
||||||
password_too_short=Délka hesla musí být minimálně %d znaků.
|
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
activate_account=Prosíme, aktivujte si váš účet
|
activate_account=Prosíme, aktivujte si váš účet
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,6 @@ send_reset_mail=E-Mail zum Passwort-zurücksetzen erneut verschicken
|
||||||
reset_password=Passwort zurücksetzen
|
reset_password=Passwort zurücksetzen
|
||||||
invalid_code=Dein Bestätigungs-Code ist ungültig oder abgelaufen.
|
invalid_code=Dein Bestätigungs-Code ist ungültig oder abgelaufen.
|
||||||
reset_password_helper=Passwort zurückzusetzen
|
reset_password_helper=Passwort zurückzusetzen
|
||||||
password_too_short=Das Passwort muss mindenstens %d Zeichen lang sein.
|
|
||||||
non_local_account=Benutzer, die nicht von Gitea verwaltet werden können ihre Passwörter nicht über das Web Interface ändern.
|
non_local_account=Benutzer, die nicht von Gitea verwaltet werden können ihre Passwörter nicht über das Web Interface ändern.
|
||||||
verify=Verifizieren
|
verify=Verifizieren
|
||||||
scratch_code=Einmalpasswort
|
scratch_code=Einmalpasswort
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ send_reset_mail = Click here to resend your password reset email
|
||||||
reset_password = Reset Your Password
|
reset_password = Reset Your Password
|
||||||
invalid_code = Your confirmation code is invalid or has expired.
|
invalid_code = Your confirmation code is invalid or has expired.
|
||||||
reset_password_helper = Click here to reset your password
|
reset_password_helper = Click here to reset your password
|
||||||
password_too_short = Password length cannot be less then %d.
|
password_too_short = Password length cannot be less than %d characters.
|
||||||
non_local_account = Non-local users can not update their password through the Gitea web interface.
|
non_local_account = Non-local users can not update their password through the Gitea web interface.
|
||||||
verify = Verify
|
verify = Verify
|
||||||
scratch_code = Scratch code
|
scratch_code = Scratch code
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,6 @@ email_not_associate=Esta dirección de correo electrónico no esta asociada a ni
|
||||||
send_reset_mail=Haz clic aquí para reenviar tu email de restauración de contraseña
|
send_reset_mail=Haz clic aquí para reenviar tu email de restauración de contraseña
|
||||||
reset_password=Restablecer su contraseña
|
reset_password=Restablecer su contraseña
|
||||||
reset_password_helper=Haga Clic aquí para restablecer su contraseña
|
reset_password_helper=Haga Clic aquí para restablecer su contraseña
|
||||||
password_too_short=La longitud de la contraseña no puede ser menor a %d.
|
|
||||||
verify=Verificar
|
verify=Verificar
|
||||||
twofa_scratch_used=Ya has utilizado el código. Has sido redirigido a la página de configuración de dos factores poder remover la inscripción del dispositivo o generar un nuevo código.
|
twofa_scratch_used=Ya has utilizado el código. Has sido redirigido a la página de configuración de dos factores poder remover la inscripción del dispositivo o generar un nuevo código.
|
||||||
twofa_scratch_token_incorrect=El código cero es incorrecto.
|
twofa_scratch_token_incorrect=El código cero es incorrecto.
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ has_unconfirmed_mail=Hei %s, sinulla on varmistamaton sähköposti osoite (<b>%s
|
||||||
resend_mail=Klikkaa tästä uudelleenlähettääksesi aktivointi sähköpostisi
|
resend_mail=Klikkaa tästä uudelleenlähettääksesi aktivointi sähköpostisi
|
||||||
reset_password=Nollaa salasanasi
|
reset_password=Nollaa salasanasi
|
||||||
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
|
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
|
||||||
password_too_short=Salasanan pituus ei voi olla vähemmän kuin %d merkkiä.
|
|
||||||
verify=Vahvista
|
verify=Vahvista
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=L'adresse e-mail n'est associée à aucun compte.
|
||||||
send_reset_mail=Cliquez ici pour renvoyer le mail de réinitialisation de votre mot de passe
|
send_reset_mail=Cliquez ici pour renvoyer le mail de réinitialisation de votre mot de passe
|
||||||
reset_password=Réinitialiser le mot de passe
|
reset_password=Réinitialiser le mot de passe
|
||||||
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
|
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
|
||||||
password_too_short=Le mot de passe doit contenir %d caractères minimum.
|
|
||||||
verify=Vérifier
|
verify=Vérifier
|
||||||
scratch_code=Code de secours
|
scratch_code=Code de secours
|
||||||
use_scratch_code=Utiliser un code de secours
|
use_scratch_code=Utiliser un code de secours
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ email_not_associate=Az email cím nincsen hozzárendelve egyetlen fiókhoz sem.
|
||||||
send_reset_mail=Kattints ide hogy újraküldd a jelszó visszaállító emailt
|
send_reset_mail=Kattints ide hogy újraküldd a jelszó visszaállító emailt
|
||||||
reset_password=Jelszó visszaállítása
|
reset_password=Jelszó visszaállítása
|
||||||
reset_password_helper=Kattintson ide, hogy visszaállítsa a jelszavát
|
reset_password_helper=Kattintson ide, hogy visszaállítsa a jelszavát
|
||||||
password_too_short=A jelszó nem lehet rövidebb, mint %d karakter.
|
|
||||||
verify=Ellenőrzés
|
verify=Ellenőrzés
|
||||||
scratch_code=Kaparós kód
|
scratch_code=Kaparós kód
|
||||||
use_scratch_code=Kaparós kód használata
|
use_scratch_code=Kaparós kód használata
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=Alamat surel tidak terhubung dengan akun apapun.
|
||||||
send_reset_mail=Klik di sini untuk mengirim ulang surel pengaturan ulang kata sandi
|
send_reset_mail=Klik di sini untuk mengirim ulang surel pengaturan ulang kata sandi
|
||||||
reset_password=Atur Ulang Kata Sandi Anda
|
reset_password=Atur Ulang Kata Sandi Anda
|
||||||
reset_password_helper=Klik di sini untuk mengatur ulang kata sandi anda
|
reset_password_helper=Klik di sini untuk mengatur ulang kata sandi anda
|
||||||
password_too_short=Panjang kata sandi tidak boleh kurang dari %d.
|
|
||||||
verify=Verifikasi
|
verify=Verifikasi
|
||||||
scratch_code=Kode coretan
|
scratch_code=Kode coretan
|
||||||
use_scratch_code=Gunakan kode coretan
|
use_scratch_code=Gunakan kode coretan
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=L'indirizzo email non è associato ad alcuna conta.
|
||||||
send_reset_mail=Clicca qui per inviare nuovamente la tua email di reimpostazione della password
|
send_reset_mail=Clicca qui per inviare nuovamente la tua email di reimpostazione della password
|
||||||
reset_password=Reimposta la tua Password
|
reset_password=Reimposta la tua Password
|
||||||
reset_password_helper=Clicca qui per reimpostare la password
|
reset_password_helper=Clicca qui per reimpostare la password
|
||||||
password_too_short=La lunghezza della password non può essere meno %d caratteri.
|
|
||||||
verify=Verifica
|
verify=Verifica
|
||||||
scratch_code=Codice Gratta e Vinci
|
scratch_code=Codice Gratta e Vinci
|
||||||
use_scratch_code=Utilizza un codice di zero
|
use_scratch_code=Utilizza un codice di zero
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ email_not_associate=このEメールアドレスは、どのアカウントに
|
||||||
send_reset_mail=パスワードリセットメールを再送するにはここをクリックしてください
|
send_reset_mail=パスワードリセットメールを再送するにはここをクリックしてください
|
||||||
reset_password=パスワードリセット
|
reset_password=パスワードリセット
|
||||||
reset_password_helper=パスワードをリセットするにはここをクリック
|
reset_password_helper=パスワードをリセットするにはここをクリック
|
||||||
password_too_short=%d文字未満のパスワードは設定できません。
|
|
||||||
verify=確認
|
verify=確認
|
||||||
scratch_code=スクラッチコード
|
scratch_code=スクラッチコード
|
||||||
use_scratch_code=スクラッチコードを使う
|
use_scratch_code=スクラッチコードを使う
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=이 이메일 주소로 등록된 계정이 없습니다.
|
||||||
send_reset_mail=여기를 눌러 비밀번호 초기화 메일을 재전송
|
send_reset_mail=여기를 눌러 비밀번호 초기화 메일을 재전송
|
||||||
reset_password=비밀번호 초기화
|
reset_password=비밀번호 초기화
|
||||||
reset_password_helper=이곳을 눌러 비밀번호를 재설정
|
reset_password_helper=이곳을 눌러 비밀번호를 재설정
|
||||||
password_too_short=비밀번호의 길이는 %d글자 미만일 수 없습니다.
|
|
||||||
verify=확인
|
verify=확인
|
||||||
scratch_code=스크래치 코드
|
scratch_code=스크래치 코드
|
||||||
use_scratch_code=스크래치 코드 사용
|
use_scratch_code=스크래치 코드 사용
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ active_your_account=Aktyvinkite savo paskyrą
|
||||||
resend_mail=Spauskite čia norėdami persiųsti aktyvacijos laišką
|
resend_mail=Spauskite čia norėdami persiųsti aktyvacijos laišką
|
||||||
reset_password=Atstatyti slaptažodį
|
reset_password=Atstatyti slaptažodį
|
||||||
reset_password_helper=Paspauskite čia norėdami pakeisti savo slaptažodį
|
reset_password_helper=Paspauskite čia norėdami pakeisti savo slaptažodį
|
||||||
password_too_short=Slaptažodis negali būti trumpesnis nei %d simbolių.
|
|
||||||
verify=Patikrinti
|
verify=Patikrinti
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ email_not_associate=Šī e-pasta adrese nav saistīta ar nevienu kontu.
|
||||||
send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu e-pastu
|
send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu e-pastu
|
||||||
reset_password=Atjaunot savu paroli
|
reset_password=Atjaunot savu paroli
|
||||||
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
||||||
password_too_short=Paroles garums nedrīkst būt mazāks par %d.
|
|
||||||
verify=Pārbaudīt
|
verify=Pārbaudīt
|
||||||
scratch_code=Vienreizējais kods
|
scratch_code=Vienreizējais kods
|
||||||
use_scratch_code=Izmantot vienreizējo kodu
|
use_scratch_code=Izmantot vienreizējo kodu
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ email_not_associate=Dit emailadres is niet gekoppeld aan een account.
|
||||||
send_reset_mail=Klik hier om de wachtwoord reset mail (nogmaals) te versturen
|
send_reset_mail=Klik hier om de wachtwoord reset mail (nogmaals) te versturen
|
||||||
reset_password=Reset uw wachtwoord
|
reset_password=Reset uw wachtwoord
|
||||||
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
||||||
password_too_short=De lengte van uw wachtwoord moet minimaal %d karakters zijn.
|
|
||||||
verify=Verifiëren
|
verify=Verifiëren
|
||||||
scratch_code=Eenmalige code
|
scratch_code=Eenmalige code
|
||||||
use_scratch_code=Gebruik een eenmalige code
|
use_scratch_code=Gebruik een eenmalige code
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=Adres e-mail nie jest powiązany z żadnym kontem.
|
||||||
send_reset_mail=Kliknij tutaj, aby ponownie wysłać e-mail resetowania hasła
|
send_reset_mail=Kliknij tutaj, aby ponownie wysłać e-mail resetowania hasła
|
||||||
reset_password=Resetowanie hasła
|
reset_password=Resetowanie hasła
|
||||||
reset_password_helper=Kliknij tutaj, aby zresetować hasło
|
reset_password_helper=Kliknij tutaj, aby zresetować hasło
|
||||||
password_too_short=Długość hasła nie może być mniejsza niż %d znaków.
|
|
||||||
verify=Potwierdź
|
verify=Potwierdź
|
||||||
scratch_code=Kod jednorazowy
|
scratch_code=Kod jednorazowy
|
||||||
use_scratch_code=Użyj kodu jednorazowego
|
use_scratch_code=Użyj kodu jednorazowego
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ send_reset_mail=Clique aqui para re-enviar seu e-mail de redefinição de senha
|
||||||
reset_password=Redefinir sua senha
|
reset_password=Redefinir sua senha
|
||||||
invalid_code=Seu código de confirmação é inválido ou expirou.
|
invalid_code=Seu código de confirmação é inválido ou expirou.
|
||||||
reset_password_helper=Clique aqui para redefinir sua senha
|
reset_password_helper=Clique aqui para redefinir sua senha
|
||||||
password_too_short=O comprimento da senha não pode ser menor que %d.
|
password_too_short=A senha deve ter %d ou mais caracteres.
|
||||||
non_local_account=Usuários não-locais não podem atualizar sua senha através da interface web do Gitea.
|
non_local_account=Usuários não-locais não podem atualizar sua senha através da interface web do Gitea.
|
||||||
verify=Verificar
|
verify=Verificar
|
||||||
scratch_code=Código de backup
|
scratch_code=Código de backup
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ send_reset_mail=Нажмите сюда, чтобы отправить пись
|
||||||
reset_password=Сброс пароля
|
reset_password=Сброс пароля
|
||||||
invalid_code=Этот код подтверждения недействителен или истек.
|
invalid_code=Этот код подтверждения недействителен или истек.
|
||||||
reset_password_helper=Нажмите здесь, чтобы сбросить свой пароль
|
reset_password_helper=Нажмите здесь, чтобы сбросить свой пароль
|
||||||
password_too_short=Длина пароля не менее %d символов.
|
password_too_short=Длина пароля не может быть меньше, чем %d символов.
|
||||||
non_local_account=Нелокальные аккаунты не могут изменить пароль через Gitea.
|
non_local_account=Нелокальные аккаунты не могут изменить пароль через Gitea.
|
||||||
verify=Проверить
|
verify=Проверить
|
||||||
scratch_code=Одноразовый пароль
|
scratch_code=Одноразовый пароль
|
||||||
|
|
@ -490,7 +490,7 @@ delete_account_desc=Вы уверены, что хотите навсегда у
|
||||||
[repo]
|
[repo]
|
||||||
owner=Владелец
|
owner=Владелец
|
||||||
repo_name=Имя репозитория
|
repo_name=Имя репозитория
|
||||||
repo_name_helper=Лучшие названия репозиториев состоят их коротких, легко запоминаемых и уникальных ключевых слов.
|
repo_name_helper=Лучшие названия репозиториев состоят из коротких, легко запоминаемых и уникальных ключевых слов.
|
||||||
visibility=Видимость
|
visibility=Видимость
|
||||||
visiblity_helper=Сделать репозиторий приватным
|
visiblity_helper=Сделать репозиторий приватным
|
||||||
visiblity_helper_forced=Администратор сайта настроил параметр видимости новых репозиториев. Репозиторий приватный по умолчанию.
|
visiblity_helper_forced=Администратор сайта настроил параметр видимости новых репозиториев. Репозиторий приватный по умолчанию.
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Здраво, %s! Имате непотврђену адр
|
||||||
resend_mail=Кликните овде да поново пошаљете писмо
|
resend_mail=Кликните овде да поново пошаљете писмо
|
||||||
reset_password=Ресет лозинке
|
reset_password=Ресет лозинке
|
||||||
reset_password_helper=Кликните овде да ресетујете вашу лозинку
|
reset_password_helper=Кликните овде да ресетујете вашу лозинку
|
||||||
password_too_short=Лозинка неможе бити краћа од %d карактера.
|
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
activate_account=Молимо вас активирајте ваш налог
|
activate_account=Молимо вас активирајте ваш налог
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=Denna e-postadress är inte knutet till något konto.
|
||||||
send_reset_mail=Klicka här för att skicka e-post med lösenordsåterställning igen
|
send_reset_mail=Klicka här för att skicka e-post med lösenordsåterställning igen
|
||||||
reset_password=Återställ ditt lösenord
|
reset_password=Återställ ditt lösenord
|
||||||
reset_password_helper=Klicka här för att återställa ditt lösenord
|
reset_password_helper=Klicka här för att återställa ditt lösenord
|
||||||
password_too_short=Lösenordet får ej vara kortare än %d tecken.
|
|
||||||
verify=Verifiera
|
verify=Verifiera
|
||||||
scratch_code=Skrapkod
|
scratch_code=Skrapkod
|
||||||
use_scratch_code=Använd en skrapkod
|
use_scratch_code=Använd en skrapkod
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=Bu e-posta adresi hiçbir hesap ile ilişkilendirilmemiştir
|
||||||
send_reset_mail=Parola sıfırlama e-postasını (yeniden) göndermek için buraya tıklayın
|
send_reset_mail=Parola sıfırlama e-postasını (yeniden) göndermek için buraya tıklayın
|
||||||
reset_password=Parolanızı Sıfırlayın
|
reset_password=Parolanızı Sıfırlayın
|
||||||
reset_password_helper=Parolanızı sıfırlamak için buraya tıklayın
|
reset_password_helper=Parolanızı sıfırlamak için buraya tıklayın
|
||||||
password_too_short=Parola uzunluğu %d karakterden az olamaz.
|
|
||||||
verify=Doğrula
|
verify=Doğrula
|
||||||
scratch_code=Çizgi kodu
|
scratch_code=Çizgi kodu
|
||||||
use_scratch_code=Bir çizgi kodu kullanınız
|
use_scratch_code=Bir çizgi kodu kullanınız
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,6 @@ send_reset_mail=Натисніть сюди, щоб відправити лис
|
||||||
reset_password=Скинути пароль
|
reset_password=Скинути пароль
|
||||||
invalid_code=Цей код підтвердження недійсний або закінчився.
|
invalid_code=Цей код підтвердження недійсний або закінчився.
|
||||||
reset_password_helper=Натисніть тут для скидання пароля
|
reset_password_helper=Натисніть тут для скидання пароля
|
||||||
password_too_short=Довжина пароля не може бути меншою за %d.
|
|
||||||
non_local_account=Нелокальні акаунти не можуть змінити пароль через Gitea.
|
non_local_account=Нелокальні акаунти не можуть змінити пароль через Gitea.
|
||||||
verify=Підтвердити
|
verify=Підтвердити
|
||||||
scratch_code=Одноразовий пароль
|
scratch_code=Одноразовий пароль
|
||||||
|
|
@ -266,6 +265,8 @@ email_been_used=Ця електронна адреса вже використо
|
||||||
openid_been_used=OpenID адреса '%s' вже використовується.
|
openid_been_used=OpenID адреса '%s' вже використовується.
|
||||||
username_password_incorrect=Неправильне ім'я користувача або пароль.
|
username_password_incorrect=Неправильне ім'я користувача або пароль.
|
||||||
enterred_invalid_repo_name=Невірно введено ім'я репозиторію.
|
enterred_invalid_repo_name=Невірно введено ім'я репозиторію.
|
||||||
|
enterred_invalid_owner_name=Ім'я нового власника не є дійсним.
|
||||||
|
enterred_invalid_password=Введений вами пароль некоректний.
|
||||||
user_not_exist=Даний користувач не існує.
|
user_not_exist=Даний користувач не існує.
|
||||||
cannot_add_org_to_team=Організацію неможливо додати як учасника команди.
|
cannot_add_org_to_team=Організацію неможливо додати як учасника команди.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,6 @@ send_reset_mail=单击此处(重新)发送您的密码重置邮件
|
||||||
reset_password=重置密码
|
reset_password=重置密码
|
||||||
invalid_code=此确认密钥无效或已过期。
|
invalid_code=此确认密钥无效或已过期。
|
||||||
reset_password_helper=单击此处重置密码
|
reset_password_helper=单击此处重置密码
|
||||||
password_too_short=密码长度不能少于 %d 位!
|
|
||||||
non_local_account=非本地帐户不能通过 Gitea 的 web 界面更改密码。
|
non_local_account=非本地帐户不能通过 Gitea 的 web 界面更改密码。
|
||||||
verify=验证
|
verify=验证
|
||||||
scratch_code=验证口令
|
scratch_code=验证口令
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,6 @@ email_not_associate=此電子郵件地址未與任何帳戶連結
|
||||||
send_reset_mail=點選此處重發您的密碼重製郵件
|
send_reset_mail=點選此處重發您的密碼重製郵件
|
||||||
reset_password=重置密碼
|
reset_password=重置密碼
|
||||||
reset_password_helper=單擊此處重置密碼
|
reset_password_helper=單擊此處重置密碼
|
||||||
password_too_short=密碼長度不能少於 %d 位!
|
|
||||||
verify=驗證
|
verify=驗證
|
||||||
scratch_code=備用碼
|
scratch_code=備用碼
|
||||||
use_scratch_code=使用備用碼
|
use_scratch_code=使用備用碼
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ email_not_associate=此電子郵件地址未與任何帳戶連結
|
||||||
send_reset_mail=點選此處重發您的密碼重製郵件
|
send_reset_mail=點選此處重發您的密碼重製郵件
|
||||||
reset_password=重置密碼
|
reset_password=重置密碼
|
||||||
reset_password_helper=單擊此處重置密碼
|
reset_password_helper=單擊此處重置密碼
|
||||||
password_too_short=密碼長度不能少於 %d 位!
|
|
||||||
verify=驗證
|
verify=驗證
|
||||||
scratch_code=備用碼
|
scratch_code=備用碼
|
||||||
use_scratch_code=使用備用碼
|
use_scratch_code=使用備用碼
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,10 @@
|
||||||
line-height: 1.6 !important;
|
line-height: 1.6 !important;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
||||||
|
&.ui.segment {
|
||||||
|
padding: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
&.file-view {
|
&.file-view {
|
||||||
padding: 2em 2em 2em !important;
|
padding: 2em 2em 2em !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
476
public/swagger.v1.json
vendored
476
public/swagger.v1.json
vendored
|
|
@ -321,9 +321,13 @@
|
||||||
"operationId": "renderMarkdownRaw",
|
"operationId": "renderMarkdownRaw",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"description": "Request body to render",
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"in": "body"
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
@ -448,6 +452,15 @@
|
||||||
],
|
],
|
||||||
"summary": "List an organization's webhooks",
|
"summary": "List an organization's webhooks",
|
||||||
"operationId": "orgListHooks",
|
"operationId": "orgListHooks",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the organization",
|
||||||
|
"name": "org",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/HookList"
|
"$ref": "#/responses/HookList"
|
||||||
|
|
@ -468,6 +481,15 @@
|
||||||
],
|
],
|
||||||
"summary": "Create a hook",
|
"summary": "Create a hook",
|
||||||
"operationId": "orgCreateHook",
|
"operationId": "orgCreateHook",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the organization",
|
||||||
|
"name": "org",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"201": {
|
"201": {
|
||||||
"$ref": "#/responses/Hook"
|
"$ref": "#/responses/Hook"
|
||||||
|
|
@ -485,6 +507,22 @@
|
||||||
],
|
],
|
||||||
"summary": "Get a hook",
|
"summary": "Get a hook",
|
||||||
"operationId": "orgGetHook",
|
"operationId": "orgGetHook",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the organization",
|
||||||
|
"name": "org",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the hook to get",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/Hook"
|
"$ref": "#/responses/Hook"
|
||||||
|
|
@ -500,6 +538,22 @@
|
||||||
],
|
],
|
||||||
"summary": "Delete a hook",
|
"summary": "Delete a hook",
|
||||||
"operationId": "orgDeleteHook",
|
"operationId": "orgDeleteHook",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the organization",
|
||||||
|
"name": "org",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the hook to delete",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"204": {
|
"204": {
|
||||||
"$ref": "#/responses/empty"
|
"$ref": "#/responses/empty"
|
||||||
|
|
@ -518,6 +572,22 @@
|
||||||
],
|
],
|
||||||
"summary": "Update a hook",
|
"summary": "Update a hook",
|
||||||
"operationId": "orgEditHook",
|
"operationId": "orgEditHook",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the organization",
|
||||||
|
"name": "org",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the hook to update",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/Hook"
|
"$ref": "#/responses/Hook"
|
||||||
|
|
@ -994,7 +1064,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repos/{owner}/{repo}/archive/{filepath}": {
|
"/repos/{owner}/{repo}/archive/{archive}": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -1530,6 +1600,47 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"delete": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"repository"
|
||||||
|
],
|
||||||
|
"summary": "Delete a hook in a repository",
|
||||||
|
"operationId": "repoDeleteHook",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "owner of the repo",
|
||||||
|
"name": "owner",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the repo",
|
||||||
|
"name": "repo",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the hook to delete",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"$ref": "#/responses/empty"
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"$ref": "#/responses/notFound"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"patch": {
|
"patch": {
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -1554,6 +1665,13 @@
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "index of the hook",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
|
|
@ -1825,6 +1943,100 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/repos/{owner}/{repo}/issues/{id}/times": {
|
||||||
|
"get": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"issue"
|
||||||
|
],
|
||||||
|
"summary": "List an issue's tracked times",
|
||||||
|
"operationId": "issueTrackedTimes",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "owner of the repo",
|
||||||
|
"name": "owner",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the repo",
|
||||||
|
"name": "repo",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "index of the issue",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/TrackedTimeList"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"issue"
|
||||||
|
],
|
||||||
|
"summary": "Add a tracked time to a issue",
|
||||||
|
"operationId": "issueAddTime",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "owner of the repo",
|
||||||
|
"name": "owner",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the repo",
|
||||||
|
"name": "repo",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "index of the issue to add tracked time to",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "body",
|
||||||
|
"in": "body",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/AddTimeOption"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"$ref": "#/responses/TrackedTime"
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"$ref": "#/responses/error"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"$ref": "#/responses/error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/repos/{owner}/{repo}/issues/{index}": {
|
"/repos/{owner}/{repo}/issues/{index}": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
|
|
@ -1941,7 +2153,7 @@
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "index of the issue",
|
"description": "index of the issue",
|
||||||
"name": "id",
|
"name": "index",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
|
@ -1988,7 +2200,7 @@
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "index of the issue",
|
"description": "index of the issue",
|
||||||
"name": "id",
|
"name": "index",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
|
@ -2332,100 +2544,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repos/{owner}/{repo}/issues/{index}/times": {
|
|
||||||
"get": {
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"issue"
|
|
||||||
],
|
|
||||||
"summary": "List an issue's tracked times",
|
|
||||||
"operationId": "issueTrackedTimes",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "owner of the repo",
|
|
||||||
"name": "owner",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "name of the repo",
|
|
||||||
"name": "repo",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "index of the issue",
|
|
||||||
"name": "repo",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"$ref": "#/responses/TrackedTimeList"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"post": {
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"issue"
|
|
||||||
],
|
|
||||||
"summary": "Add a tracked time to a issue",
|
|
||||||
"operationId": "issueAddTime",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "owner of the repo",
|
|
||||||
"name": "owner",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "name of the repo",
|
|
||||||
"name": "repo",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "index of the issue to add tracked time to",
|
|
||||||
"name": "id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "body",
|
|
||||||
"in": "body",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/AddTimeOption"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"$ref": "#/responses/TrackedTime"
|
|
||||||
},
|
|
||||||
"400": {
|
|
||||||
"$ref": "#/responses/error"
|
|
||||||
},
|
|
||||||
"403": {
|
|
||||||
"$ref": "#/responses/error"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/repos/{owner}/{repo}/keys": {
|
"/repos/{owner}/{repo}/keys": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
|
|
@ -2781,7 +2899,7 @@
|
||||||
"issue"
|
"issue"
|
||||||
],
|
],
|
||||||
"summary": "Get all of a repository's milestones",
|
"summary": "Get all of a repository's milestones",
|
||||||
"operationId": "issueGetMilestones",
|
"operationId": "issueGetMilestonesList",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|
@ -2796,13 +2914,6 @@
|
||||||
"name": "repo",
|
"name": "repo",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "id of the milestone to get",
|
|
||||||
"name": "id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
@ -2863,6 +2974,29 @@
|
||||||
],
|
],
|
||||||
"summary": "Get a milestone",
|
"summary": "Get a milestone",
|
||||||
"operationId": "issueGetMilestone",
|
"operationId": "issueGetMilestone",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "owner of the repo",
|
||||||
|
"name": "owner",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "name of the repo",
|
||||||
|
"name": "repo",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the milestone",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/Milestone"
|
"$ref": "#/responses/Milestone"
|
||||||
|
|
@ -2893,7 +3027,7 @@
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "id of the milestone to delete",
|
"description": "id of the milestone to delete",
|
||||||
"name": "body",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
|
|
@ -2931,6 +3065,13 @@
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "id of the milestone",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
|
|
@ -3979,7 +4120,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repos/{owner}/{repo}/times/{tracker}": {
|
"/repos/{owner}/{repo}/times/{user}": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
@ -4019,49 +4160,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repos/{user}/{repo}/hooks/{id}": {
|
|
||||||
"delete": {
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"repository"
|
|
||||||
],
|
|
||||||
"summary": "Delete a hook in a repository",
|
|
||||||
"operationId": "repoDeleteHook",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "owner of the repo",
|
|
||||||
"name": "owner",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "name of the repo",
|
|
||||||
"name": "repo",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "id of the hook to delete",
|
|
||||||
"name": "id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"204": {
|
|
||||||
"$ref": "#/responses/empty"
|
|
||||||
},
|
|
||||||
"404": {
|
|
||||||
"$ref": "#/responses/notFound"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/repositories/{id}": {
|
"/repositories/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
|
|
@ -4238,7 +4336,7 @@
|
||||||
"organization"
|
"organization"
|
||||||
],
|
],
|
||||||
"summary": "Remove a team member",
|
"summary": "Remove a team member",
|
||||||
"operationId": "orgAddTeamMember",
|
"operationId": "orgRemoveTeamMember",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|
@ -4297,7 +4395,7 @@
|
||||||
"organization"
|
"organization"
|
||||||
],
|
],
|
||||||
"summary": "Add a repository to a team",
|
"summary": "Add a repository to a team",
|
||||||
"operationId": "orgAddTeamMember",
|
"operationId": "orgAddTeamRepository",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|
@ -4336,7 +4434,7 @@
|
||||||
"organization"
|
"organization"
|
||||||
],
|
],
|
||||||
"summary": "Remove a repository from a team",
|
"summary": "Remove a repository from a team",
|
||||||
"operationId": "orgAddTeamMember",
|
"operationId": "orgRemoveTeamRepository",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|
@ -4379,10 +4477,10 @@
|
||||||
"operationId": "topicSearch",
|
"operationId": "topicSearch",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "string",
|
||||||
"description": "id of the repo to get",
|
"description": "keywords to search",
|
||||||
"name": "keyword",
|
"name": "q",
|
||||||
"in": "path",
|
"in": "query",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -4509,7 +4607,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user/following/{followee}": {
|
"/user/following/{username}": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"user"
|
"user"
|
||||||
|
|
@ -4520,7 +4618,7 @@
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "username of followed user",
|
"description": "username of followed user",
|
||||||
"name": "followee",
|
"name": "username",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
|
|
@ -4533,9 +4631,7 @@
|
||||||
"$ref": "#/responses/notFound"
|
"$ref": "#/responses/notFound"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
"/user/following/{username}": {
|
|
||||||
"put": {
|
"put": {
|
||||||
"tags": [
|
"tags": [
|
||||||
"user"
|
"user"
|
||||||
|
|
@ -5301,6 +5397,15 @@
|
||||||
],
|
],
|
||||||
"summary": "List the authenticated user's access tokens",
|
"summary": "List the authenticated user's access tokens",
|
||||||
"operationId": "userGetTokens",
|
"operationId": "userGetTokens",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "username of user",
|
||||||
|
"name": "username",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/AccessTokenList"
|
"$ref": "#/responses/AccessTokenList"
|
||||||
|
|
@ -5323,8 +5428,10 @@
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "Name",
|
"x-go-name": "Name",
|
||||||
"name": "name",
|
"description": "username of user",
|
||||||
"in": "query"
|
"name": "username",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
@ -7612,9 +7719,6 @@
|
||||||
"description": "SearchResults",
|
"description": "SearchResults",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/SearchResults"
|
"$ref": "#/definitions/SearchResults"
|
||||||
},
|
|
||||||
"headers": {
|
|
||||||
"body": {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ServerVersion": {
|
"ServerVersion": {
|
||||||
|
|
@ -7721,40 +7825,6 @@
|
||||||
"description": "parameterBodies",
|
"description": "parameterBodies",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/EditAttachmentOptions"
|
"$ref": "#/definitions/EditAttachmentOptions"
|
||||||
},
|
|
||||||
"headers": {
|
|
||||||
"AddCollaboratorOption": {},
|
|
||||||
"AddTimeOption": {},
|
|
||||||
"CreateEmailOption": {},
|
|
||||||
"CreateForkOption": {},
|
|
||||||
"CreateHookOption": {},
|
|
||||||
"CreateIssueCommentOption": {},
|
|
||||||
"CreateIssueOption": {},
|
|
||||||
"CreateKeyOption": {},
|
|
||||||
"CreateLabelOption": {},
|
|
||||||
"CreateMilestoneOption": {},
|
|
||||||
"CreateOrgOption": {},
|
|
||||||
"CreatePullRequestOption": {},
|
|
||||||
"CreateReleaseOption": {},
|
|
||||||
"CreateRepoOption": {},
|
|
||||||
"CreateStatusOption": {},
|
|
||||||
"CreateTeamOption": {},
|
|
||||||
"CreateUserOption": {},
|
|
||||||
"DeleteEmailOption": {},
|
|
||||||
"EditAttachmentOptions": {},
|
|
||||||
"EditHookOption": {},
|
|
||||||
"EditIssueCommentOption": {},
|
|
||||||
"EditIssueOption": {},
|
|
||||||
"EditLabelOption": {},
|
|
||||||
"EditMilestoneOption": {},
|
|
||||||
"EditOrgOption": {},
|
|
||||||
"EditPullRequestOption": {},
|
|
||||||
"EditReleaseOption": {},
|
|
||||||
"EditTeamOption": {},
|
|
||||||
"EditUserOption": {},
|
|
||||||
"IssueLabelsOption": {},
|
|
||||||
"MarkdownOption": {},
|
|
||||||
"MigrateRepoForm": {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redirect": {
|
"redirect": {
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,12 @@ func MarkdownRaw(ctx *context.APIContext) {
|
||||||
// ---
|
// ---
|
||||||
// summary: Render raw markdown as HTML
|
// summary: Render raw markdown as HTML
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: body
|
// - name: body
|
||||||
// in: body
|
// in: body
|
||||||
// type: string
|
// description: Request body to render
|
||||||
|
// required: true
|
||||||
|
// schema:
|
||||||
|
// type: string
|
||||||
// consumes:
|
// consumes:
|
||||||
// - text/plain
|
// - text/plain
|
||||||
// produces:
|
// produces:
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,12 @@ func ListHooks(ctx *context.APIContext) {
|
||||||
// summary: List an organization's webhooks
|
// summary: List an organization's webhooks
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: org
|
||||||
|
// in: path
|
||||||
|
// description: name of the organization
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/HookList"
|
// "$ref": "#/responses/HookList"
|
||||||
|
|
@ -43,6 +49,17 @@ func GetHook(ctx *context.APIContext) {
|
||||||
// summary: Get a hook
|
// summary: Get a hook
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: org
|
||||||
|
// in: path
|
||||||
|
// description: name of the organization
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
|
// - name: id
|
||||||
|
// in: path
|
||||||
|
// description: id of the hook to get
|
||||||
|
// type: integer
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/Hook"
|
// "$ref": "#/responses/Hook"
|
||||||
|
|
@ -64,9 +81,17 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
|
||||||
// - application/json
|
// - application/json
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: org
|
||||||
|
// in: path
|
||||||
|
// description: name of the organization
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "201":
|
// "201":
|
||||||
// "$ref": "#/responses/Hook"
|
// "$ref": "#/responses/Hook"
|
||||||
|
|
||||||
|
//TODO in body params
|
||||||
if !utils.CheckCreateHookOption(ctx, &form) {
|
if !utils.CheckCreateHookOption(ctx, &form) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -82,9 +107,22 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
||||||
// - application/json
|
// - application/json
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: org
|
||||||
|
// in: path
|
||||||
|
// description: name of the organization
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
|
// - name: id
|
||||||
|
// in: path
|
||||||
|
// description: id of the hook to update
|
||||||
|
// type: integer
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/Hook"
|
// "$ref": "#/responses/Hook"
|
||||||
|
|
||||||
|
//TODO in body params
|
||||||
hookID := ctx.ParamsInt64(":id")
|
hookID := ctx.ParamsInt64(":id")
|
||||||
utils.EditOrgHook(ctx, &form, hookID)
|
utils.EditOrgHook(ctx, &form, hookID)
|
||||||
}
|
}
|
||||||
|
|
@ -96,6 +134,17 @@ func DeleteHook(ctx *context.APIContext) {
|
||||||
// summary: Delete a hook
|
// summary: Delete a hook
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: org
|
||||||
|
// in: path
|
||||||
|
// description: name of the organization
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
|
// - name: id
|
||||||
|
// in: path
|
||||||
|
// description: id of the hook to delete
|
||||||
|
// type: integer
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "204":
|
// "204":
|
||||||
// "$ref": "#/responses/empty"
|
// "$ref": "#/responses/empty"
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ func AddTeamMember(ctx *context.APIContext) {
|
||||||
|
|
||||||
// RemoveTeamMember api for remove one member from a team
|
// RemoveTeamMember api for remove one member from a team
|
||||||
func RemoveTeamMember(ctx *context.APIContext) {
|
func RemoveTeamMember(ctx *context.APIContext) {
|
||||||
// swagger:operation DELETE /teams/{id}/members/{username} organization orgAddTeamMember
|
// swagger:operation DELETE /teams/{id}/members/{username} organization orgRemoveTeamMember
|
||||||
// ---
|
// ---
|
||||||
// summary: Remove a team member
|
// summary: Remove a team member
|
||||||
// produces:
|
// produces:
|
||||||
|
|
@ -306,7 +306,7 @@ func getRepositoryByParams(ctx *context.APIContext) *models.Repository {
|
||||||
|
|
||||||
// AddTeamRepository api for adding a repository to a team
|
// AddTeamRepository api for adding a repository to a team
|
||||||
func AddTeamRepository(ctx *context.APIContext) {
|
func AddTeamRepository(ctx *context.APIContext) {
|
||||||
// swagger:operation PUT /teams/{id}/repos/{org}/{repo} organization orgAddTeamMember
|
// swagger:operation PUT /teams/{id}/repos/{org}/{repo} organization orgAddTeamRepository
|
||||||
// ---
|
// ---
|
||||||
// summary: Add a repository to a team
|
// summary: Add a repository to a team
|
||||||
// produces:
|
// produces:
|
||||||
|
|
@ -350,7 +350,7 @@ func AddTeamRepository(ctx *context.APIContext) {
|
||||||
|
|
||||||
// RemoveTeamRepository api for removing a repository from a team
|
// RemoveTeamRepository api for removing a repository from a team
|
||||||
func RemoveTeamRepository(ctx *context.APIContext) {
|
func RemoveTeamRepository(ctx *context.APIContext) {
|
||||||
// swagger:operation DELETE /teams/{id}/repos/{org}/{repo} organization orgAddTeamMember
|
// swagger:operation DELETE /teams/{id}/repos/{org}/{repo} organization orgRemoveTeamRepository
|
||||||
// ---
|
// ---
|
||||||
// summary: Remove a repository from a team
|
// summary: Remove a repository from a team
|
||||||
// description: This does not delete the repository, it only removes the
|
// description: This does not delete the repository, it only removes the
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ func GetRawFile(ctx *context.APIContext) {
|
||||||
|
|
||||||
// GetArchive get archive of a repository
|
// GetArchive get archive of a repository
|
||||||
func GetArchive(ctx *context.APIContext) {
|
func GetArchive(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/archive/{filepath} repository repoGetArchive
|
// swagger:operation GET /repos/{owner}/{repo}/archive/{archive} repository repoGetArchive
|
||||||
// ---
|
// ---
|
||||||
// summary: Get an archive of a repository
|
// summary: Get an archive of a repository
|
||||||
// produces:
|
// produces:
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,11 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
|
// - name: id
|
||||||
|
// in: path
|
||||||
|
// description: index of the hook
|
||||||
|
// type: integer
|
||||||
|
// required: true
|
||||||
// - name: body
|
// - name: body
|
||||||
// in: body
|
// in: body
|
||||||
// schema:
|
// schema:
|
||||||
|
|
@ -202,7 +207,7 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
||||||
|
|
||||||
// DeleteHook delete a hook of a repository
|
// DeleteHook delete a hook of a repository
|
||||||
func DeleteHook(ctx *context.APIContext) {
|
func DeleteHook(ctx *context.APIContext) {
|
||||||
// swagger:operation DELETE /repos/{user}/{repo}/hooks/{id} repository repoDeleteHook
|
// swagger:operation DELETE /repos/{owner}/{repo}/hooks/{id} repository repoDeleteHook
|
||||||
// ---
|
// ---
|
||||||
// summary: Delete a hook in a repository
|
// summary: Delete a hook in a repository
|
||||||
// produces:
|
// produces:
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ func ListIssueComments(ctx *context.APIContext) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: id
|
// - name: index
|
||||||
// in: path
|
// in: path
|
||||||
// description: index of the issue
|
// description: index of the issue
|
||||||
// type: integer
|
// type: integer
|
||||||
|
|
@ -139,7 +139,7 @@ func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOpti
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: id
|
// - name: index
|
||||||
// in: path
|
// in: path
|
||||||
// description: index of the issue
|
// description: index of the issue
|
||||||
// type: integer
|
// type: integer
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ func trackedTimesToAPIFormat(trackedTimes []*models.TrackedTime) []*api.TrackedT
|
||||||
|
|
||||||
// ListTrackedTimes list all the tracked times of an issue
|
// ListTrackedTimes list all the tracked times of an issue
|
||||||
func ListTrackedTimes(ctx *context.APIContext) {
|
func ListTrackedTimes(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/times issue issueTrackedTimes
|
// swagger:operation GET /repos/{owner}/{repo}/issues/{id}/times issue issueTrackedTimes
|
||||||
// ---
|
// ---
|
||||||
// summary: List an issue's tracked times
|
// summary: List an issue's tracked times
|
||||||
// produces:
|
// produces:
|
||||||
|
|
@ -37,7 +37,7 @@ func ListTrackedTimes(ctx *context.APIContext) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: repo
|
// - name: id
|
||||||
// in: path
|
// in: path
|
||||||
// description: index of the issue
|
// description: index of the issue
|
||||||
// type: integer
|
// type: integer
|
||||||
|
|
@ -70,7 +70,7 @@ func ListTrackedTimes(ctx *context.APIContext) {
|
||||||
|
|
||||||
// AddTime adds time manual to the given issue
|
// AddTime adds time manual to the given issue
|
||||||
func AddTime(ctx *context.APIContext, form api.AddTimeOption) {
|
func AddTime(ctx *context.APIContext, form api.AddTimeOption) {
|
||||||
// swagger:operation Post /repos/{owner}/{repo}/issues/{index}/times issue issueAddTime
|
// swagger:operation Post /repos/{owner}/{repo}/issues/{id}/times issue issueAddTime
|
||||||
// ---
|
// ---
|
||||||
// summary: Add a tracked time to a issue
|
// summary: Add a tracked time to a issue
|
||||||
// consumes:
|
// consumes:
|
||||||
|
|
@ -132,7 +132,7 @@ func AddTime(ctx *context.APIContext, form api.AddTimeOption) {
|
||||||
|
|
||||||
// ListTrackedTimesByUser lists all tracked times of the user
|
// ListTrackedTimesByUser lists all tracked times of the user
|
||||||
func ListTrackedTimesByUser(ctx *context.APIContext) {
|
func ListTrackedTimesByUser(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/times/{tracker} user userTrackedTimes
|
// swagger:operation GET /repos/{owner}/{repo}/times/{user} user userTrackedTimes
|
||||||
// ---
|
// ---
|
||||||
// summary: List a user's tracked times in a repo
|
// summary: List a user's tracked times in a repo
|
||||||
// produces:
|
// produces:
|
||||||
|
|
|
||||||
|
|
@ -16,30 +16,7 @@ import (
|
||||||
|
|
||||||
// ListMilestones list all the milestones for a repository
|
// ListMilestones list all the milestones for a repository
|
||||||
func ListMilestones(ctx *context.APIContext) {
|
func ListMilestones(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/milestones/{id} issue issueGetMilestone
|
// swagger:operation GET /repos/{owner}/{repo}/milestones issue issueGetMilestonesList
|
||||||
// ---
|
|
||||||
// summary: Get a milestone
|
|
||||||
// produces:
|
|
||||||
// - application/json
|
|
||||||
// responses:
|
|
||||||
// "200":
|
|
||||||
// "$ref": "#/responses/Milestone"
|
|
||||||
milestones, err := models.GetMilestonesByRepoID(ctx.Repo.Repository.ID)
|
|
||||||
if err != nil {
|
|
||||||
ctx.Error(500, "GetMilestonesByRepoID", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
apiMilestones := make([]*api.Milestone, len(milestones))
|
|
||||||
for i := range milestones {
|
|
||||||
apiMilestones[i] = milestones[i].APIFormat()
|
|
||||||
}
|
|
||||||
ctx.JSON(200, &apiMilestones)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetMilestone get a milestone for a repository
|
|
||||||
func GetMilestone(ctx *context.APIContext) {
|
|
||||||
// swagger:operation GET /repos/{owner}/{repo}/milestones issue issueGetMilestones
|
|
||||||
// ---
|
// ---
|
||||||
// summary: Get all of a repository's milestones
|
// summary: Get all of a repository's milestones
|
||||||
// produces:
|
// produces:
|
||||||
|
|
@ -55,6 +32,29 @@ func GetMilestone(ctx *context.APIContext) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
|
// responses:
|
||||||
|
// "200":
|
||||||
|
// "$ref": "#/responses/MilestoneList"
|
||||||
|
milestones, err := models.GetMilestonesByRepoID(ctx.Repo.Repository.ID)
|
||||||
|
if err != nil {
|
||||||
|
ctx.Error(500, "GetMilestonesByRepoID", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
apiMilestones := make([]*api.Milestone, len(milestones))
|
||||||
|
for i := range milestones {
|
||||||
|
apiMilestones[i] = milestones[i].APIFormat()
|
||||||
|
}
|
||||||
|
ctx.JSON(200, &apiMilestones)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMilestone get a milestone for a repository
|
||||||
|
func GetMilestone(ctx *context.APIContext) {
|
||||||
|
// swagger:operation GET /repos/{owner}/{repo}/milestones/{id} issue issueGetMilestone
|
||||||
|
// ---
|
||||||
|
// summary: Get a milestone
|
||||||
|
// produces:
|
||||||
|
// - application/json
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: owner
|
// - name: owner
|
||||||
// in: path
|
// in: path
|
||||||
|
|
@ -68,12 +68,12 @@ func GetMilestone(ctx *context.APIContext) {
|
||||||
// required: true
|
// required: true
|
||||||
// - name: id
|
// - name: id
|
||||||
// in: path
|
// in: path
|
||||||
// description: id of the milestone to get
|
// description: id of the milestone
|
||||||
// type: integer
|
// type: integer
|
||||||
// required: true
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/MilestoneList"
|
// "$ref": "#/responses/Milestone"
|
||||||
milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if models.IsErrMilestoneNotExist(err) {
|
if models.IsErrMilestoneNotExist(err) {
|
||||||
|
|
@ -152,6 +152,11 @@ func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
|
// - name: id
|
||||||
|
// in: path
|
||||||
|
// description: id of the milestone
|
||||||
|
// type: integer
|
||||||
|
// required: true
|
||||||
// - name: body
|
// - name: body
|
||||||
// in: body
|
// in: body
|
||||||
// schema:
|
// schema:
|
||||||
|
|
@ -202,7 +207,7 @@ func DeleteMilestone(ctx *context.APIContext) {
|
||||||
// description: name of the repo
|
// description: name of the repo
|
||||||
// type: string
|
// type: string
|
||||||
// required: true
|
// required: true
|
||||||
// - name: body
|
// - name: id
|
||||||
// in: path
|
// in: path
|
||||||
// description: id of the milestone to delete
|
// description: id of the milestone to delete
|
||||||
// type: integer
|
// type: integer
|
||||||
|
|
|
||||||
|
|
@ -508,13 +508,13 @@ func TopicSearch(ctx *context.Context) {
|
||||||
// ---
|
// ---
|
||||||
// summary: search topics via keyword
|
// summary: search topics via keyword
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: keyword
|
// - name: q
|
||||||
// in: path
|
// in: query
|
||||||
// description: id of the repo to get
|
// description: keywords to search
|
||||||
// type: integer
|
// required: true
|
||||||
// required: true
|
// type: string
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/Repository"
|
// "$ref": "#/responses/Repository"
|
||||||
|
|
|
||||||
|
|
@ -15,55 +15,87 @@ import (
|
||||||
// parameterBodies
|
// parameterBodies
|
||||||
// swagger:response parameterBodies
|
// swagger:response parameterBodies
|
||||||
type swaggerParameterBodies struct {
|
type swaggerParameterBodies struct {
|
||||||
|
// in:body
|
||||||
AddCollaboratorOption api.AddCollaboratorOption
|
AddCollaboratorOption api.AddCollaboratorOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateEmailOption api.CreateEmailOption
|
CreateEmailOption api.CreateEmailOption
|
||||||
|
// in:body
|
||||||
DeleteEmailOption api.DeleteEmailOption
|
DeleteEmailOption api.DeleteEmailOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateHookOption api.CreateHookOption
|
CreateHookOption api.CreateHookOption
|
||||||
EditHookOption api.EditHookOption
|
// in:body
|
||||||
|
EditHookOption api.EditHookOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateIssueOption api.CreateIssueOption
|
CreateIssueOption api.CreateIssueOption
|
||||||
EditIssueOption api.EditIssueOption
|
// in:body
|
||||||
|
EditIssueOption api.EditIssueOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateIssueCommentOption api.CreateIssueCommentOption
|
CreateIssueCommentOption api.CreateIssueCommentOption
|
||||||
EditIssueCommentOption api.EditIssueCommentOption
|
// in:body
|
||||||
|
EditIssueCommentOption api.EditIssueCommentOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
IssueLabelsOption api.IssueLabelsOption
|
IssueLabelsOption api.IssueLabelsOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateKeyOption api.CreateKeyOption
|
CreateKeyOption api.CreateKeyOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateLabelOption api.CreateLabelOption
|
CreateLabelOption api.CreateLabelOption
|
||||||
EditLabelOption api.EditLabelOption
|
// in:body
|
||||||
|
EditLabelOption api.EditLabelOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
MarkdownOption api.MarkdownOption
|
MarkdownOption api.MarkdownOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateMilestoneOption api.CreateMilestoneOption
|
CreateMilestoneOption api.CreateMilestoneOption
|
||||||
EditMilestoneOption api.EditMilestoneOption
|
// in:body
|
||||||
|
EditMilestoneOption api.EditMilestoneOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateOrgOption api.CreateOrgOption
|
CreateOrgOption api.CreateOrgOption
|
||||||
EditOrgOption api.EditOrgOption
|
// in:body
|
||||||
|
EditOrgOption api.EditOrgOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreatePullRequestOption api.CreatePullRequestOption
|
CreatePullRequestOption api.CreatePullRequestOption
|
||||||
EditPullRequestOption api.EditPullRequestOption
|
// in:body
|
||||||
|
EditPullRequestOption api.EditPullRequestOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateReleaseOption api.CreateReleaseOption
|
CreateReleaseOption api.CreateReleaseOption
|
||||||
EditReleaseOption api.EditReleaseOption
|
// in:body
|
||||||
|
EditReleaseOption api.EditReleaseOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateRepoOption api.CreateRepoOption
|
CreateRepoOption api.CreateRepoOption
|
||||||
|
// in:body
|
||||||
CreateForkOption api.CreateForkOption
|
CreateForkOption api.CreateForkOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateStatusOption api.CreateStatusOption
|
CreateStatusOption api.CreateStatusOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateTeamOption api.CreateTeamOption
|
CreateTeamOption api.CreateTeamOption
|
||||||
EditTeamOption api.EditTeamOption
|
// in:body
|
||||||
|
EditTeamOption api.EditTeamOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
AddTimeOption api.AddTimeOption
|
AddTimeOption api.AddTimeOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
CreateUserOption api.CreateUserOption
|
CreateUserOption api.CreateUserOption
|
||||||
EditUserOption api.EditUserOption
|
// in:body
|
||||||
|
EditUserOption api.EditUserOption
|
||||||
|
|
||||||
|
// in:body
|
||||||
MigrateRepoForm auth.MigrateRepoForm
|
MigrateRepoForm auth.MigrateRepoForm
|
||||||
|
|
||||||
|
// in:body
|
||||||
EditAttachmentOptions api.EditAttachmentOptions
|
EditAttachmentOptions api.EditAttachmentOptions
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ type swaggerResponseWatchInfo struct {
|
||||||
// SearchResults
|
// SearchResults
|
||||||
// swagger:response SearchResults
|
// swagger:response SearchResults
|
||||||
type swaggerResponseSearchResults struct {
|
type swaggerResponseSearchResults struct {
|
||||||
|
// in:body
|
||||||
Body api.SearchResults `json:"body"`
|
Body api.SearchResults `json:"body"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,12 @@ func ListAccessTokens(ctx *context.APIContext) {
|
||||||
// summary: List the authenticated user's access tokens
|
// summary: List the authenticated user's access tokens
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: username
|
||||||
|
// in: path
|
||||||
|
// description: username of user
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/AccessTokenList"
|
// "$ref": "#/responses/AccessTokenList"
|
||||||
|
|
@ -46,6 +52,12 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
|
||||||
// - application/json
|
// - application/json
|
||||||
// produces:
|
// produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
// parameters:
|
||||||
|
// - name: username
|
||||||
|
// in: path
|
||||||
|
// description: username of user
|
||||||
|
// type: string
|
||||||
|
// required: true
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/AccessToken"
|
// "$ref": "#/responses/AccessToken"
|
||||||
|
|
|
||||||
|
|
@ -119,11 +119,11 @@ func checkUserFollowing(ctx *context.APIContext, u *models.User, followID int64)
|
||||||
|
|
||||||
// CheckMyFollowing whether the given user is followed by the authenticated user
|
// CheckMyFollowing whether the given user is followed by the authenticated user
|
||||||
func CheckMyFollowing(ctx *context.APIContext) {
|
func CheckMyFollowing(ctx *context.APIContext) {
|
||||||
// swagger:operation GET /user/following/{followee} user userCurrentCheckFollowing
|
// swagger:operation GET /user/following/{username} user userCurrentCheckFollowing
|
||||||
// ---
|
// ---
|
||||||
// summary: Check whether a user is followed by the authenticated user
|
// summary: Check whether a user is followed by the authenticated user
|
||||||
// parameters:
|
// parameters:
|
||||||
// - name: followee
|
// - name: username
|
||||||
// in: path
|
// in: path
|
||||||
// description: username of followed user
|
// description: username of followed user
|
||||||
// type: string
|
// type: string
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user