mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Merge branch 'feature/wiki' into develop
This commit is contained in:
commit
dcb391d341
54 changed files with 1526 additions and 2544 deletions
|
@ -17,6 +17,7 @@ github.com/go-sql-driver/mysql = commit:d512f20
|
||||||
github.com/go-xorm/core = commit:3e10003353
|
github.com/go-xorm/core = commit:3e10003353
|
||||||
github.com/go-xorm/xorm = commit:c643188
|
github.com/go-xorm/xorm = commit:c643188
|
||||||
github.com/gogits/chardet = commit:2404f77725
|
github.com/gogits/chardet = commit:2404f77725
|
||||||
|
github.com/gogits/git-shell =
|
||||||
github.com/gogits/go-gogs-client = commit:7c02c95
|
github.com/gogits/go-gogs-client = commit:7c02c95
|
||||||
github.com/issue9/identicon = commit:5a61672
|
github.com/issue9/identicon = commit:5a61672
|
||||||
github.com/klauspost/compress = commit:bbfa9dc
|
github.com/klauspost/compress = commit:bbfa9dc
|
||||||
|
|
50
cmd/serve.go
50
cmd/serve.go
|
@ -87,7 +87,7 @@ func fail(userMessage, logMessage string, args ...interface{}) {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleUpdateTask(uuid string, user *models.User, repoUserName, repoName string) {
|
func handleUpdateTask(uuid string, user *models.User, username, reponame string, isWiki bool) {
|
||||||
task, err := models.GetUpdateTaskByUUID(uuid)
|
task, err := models.GetUpdateTaskByUUID(uuid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if models.IsErrUpdateTaskNotExist(err) {
|
if models.IsErrUpdateTaskNotExist(err) {
|
||||||
|
@ -95,19 +95,21 @@ func handleUpdateTask(uuid string, user *models.User, repoUserName, repoName str
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.GitLogger.Fatal(2, "GetUpdateTaskByUUID: %v", err)
|
log.GitLogger.Fatal(2, "GetUpdateTaskByUUID: %v", err)
|
||||||
}
|
} else if err = models.DeleteUpdateTaskByUUID(uuid); err != nil {
|
||||||
|
|
||||||
if err = models.Update(task.RefName, task.OldCommitID, task.NewCommitID,
|
|
||||||
user.Name, repoUserName, repoName, user.Id); err != nil {
|
|
||||||
log.GitLogger.Error(2, "Update: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = models.DeleteUpdateTaskByUUID(uuid); err != nil {
|
|
||||||
log.GitLogger.Fatal(2, "DeleteUpdateTaskByUUID: %v", err)
|
log.GitLogger.Fatal(2, "DeleteUpdateTaskByUUID: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isWiki {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = models.Update(task.RefName, task.OldCommitID, task.NewCommitID,
|
||||||
|
user.Name, username, reponame, user.Id); err != nil {
|
||||||
|
log.GitLogger.Error(2, "Update: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
// Ask for running deliver hook and test pull request tasks.
|
// Ask for running deliver hook and test pull request tasks.
|
||||||
reqURL := setting.AppUrl + repoUserName + "/" + repoName + "/tasks/trigger?branch=" +
|
reqURL := setting.AppUrl + username + "/" + reponame + "/tasks/trigger?branch=" +
|
||||||
strings.TrimPrefix(task.RefName, "refs/heads/")
|
strings.TrimPrefix(task.RefName, "refs/heads/")
|
||||||
log.GitLogger.Trace("Trigger task: %s", reqURL)
|
log.GitLogger.Trace("Trigger task: %s", reqURL)
|
||||||
|
|
||||||
|
@ -147,21 +149,27 @@ func runServ(c *cli.Context) {
|
||||||
if len(rr) != 2 {
|
if len(rr) != 2 {
|
||||||
fail("Invalid repository path", "Invalid repository path: %v", args)
|
fail("Invalid repository path", "Invalid repository path: %v", args)
|
||||||
}
|
}
|
||||||
repoUserName := strings.ToLower(rr[0])
|
username := strings.ToLower(rr[0])
|
||||||
repoName := strings.ToLower(strings.TrimSuffix(rr[1], ".git"))
|
reponame := strings.ToLower(strings.TrimSuffix(rr[1], ".git"))
|
||||||
|
|
||||||
repoUser, err := models.GetUserByName(repoUserName)
|
isWiki := false
|
||||||
if err != nil {
|
if strings.HasSuffix(reponame, ".wiki") {
|
||||||
if models.IsErrUserNotExist(err) {
|
isWiki = true
|
||||||
fail("Repository owner does not exist", "Unregistered owner: %s", repoUserName)
|
reponame = reponame[:len(reponame)-5]
|
||||||
}
|
|
||||||
fail("Internal error", "Failed to get repository owner(%s): %v", repoUserName, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repo, err := models.GetRepositoryByName(repoUser.Id, repoName)
|
repoUser, err := models.GetUserByName(username)
|
||||||
|
if err != nil {
|
||||||
|
if models.IsErrUserNotExist(err) {
|
||||||
|
fail("Repository owner does not exist", "Unregistered owner: %s", username)
|
||||||
|
}
|
||||||
|
fail("Internal error", "Failed to get repository owner(%s): %v", username, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
repo, err := models.GetRepositoryByName(repoUser.Id, reponame)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if models.IsErrRepoNotExist(err) {
|
if models.IsErrRepoNotExist(err) {
|
||||||
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", repoUser.Name, repoName)
|
fail(_ACCESS_DENIED_MESSAGE, "Repository does not exist: %s/%s", repoUser.Name, reponame)
|
||||||
}
|
}
|
||||||
fail("Internal error", "Failed to get repository: %v", err)
|
fail("Internal error", "Failed to get repository: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -258,7 +266,7 @@ func runServ(c *cli.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if requestedMode == models.ACCESS_MODE_WRITE {
|
if requestedMode == models.ACCESS_MODE_WRITE {
|
||||||
handleUpdateTask(uuid, user, repoUserName, repoName)
|
handleUpdateTask(uuid, user, username, reponame, isWiki)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update user key activity.
|
// Update user key activity.
|
||||||
|
|
24
cmd/web.go
24
cmd/web.go
|
@ -378,6 +378,7 @@ func runWeb(ctx *cli.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
reqRepoAdmin := middleware.RequireRepoAdmin()
|
reqRepoAdmin := middleware.RequireRepoAdmin()
|
||||||
|
reqRepoPusher := middleware.RequireRepoPusher()
|
||||||
|
|
||||||
// ***** START: Organization *****
|
// ***** START: Organization *****
|
||||||
m.Group("/org", func() {
|
m.Group("/org", func() {
|
||||||
|
@ -470,7 +471,7 @@ func runWeb(ctx *cli.Context) {
|
||||||
}, func(ctx *middleware.Context) {
|
}, func(ctx *middleware.Context) {
|
||||||
ctx.Data["PageIsSettings"] = true
|
ctx.Data["PageIsSettings"] = true
|
||||||
})
|
})
|
||||||
}, reqSignIn, middleware.RepoAssignment(true), reqRepoAdmin, middleware.RepoRef())
|
}, reqSignIn, middleware.RepoAssignment(), reqRepoAdmin, middleware.RepoRef())
|
||||||
|
|
||||||
m.Group("/:username/:reponame", func() {
|
m.Group("/:username/:reponame", func() {
|
||||||
m.Get("/action/:action", repo.Action)
|
m.Get("/action/:action", repo.Action)
|
||||||
|
@ -516,7 +517,7 @@ func runWeb(ctx *cli.Context) {
|
||||||
|
|
||||||
m.Combo("/compare/*").Get(repo.CompareAndPullRequest).
|
m.Combo("/compare/*").Get(repo.CompareAndPullRequest).
|
||||||
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
||||||
}, reqSignIn, middleware.RepoAssignment(true))
|
}, reqSignIn, middleware.RepoAssignment())
|
||||||
|
|
||||||
m.Group("/:username/:reponame", func() {
|
m.Group("/:username/:reponame", func() {
|
||||||
m.Group("", func() {
|
m.Group("", func() {
|
||||||
|
@ -530,7 +531,20 @@ func runWeb(ctx *cli.Context) {
|
||||||
})
|
})
|
||||||
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
|
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
|
||||||
|
|
||||||
m.Get("/branches", repo.Branches)
|
// m.Get("/branches", repo.Branches)
|
||||||
|
|
||||||
|
m.Group("/wiki", func() {
|
||||||
|
m.Get("/?:page", repo.Wiki)
|
||||||
|
m.Get("/_pages", repo.WikiPages)
|
||||||
|
|
||||||
|
m.Group("", func() {
|
||||||
|
m.Combo("/_new").Get(repo.NewWiki).
|
||||||
|
Post(bindIgnErr(auth.NewWikiForm{}), repo.NewWikiPost)
|
||||||
|
m.Combo("/:page/_edit").Get(repo.EditWiki).
|
||||||
|
Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost)
|
||||||
|
}, reqSignIn, reqRepoPusher)
|
||||||
|
}, middleware.RepoRef())
|
||||||
|
|
||||||
m.Get("/archive/*", repo.Download)
|
m.Get("/archive/*", repo.Download)
|
||||||
|
|
||||||
m.Group("/pulls/:index", func() {
|
m.Group("/pulls/:index", func() {
|
||||||
|
@ -550,13 +564,13 @@ func runWeb(ctx *cli.Context) {
|
||||||
}, middleware.RepoRef())
|
}, middleware.RepoRef())
|
||||||
|
|
||||||
m.Get("/compare/:before([a-z0-9]{40})...:after([a-z0-9]{40})", repo.CompareDiff)
|
m.Get("/compare/:before([a-z0-9]{40})...:after([a-z0-9]{40})", repo.CompareDiff)
|
||||||
}, ignSignIn, middleware.RepoAssignment(true))
|
}, ignSignIn, middleware.RepoAssignment())
|
||||||
|
|
||||||
m.Group("/:username", func() {
|
m.Group("/:username", func() {
|
||||||
m.Group("/:reponame", func() {
|
m.Group("/:reponame", func() {
|
||||||
m.Get("", repo.Home)
|
m.Get("", repo.Home)
|
||||||
m.Get("\\.git$", repo.Home)
|
m.Get("\\.git$", repo.Home)
|
||||||
}, ignSignIn, middleware.RepoAssignment(true, true), middleware.RepoRef())
|
}, ignSignIn, middleware.RepoAssignment(true), middleware.RepoRef())
|
||||||
|
|
||||||
m.Group("/:reponame", func() {
|
m.Group("/:reponame", func() {
|
||||||
m.Any("/*", ignSignInAndCsrf, repo.HTTP)
|
m.Any("/*", ignSignInAndCsrf, repo.HTTP)
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=Изтрий етап
|
||||||
milestones.deletion_desc=При изтриване на етап ще се премахне информацията за него от всички свързани проблеми. Желаете ли да продължите?
|
milestones.deletion_desc=При изтриване на етап ще се премахне информацията за него от всички свързани проблеми. Желаете ли да продължите?
|
||||||
milestones.deletion_success=Етапът е изтрит успешно!
|
milestones.deletion_success=Етапът е изтрит успешно!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Настройки
|
settings=Настройки
|
||||||
settings.options=Опции
|
settings.options=Опции
|
||||||
settings.collaboration=Сътрудничество
|
settings.collaboration=Сътрудничество
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Домейн
|
||||||
settings.slack_channel=Канал
|
settings.slack_channel=Канал
|
||||||
settings.deploy_keys=Ключове за внедряване
|
settings.deploy_keys=Ключове за внедряване
|
||||||
settings.add_deploy_key=Добави ключ за внедряване
|
settings.add_deploy_key=Добави ключ за внедряване
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Все още няма настроен никакъв ключ за внедряване.
|
settings.no_deploy_keys=Все още няма настроен никакъв ключ за внедряване.
|
||||||
settings.title=Заглавие
|
settings.title=Заглавие
|
||||||
settings.deploy_key_content=Съдържание
|
settings.deploy_key_content=Съдържание
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=Meilenstein löschen
|
||||||
milestones.deletion_desc=Das Löschen dieses Meilensteins wird alle zugehörigen Informationen in allen Issues entfernen. Wirklich fortfahren?
|
milestones.deletion_desc=Das Löschen dieses Meilensteins wird alle zugehörigen Informationen in allen Issues entfernen. Wirklich fortfahren?
|
||||||
milestones.deletion_success=Meilenstein erfolgreich gelöscht!
|
milestones.deletion_success=Meilenstein erfolgreich gelöscht!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Einstellungen
|
settings=Einstellungen
|
||||||
settings.options=Optionen
|
settings.options=Optionen
|
||||||
settings.collaboration=Zusammenarbeit
|
settings.collaboration=Zusammenarbeit
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Domain
|
||||||
settings.slack_channel=Kanal
|
settings.slack_channel=Kanal
|
||||||
settings.deploy_keys=Deploy-Keys
|
settings.deploy_keys=Deploy-Keys
|
||||||
settings.add_deploy_key=Deploy-Key hinzufügen
|
settings.add_deploy_key=Deploy-Key hinzufügen
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Du hast noch keine Deploy-Schlüssel hinzugefügt.
|
settings.no_deploy_keys=Du hast noch keine Deploy-Schlüssel hinzugefügt.
|
||||||
settings.title=Titel
|
settings.title=Titel
|
||||||
settings.deploy_key_content=Inhalt
|
settings.deploy_key_content=Inhalt
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion = Milestone Deletion
|
||||||
milestones.deletion_desc = Delete this milestone will remove its information in all related issues. Do you want to continue?
|
milestones.deletion_desc = Delete this milestone will remove its information in all related issues. Do you want to continue?
|
||||||
milestones.deletion_success = Milestone has been deleted successfully!
|
milestones.deletion_success = Milestone has been deleted successfully!
|
||||||
|
|
||||||
|
wiki = Wiki
|
||||||
|
wiki.welcome = Welcome to Wiki!
|
||||||
|
wiki.welcome_desc = Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page = Create the first page
|
||||||
|
wiki.page = Page
|
||||||
|
wiki.filter_page = Filter page
|
||||||
|
wiki.new_page = Create New Page
|
||||||
|
wiki.default_commit_message = Write a note about this update (optional).
|
||||||
|
wiki.save_page = Save Page
|
||||||
|
wiki.last_commit_info = %s edited this page %s
|
||||||
|
wiki.edit_page_button = Edit
|
||||||
|
wiki.new_page_button = New Page
|
||||||
|
wiki.page_already_exists = Wiki page with same name already exists.
|
||||||
|
wiki.pages = Pages
|
||||||
|
wiki.last_updated = Last updated %s
|
||||||
|
|
||||||
settings = Settings
|
settings = Settings
|
||||||
settings.options = Options
|
settings.options = Options
|
||||||
settings.collaboration = Collaboration
|
settings.collaboration = Collaboration
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=Borrar milestone
|
||||||
milestones.deletion_desc=El borrado de este milestone eliminará su información y las incidencias asociadas. ¿Desea continuar?
|
milestones.deletion_desc=El borrado de este milestone eliminará su información y las incidencias asociadas. ¿Desea continuar?
|
||||||
milestones.deletion_success=¡El milestone ha sido eliminado con éxito!
|
milestones.deletion_success=¡El milestone ha sido eliminado con éxito!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Configuración
|
settings=Configuración
|
||||||
settings.options=Opciones
|
settings.options=Opciones
|
||||||
settings.collaboration=Colaboración
|
settings.collaboration=Colaboración
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Dominio
|
||||||
settings.slack_channel=Canal
|
settings.slack_channel=Canal
|
||||||
settings.deploy_keys=Claves de Despliegue
|
settings.deploy_keys=Claves de Despliegue
|
||||||
settings.add_deploy_key=Añadir Clave de Despliegue
|
settings.add_deploy_key=Añadir Clave de Despliegue
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=No has añadido ninguna clave de despliegue.
|
settings.no_deploy_keys=No has añadido ninguna clave de despliegue.
|
||||||
settings.title=Título
|
settings.title=Título
|
||||||
settings.deploy_key_content=Contenido
|
settings.deploy_key_content=Contenido
|
||||||
|
@ -993,12 +1010,12 @@ now=ahora
|
||||||
1w=%s 1 semana
|
1w=%s 1 semana
|
||||||
1mon=%s 1 mes
|
1mon=%s 1 mes
|
||||||
1y=%s 1 año
|
1y=%s 1 año
|
||||||
seconds=%[2]d %[1]s segundos
|
seconds=%[2]s %[1]d segundos
|
||||||
minutes=%s %d minutos
|
minutes=%[2]s %[1]d minutos
|
||||||
hours=%s %d horas
|
hours=%[2]s %[1]d horas
|
||||||
days=%s %d días
|
days=%[2]s %[1]d días
|
||||||
weeks=%s %d semanas
|
weeks=%[2]s %[1]d semanas
|
||||||
months=%s %d meses
|
months=%[2]s %[1]d meses
|
||||||
years=%s %d años
|
years=%s %d años
|
||||||
raw_seconds=segundos
|
raw_seconds=segundos
|
||||||
raw_minutes=minutos
|
raw_minutes=minutos
|
||||||
|
|
|
@ -336,11 +336,11 @@ repo_name_helper=Idéalement, le nom d'un dépot devrait être court, mémorable
|
||||||
visibility=Visibilité
|
visibility=Visibilité
|
||||||
visiblity_helper=Ce dépôt est <span class="ui red text"> privé</span>
|
visiblity_helper=Ce dépôt est <span class="ui red text"> privé</span>
|
||||||
visiblity_helper_forced=L'administrateur du site a forcé tous les nouveaux dépôts à être <span class="ui red text">privés</span>
|
visiblity_helper_forced=L'administrateur du site a forcé tous les nouveaux dépôts à être <span class="ui red text">privés</span>
|
||||||
visiblity_fork_helper=(Les changement de cette valeur affectera tous les forks)
|
visiblity_fork_helper=(Les changement de cette valeur affecteront tous les embranchements)
|
||||||
clone_helper=Besoin d'aide pour dupliquer ? Visitez <a target="_blank" href="%s">l'aide</a> !
|
clone_helper=Besoin d'aide pour dupliquer ? Visitez <a target="_blank" href="%s">l'aide</a> !
|
||||||
fork_repo=Scinder le dépôt
|
fork_repo=Scinder le dépôt
|
||||||
fork_from=Embranchement de
|
fork_from=Scission de
|
||||||
fork_visiblity_helper=La visibilité d'un référentiel d'embranchement ne peut pas être modifiée.
|
fork_visiblity_helper=Un dépôt scindé ne peut pas changer sa visiblité
|
||||||
repo_desc=Description
|
repo_desc=Description
|
||||||
repo_lang=Langue
|
repo_lang=Langue
|
||||||
repo_lang_helper=Sélectionnez les fichiers .gitignore
|
repo_lang_helper=Sélectionnez les fichiers .gitignore
|
||||||
|
@ -353,8 +353,8 @@ create_repo=Créer un dépôt
|
||||||
default_branch=Branche par défaut
|
default_branch=Branche par défaut
|
||||||
mirror_interval=Intervalle du miroir (heure)
|
mirror_interval=Intervalle du miroir (heure)
|
||||||
watchers=Observateurs
|
watchers=Observateurs
|
||||||
stargazers=Stargazers
|
stargazers=Astronome
|
||||||
forks=Forks
|
forks=Embranchements
|
||||||
|
|
||||||
form.name_reserved=Le nom de dépôt '%s' est réservé.
|
form.name_reserved=Le nom de dépôt '%s' est réservé.
|
||||||
form.name_pattern_not_allowed=Motif '%s' interdit pour les noms de dépôt.
|
form.name_pattern_not_allowed=Motif '%s' interdit pour les noms de dépôt.
|
||||||
|
@ -369,7 +369,7 @@ migrate.permission_denied=Vous n'êtes pas autorisé à importer des dépôts lo
|
||||||
migrate.invalid_local_path=Chemin local non valide, non existant ou n'étant pas un dossier.
|
migrate.invalid_local_path=Chemin local non valide, non existant ou n'étant pas un dossier.
|
||||||
migrate.failed=Migration failed: %v
|
migrate.failed=Migration failed: %v
|
||||||
|
|
||||||
forked_from=embranché à partir de
|
forked_from=scindé depuis
|
||||||
fork_from_self=Vous nous ne pouvez pas scinder un dépôt que vous possédez déja !
|
fork_from_self=Vous nous ne pouvez pas scinder un dépôt que vous possédez déja !
|
||||||
copy_link=Copier
|
copy_link=Copier
|
||||||
copy_link_success=Copié!
|
copy_link_success=Copié!
|
||||||
|
@ -503,7 +503,7 @@ pulls.tab_files=Fichiers modifiés
|
||||||
pulls.reopen_to_merge=Veuillez rouvrir cette demande de Pull Request pour effectuer l'opération de fusion.
|
pulls.reopen_to_merge=Veuillez rouvrir cette demande de Pull Request pour effectuer l'opération de fusion.
|
||||||
pulls.merged=Fusionné
|
pulls.merged=Fusionné
|
||||||
pulls.has_merged=Cette Pull Request a été fusionnée avec succès !
|
pulls.has_merged=Cette Pull Request a été fusionnée avec succès !
|
||||||
pulls.data_broken=Les données de cette Pull Request a été rompues en raison de la suppression d'informations du Fork.
|
pulls.data_broken=Les données de cette demande de rattachement ont été compromise en raison de la suppression d'informations sur l'embranchement.
|
||||||
pulls.is_checking=La recherche de conflits est toujours en cours, veuillez rafraichir la page dans quelques instants.
|
pulls.is_checking=La recherche de conflits est toujours en cours, veuillez rafraichir la page dans quelques instants.
|
||||||
pulls.can_auto_merge_desc=Vous pouvez effectuer d'opération de fusion automatique sur cette demande de Pull Request.
|
pulls.can_auto_merge_desc=Vous pouvez effectuer d'opération de fusion automatique sur cette demande de Pull Request.
|
||||||
pulls.cannot_auto_merge_desc=Vous ne pouvez effectuer des opération de fusion automatique car il y a des conflits entre les Commits.
|
pulls.cannot_auto_merge_desc=Vous ne pouvez effectuer des opération de fusion automatique car il y a des conflits entre les Commits.
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=Supprimer le Jalon
|
||||||
milestones.deletion_desc=Supprimer ce Jalon effacera ses informations dans tous les problèmes relatifs. Voulez-vous continuer ?
|
milestones.deletion_desc=Supprimer ce Jalon effacera ses informations dans tous les problèmes relatifs. Voulez-vous continuer ?
|
||||||
milestones.deletion_success=Le Jalon a été supprimé avec succès !
|
milestones.deletion_success=Le Jalon a été supprimé avec succès !
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Paramètres
|
settings=Paramètres
|
||||||
settings.options=Options
|
settings.options=Options
|
||||||
settings.collaboration=Collaboration
|
settings.collaboration=Collaboration
|
||||||
|
@ -555,9 +571,9 @@ settings.transfer_notices_2=-Vous préserverez l'accès si le nouveau propriéta
|
||||||
settings.transfer_form_title=Veuillez recopier le texte suivant afin de confirmer votre opération :
|
settings.transfer_form_title=Veuillez recopier le texte suivant afin de confirmer votre opération :
|
||||||
settings.delete_notices_1=- Cette opération <strong>ne peut pas </strong> être annulée.
|
settings.delete_notices_1=- Cette opération <strong>ne peut pas </strong> être annulée.
|
||||||
settings.delete_notices_2=-Cette opération supprimera définitivement le dépôt, y compris les données Git, problèmes, commentaires et accès des collaborateurs.
|
settings.delete_notices_2=-Cette opération supprimera définitivement le dépôt, y compris les données Git, problèmes, commentaires et accès des collaborateurs.
|
||||||
settings.delete_notices_fork_1=-Si ce dépôt est public, tous les Forks vont devenir indépendants après la suppression.
|
settings.delete_notices_fork_1=-Si ce dépôt est public, tous les embranchements vont devenir indépendants après la suppression.
|
||||||
settings.delete_notices_fork_2=-Si ce dépôt est privé, tous les Forks seront supprimés en même temps.
|
settings.delete_notices_fork_2=-Si ce dépôt est privé, tous les embranchements seront supprimés en même temps.
|
||||||
settings.delete_notices_fork_3=-Si vous souhaitez conserver tous les forks après suppression, veuillez tout d'abord modifier la visibilité de ce dépôt en public.
|
settings.delete_notices_fork_3=-Si vous souhaitez conserver tous les embranchements après suppression, veuillez tout d'abord modifier la visibilité de ce dépôt en public.
|
||||||
settings.update_settings_success=Options mises à jour avec succès.
|
settings.update_settings_success=Options mises à jour avec succès.
|
||||||
settings.transfer_owner=Nouveau propriétaire
|
settings.transfer_owner=Nouveau propriétaire
|
||||||
settings.make_transfer=Transférer
|
settings.make_transfer=Transférer
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Domaine
|
||||||
settings.slack_channel=Canal
|
settings.slack_channel=Canal
|
||||||
settings.deploy_keys=Clés de déploiement
|
settings.deploy_keys=Clés de déploiement
|
||||||
settings.add_deploy_key=Ajouter une Clé de Déploiement
|
settings.add_deploy_key=Ajouter une Clé de Déploiement
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Vous n'avez ajouté aucune clé de déploiement.
|
settings.no_deploy_keys=Vous n'avez ajouté aucune clé de déploiement.
|
||||||
settings.title=Titre
|
settings.title=Titre
|
||||||
settings.deploy_key_content=Contenu
|
settings.deploy_key_content=Contenu
|
||||||
|
|
|
@ -15,7 +15,7 @@ template=Template
|
||||||
language=Lingua
|
language=Lingua
|
||||||
create_new=Crea...
|
create_new=Crea...
|
||||||
user_profile_and_more=Profilo utente e altro
|
user_profile_and_more=Profilo utente e altro
|
||||||
signed_in_as=Signed in as
|
signed_in_as=Accesso effettuato come
|
||||||
|
|
||||||
username=Nome utente
|
username=Nome utente
|
||||||
email=E-mail
|
email=E-mail
|
||||||
|
@ -64,9 +64,9 @@ db_name=Nome del database
|
||||||
db_helper=Utilizza il motore INNODB con codifica utf8_general_ci per MySQL.
|
db_helper=Utilizza il motore INNODB con codifica utf8_general_ci per MySQL.
|
||||||
ssl_mode=Modalità SSL
|
ssl_mode=Modalità SSL
|
||||||
path=Percorso
|
path=Percorso
|
||||||
sqlite_helper=The file path of SQLite3 or TiDB database.
|
sqlite_helper=Il percorso file del database SQLite3 o TiDB.
|
||||||
err_empty_db_path=SQLite3 or TiDB database path cannot be empty.
|
err_empty_db_path=Il percorso file del database SQLite3 o TiDB non può essere vuoto.
|
||||||
err_invalid_tidb_name=TiDB database name does not allow characters "." and "-".
|
err_invalid_tidb_name=Il nome del database TiDB non ammette caratteri "." e "-".
|
||||||
no_admin_and_disable_registration=Non puoi disabilitare la registrazione senza aver creato un amministratore.
|
no_admin_and_disable_registration=Non puoi disabilitare la registrazione senza aver creato un amministratore.
|
||||||
err_empty_admin_password=La password dell'amministratore non puo' essere vuota.
|
err_empty_admin_password=La password dell'amministratore non puo' essere vuota.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ run_user_helper=L'utente deve avere accesso al percorso root del repository e av
|
||||||
domain=Dominio
|
domain=Dominio
|
||||||
domain_helper=Questo modifica lo SSH clone URLs.
|
domain_helper=Questo modifica lo SSH clone URLs.
|
||||||
ssh_port=Porta SSH
|
ssh_port=Porta SSH
|
||||||
ssh_port_helper=Port number which your SSH server is using, leave it empty to disable SSH feature.
|
ssh_port_helper=Numero di porta utilizzato dal server SSH, lasciare vuoto per disabilitare l'integrazione SSH.
|
||||||
http_port=Porta HTTP
|
http_port=Porta HTTP
|
||||||
http_port_helper=Porta di ascolto dell'applicazione.
|
http_port_helper=Porta di ascolto dell'applicazione.
|
||||||
app_url=URL Applicazione
|
app_url=URL Applicazione
|
||||||
|
@ -98,12 +98,12 @@ mail_notify=Abilita Notifiche via Email
|
||||||
server_service_title=Impostazioni del Server e Altri Servizi
|
server_service_title=Impostazioni del Server e Altri Servizi
|
||||||
offline_mode=Abilita Modalità Offline
|
offline_mode=Abilita Modalità Offline
|
||||||
offline_mode_popup=Disabilita il CDN anche in modalità produttiva, tutte le risorse saranno servite localmente.
|
offline_mode_popup=Disabilita il CDN anche in modalità produttiva, tutte le risorse saranno servite localmente.
|
||||||
disable_gravatar=Disable Gravatar Service
|
disable_gravatar=Disattiva il servizio Gravatar
|
||||||
disable_gravatar_popup=Disable Gravatar and custom sources, all avatars are uploaded by users or default.
|
disable_gravatar_popup=Disabilita Gravatar e sorgenti customizzate, tutti gli avatar vengono caricati dagli utenti o come predefinito.
|
||||||
disable_registration=Disabilita Registrazione Manuale
|
disable_registration=Disabilita Registrazione Manuale
|
||||||
disable_registration_popup=Disabilita la registrazione manuale degli utenti, solo gli amministratori possono creare account.
|
disable_registration_popup=Disabilita la registrazione manuale degli utenti, solo gli amministratori possono creare account.
|
||||||
enable_captcha=Abilita Captcha
|
enable_captcha=Abilita Captcha
|
||||||
enable_captcha_popup=Require validate captcha for user self-registration.
|
enable_captcha_popup=Richiedi convalida captcha per i nuovi utenti.
|
||||||
require_sign_in_view=Abilita Richiesta di Accesso per Vedere le Pagine
|
require_sign_in_view=Abilita Richiesta di Accesso per Vedere le Pagine
|
||||||
require_sign_in_view_popup=Solo gli utenti loggati possono vedere le pagine, i visitatori potranno vedere solo le pagine di accesso e registrazione.
|
require_sign_in_view_popup=Solo gli utenti loggati possono vedere le pagine, i visitatori potranno vedere solo le pagine di accesso e registrazione.
|
||||||
admin_setting_desc=Non devi per forza creare un account admin proprio adesso, ma comunque l'utente ID=1 otterrà l'accesso da amministratore automaticamente.
|
admin_setting_desc=Non devi per forza creare un account admin proprio adesso, ma comunque l'utente ID=1 otterrà l'accesso da amministratore automaticamente.
|
||||||
|
@ -111,7 +111,7 @@ admin_title=Impostazioni Account Amministratore
|
||||||
admin_name=Nome utente
|
admin_name=Nome utente
|
||||||
admin_password=Password
|
admin_password=Password
|
||||||
confirm_password=Conferma Password
|
confirm_password=Conferma Password
|
||||||
admin_email=Admin E-mail
|
admin_email=E-mail dell'Admin
|
||||||
install_gogs=Installare Gogs
|
install_gogs=Installare Gogs
|
||||||
test_git_failed=Fallito il test del comando git: %v
|
test_git_failed=Fallito il test del comando git: %v
|
||||||
sqlite3_not_available=Questa versione non supporta SQLite3, si prega di scaricare la versione binaria ufficiale da %s, NON la versione gobuild.
|
sqlite3_not_available=Questa versione non supporta SQLite3, si prega di scaricare la versione binaria ufficiale da %s, NON la versione gobuild.
|
||||||
|
@ -164,7 +164,7 @@ activate_account=Per favore attiva il tuo account
|
||||||
activate_email=Verifica il tuo indirizzo e-mail
|
activate_email=Verifica il tuo indirizzo e-mail
|
||||||
reset_password=Reimposta la tua password
|
reset_password=Reimposta la tua password
|
||||||
register_success=Registrazione completata con successo, Benvenuto
|
register_success=Registrazione completata con successo, Benvenuto
|
||||||
register_notify=Welcome on board
|
register_notify=Benvenuti a bordo
|
||||||
|
|
||||||
[modal]
|
[modal]
|
||||||
yes=Sì
|
yes=Sì
|
||||||
|
@ -253,7 +253,7 @@ location=Posizione
|
||||||
update_profile=Aggiorna Profilo
|
update_profile=Aggiorna Profilo
|
||||||
update_profile_success=Il tuo profilo è stato aggiornato con successo.
|
update_profile_success=Il tuo profilo è stato aggiornato con successo.
|
||||||
change_username=Username Cambiato
|
change_username=Username Cambiato
|
||||||
change_username_prompt=This change will affect the way how links relate to your account.
|
change_username_prompt=Questa modifica influenzerà il modo in cui i link si riferiscono al tuo account.
|
||||||
continue=Continua
|
continue=Continua
|
||||||
cancel=Annulla
|
cancel=Annulla
|
||||||
|
|
||||||
|
@ -278,9 +278,9 @@ email_desc=Il tuo indirizzo e-mail primario sarà usato per le notifiche e altre
|
||||||
primary=Primario
|
primary=Primario
|
||||||
primary_email=Imposta come primario
|
primary_email=Imposta come primario
|
||||||
delete_email=Elimina
|
delete_email=Elimina
|
||||||
email_deletion=E-mail Deletion
|
email_deletion=Eliminazione e-mail
|
||||||
email_deletion_desc=Delete this e-mail address will remove related information from your account. Do you want to continue?
|
email_deletion_desc=La procedura di rimozione indirizzo email eliminerà tutte le informazioni correlate dal tuo account. Si desidera continuare?
|
||||||
email_deletion_success=E-mail has been deleted successfully!
|
email_deletion_success=Indirizzo e-mail eliminato con successo!
|
||||||
add_new_email=Aggiungi un nuovo indirizzo E-mail
|
add_new_email=Aggiungi un nuovo indirizzo E-mail
|
||||||
add_email=Aggiungi E-mail
|
add_email=Aggiungi E-mail
|
||||||
add_email_confirmation_sent=Una nuova email di conferma è stata inviata a '%s', per favore controlla la tua posta in arrivo nelle prossime %d ore per completare il processo di registrazione.
|
add_email_confirmation_sent=Una nuova email di conferma è stata inviata a '%s', per favore controlla la tua posta in arrivo nelle prossime %d ore per completare il processo di registrazione.
|
||||||
|
@ -291,13 +291,13 @@ add_key=Aggiungi Chiave
|
||||||
ssh_desc=Questa è una lista di chiavi SSH associate al tuo account. Poiché queste chiavi consentono a chiunque di ottenere accesso alle tue repository, è molto importante che tu le riconosca.
|
ssh_desc=Questa è una lista di chiavi SSH associate al tuo account. Poiché queste chiavi consentono a chiunque di ottenere accesso alle tue repository, è molto importante che tu le riconosca.
|
||||||
ssh_helper=<strong>Non sai come?</strong> Controlla la guida di GitHub sul <a href="%s">creare le tue chiavi SSH</a> o sul risolvere <a href="%s">problemi frequenti</a> che potresti incontrare usando SSH.
|
ssh_helper=<strong>Non sai come?</strong> Controlla la guida di GitHub sul <a href="%s">creare le tue chiavi SSH</a> o sul risolvere <a href="%s">problemi frequenti</a> che potresti incontrare usando SSH.
|
||||||
add_new_key=Aggiungi Chiave SSH
|
add_new_key=Aggiungi Chiave SSH
|
||||||
ssh_key_been_used=Public key content has been used.
|
ssh_key_been_used=È stato utilizzato il contenuto della chiave pubblica.
|
||||||
ssh_key_name_used=Public key with same name has already existed.
|
ssh_key_name_used=Chiave pubblica con lo stesso nome esiste già.
|
||||||
key_name=Nome della Chiave
|
key_name=Nome della Chiave
|
||||||
key_content=Contenuto
|
key_content=Contenuto
|
||||||
add_key_success=New SSH key '%s' has been added successfully!
|
add_key_success=La nuova chiave SSH '%s' è stata aggiunta con successo!
|
||||||
delete_key=Elimina
|
delete_key=Elimina
|
||||||
ssh_key_deletion=SSH Key Deletion
|
ssh_key_deletion=Eliminazione chiave SSH
|
||||||
ssh_key_deletion_desc=Delete this SSH key will remove all related accesses for your account. Do you want to continue?
|
ssh_key_deletion_desc=Delete this SSH key will remove all related accesses for your account. Do you want to continue?
|
||||||
ssh_key_deletion_success=La chiave SSH e' stata cancellata con successo!
|
ssh_key_deletion_success=La chiave SSH e' stata cancellata con successo!
|
||||||
add_on=Aggiunto il
|
add_on=Aggiunto il
|
||||||
|
@ -319,7 +319,7 @@ token_name=Nome Token
|
||||||
generate_token=Genera Token
|
generate_token=Genera Token
|
||||||
generate_token_succees=Nuovo token di accesso generato con successo! Assicurarsi di copiare il nuovo token di accesso personale ora: non sarà possibile visualizzarlo nuovamente!
|
generate_token_succees=Nuovo token di accesso generato con successo! Assicurarsi di copiare il nuovo token di accesso personale ora: non sarà possibile visualizzarlo nuovamente!
|
||||||
delete_token=Elimina
|
delete_token=Elimina
|
||||||
access_token_deletion=Personal Access Token Deletion
|
access_token_deletion=Eliminazione Token di accesso personale
|
||||||
access_token_deletion_desc=Delete this personal access token will remove all related accesses of application. Do you want to continue?
|
access_token_deletion_desc=Delete this personal access token will remove all related accesses of application. Do you want to continue?
|
||||||
delete_token_success=Personal access token has been removed successfully! Don't forget to update your application as well.
|
delete_token_success=Personal access token has been removed successfully! Don't forget to update your application as well.
|
||||||
|
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=Milestone Deletion
|
||||||
milestones.deletion_desc=Delete this milestone will remove its information in all related issues. Do you want to continue?
|
milestones.deletion_desc=Delete this milestone will remove its information in all related issues. Do you want to continue?
|
||||||
milestones.deletion_success=Milestone has been deleted successfully!
|
milestones.deletion_success=Milestone has been deleted successfully!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Impostazioni
|
settings=Impostazioni
|
||||||
settings.options=Opzioni
|
settings.options=Opzioni
|
||||||
settings.collaboration=Collaborazione
|
settings.collaboration=Collaborazione
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Dominio
|
||||||
settings.slack_channel=Canale
|
settings.slack_channel=Canale
|
||||||
settings.deploy_keys=Dispiega Chiavi
|
settings.deploy_keys=Dispiega Chiavi
|
||||||
settings.add_deploy_key=Add Deploy Key
|
settings.add_deploy_key=Add Deploy Key
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=You haven't added any deploy key.
|
settings.no_deploy_keys=You haven't added any deploy key.
|
||||||
settings.title=Title
|
settings.title=Title
|
||||||
settings.deploy_key_content=Content
|
settings.deploy_key_content=Content
|
||||||
|
|
|
@ -352,9 +352,9 @@ auto_init=選択されたファイルおよびテンプレートでリポジト
|
||||||
create_repo=リポジトリを作成
|
create_repo=リポジトリを作成
|
||||||
default_branch=デフォルトのブランチ
|
default_branch=デフォルトのブランチ
|
||||||
mirror_interval=ミラー 間隔(時)
|
mirror_interval=ミラー 間隔(時)
|
||||||
watchers=Watchers
|
watchers=ウォッチャー
|
||||||
stargazers=Stargazers
|
stargazers=Stargazers
|
||||||
forks=Forks
|
forks=フォーク
|
||||||
|
|
||||||
form.name_reserved=リポジトリ名 '%s' は予約されています。
|
form.name_reserved=リポジトリ名 '%s' は予約されています。
|
||||||
form.name_pattern_not_allowed=リポジトリ名のパターン '%s' は許可されていません。
|
form.name_pattern_not_allowed=リポジトリ名のパターン '%s' は許可されていません。
|
||||||
|
@ -365,7 +365,7 @@ migrate_type_helper=このリポジトリは、<span class="text blue"> ミラ
|
||||||
migrate_repo=リポジトリを移行
|
migrate_repo=リポジトリを移行
|
||||||
migrate.clone_address=クローンアドレス
|
migrate.clone_address=クローンアドレス
|
||||||
migrate.clone_address_desc=これは、HTTP/HTTPS/GIT URL またはローカル サーバー パスを設定できます。
|
migrate.clone_address_desc=これは、HTTP/HTTPS/GIT URL またはローカル サーバー パスを設定できます。
|
||||||
migrate.permission_denied=You are not allowed to import local repositories.
|
migrate.permission_denied=ローカル リポジトリをインポートすることはできません。
|
||||||
migrate.invalid_local_path=ローカルパスが無効です。存在しないかディレクトリではありません。
|
migrate.invalid_local_path=ローカルパスが無効です。存在しないかディレクトリではありません。
|
||||||
migrate.failed=Migration failed: %v
|
migrate.failed=Migration failed: %v
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ repo_is_empty=このリポジトリは空です、後で戻って来て下さい
|
||||||
|
|
||||||
branch=ブランチ
|
branch=ブランチ
|
||||||
tree=ツリー
|
tree=ツリー
|
||||||
filter_branch_and_tag=Filter branch or tag
|
filter_branch_and_tag=ブランチまたはタグをフィルタリング
|
||||||
branches=ブランチ
|
branches=ブランチ
|
||||||
tags=タグ
|
tags=タグ
|
||||||
issues=課題
|
issues=課題
|
||||||
|
@ -485,7 +485,7 @@ issues.label_deletion=ラベルの削除
|
||||||
issues.label_deletion_desc=ラベルを削除すると、関連するすべての問題の情報が削除されます。続行しますか。
|
issues.label_deletion_desc=ラベルを削除すると、関連するすべての問題の情報が削除されます。続行しますか。
|
||||||
issues.label_deletion_success=ラベルは正常に削除されました。
|
issues.label_deletion_success=ラベルは正常に削除されました。
|
||||||
|
|
||||||
pulls.new=New Pull Request
|
pulls.new=新しいプルリクエスト
|
||||||
pulls.compare_changes=変更を比較
|
pulls.compare_changes=変更を比較
|
||||||
pulls.compare_changes_desc=2つのブランチを比較し、プルリクエストを作成します。
|
pulls.compare_changes_desc=2つのブランチを比較し、プルリクエストを作成します。
|
||||||
pulls.compare_base=ベース
|
pulls.compare_base=ベース
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=マイルス トーンの削除
|
||||||
milestones.deletion_desc=このマイルス トーンを削除すると、関連課題に該当情報が削除されます。続行しますか。
|
milestones.deletion_desc=このマイルス トーンを削除すると、関連課題に該当情報が削除されます。続行しますか。
|
||||||
milestones.deletion_success=マイルス トーンは正常に削除されました。
|
milestones.deletion_success=マイルス トーンは正常に削除されました。
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=設定
|
settings=設定
|
||||||
settings.options=オプション
|
settings.options=オプション
|
||||||
settings.collaboration=コラボレーション
|
settings.collaboration=コラボレーション
|
||||||
|
@ -566,7 +582,7 @@ settings.confirm_delete=削除の確認
|
||||||
settings.add_collaborator=新しい共同編集者を追加
|
settings.add_collaborator=新しい共同編集者を追加
|
||||||
settings.add_collaborator_success=新しい共同編集者が追加されました。
|
settings.add_collaborator_success=新しい共同編集者が追加されました。
|
||||||
settings.remove_collaborator_success=共同編集者が削除されました。
|
settings.remove_collaborator_success=共同編集者が削除されました。
|
||||||
settings.search_user_placeholder=Search user...
|
settings.search_user_placeholder=Search users
|
||||||
settings.user_is_org_member=ユーザーは組織の一員なので、共同編集者として追加することはできません。
|
settings.user_is_org_member=ユーザーは組織の一員なので、共同編集者として追加することはできません。
|
||||||
settings.add_webhook=Webhook を追加
|
settings.add_webhook=Webhook を追加
|
||||||
settings.hooks_desc=Webhooksは、Gogsで特定のイベントの発生時に指定された外部サービスに通知を許可します。イベントが発生すると、それぞれ指定されたUrlに、POSTリクエストが送られます。詳細はこちらのの <a target="_blank"href="%s"> Webhooks ガイド</a>をご覧ください。
|
settings.hooks_desc=Webhooksは、Gogsで特定のイベントの発生時に指定された外部サービスに通知を許可します。イベントが発生すると、それぞれ指定されたUrlに、POSTリクエストが送られます。詳細はこちらのの <a target="_blank"href="%s"> Webhooks ガイド</a>をご覧ください。
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=ドメイン
|
||||||
settings.slack_channel=チャンネル
|
settings.slack_channel=チャンネル
|
||||||
settings.deploy_keys=デプロイキー
|
settings.deploy_keys=デプロイキー
|
||||||
settings.add_deploy_key=デプロイキーを追加
|
settings.add_deploy_key=デプロイキーを追加
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=でプロキーは1つも追加されていません。
|
settings.no_deploy_keys=でプロキーは1つも追加されていません。
|
||||||
settings.title=タイトル
|
settings.title=タイトル
|
||||||
settings.deploy_key_content=コンテント
|
settings.deploy_key_content=コンテント
|
||||||
|
@ -644,21 +661,21 @@ release.edit_subheader=Detailed change log can help users understand what has be
|
||||||
release.tag_name=タグ名
|
release.tag_name=タグ名
|
||||||
release.target=ターゲット
|
release.target=ターゲット
|
||||||
release.tag_helper=既存のタグを選択するか、新しいタグを作成し発行します。
|
release.tag_helper=既存のタグを選択するか、新しいタグを作成し発行します。
|
||||||
release.title=Title
|
release.title=タイトル
|
||||||
release.content=Content
|
release.content=コンテント
|
||||||
release.write=書込み
|
release.write=書込み
|
||||||
release.preview=プレビュー
|
release.preview=プレビュー
|
||||||
release.loading=読み込み中…
|
release.loading=読み込み中…
|
||||||
release.prerelease_desc=これはリリース前のものです
|
release.prerelease_desc=これはリリース前のものです
|
||||||
release.prerelease_helper=このリリースは非プロダクション利用として識別します。
|
release.prerelease_helper=このリリースは非プロダクション利用として識別します。
|
||||||
release.cancel=Cancel
|
release.cancel=キャンセル
|
||||||
release.publish=リリースを発行
|
release.publish=リリースを発行
|
||||||
release.save_draft=下書きを保存
|
release.save_draft=下書きを保存
|
||||||
release.edit_release=リリースを編集
|
release.edit_release=リリースを編集
|
||||||
release.delete_release=Delete This Release
|
release.delete_release=このリリースを削除
|
||||||
release.deletion=Release Deletion
|
release.deletion=リリースの削除
|
||||||
release.deletion_desc=Delete this release will delete corresponding Git tag. Do you want to continue?
|
release.deletion_desc=Delete this release will delete corresponding Git tag. Do you want to continue?
|
||||||
release.deletion_success=Release has been deleted successfully!
|
release.deletion_success=リリースが正常に削除されました。
|
||||||
release.tag_name_already_exist=このタグ名には既にリリースが存在します。
|
release.tag_name_already_exist=このタグ名には既にリリースが存在します。
|
||||||
release.downloads=Downloads
|
release.downloads=Downloads
|
||||||
|
|
||||||
|
@ -706,12 +723,12 @@ members.public=パブリック
|
||||||
members.public_helper=プライベートにする
|
members.public_helper=プライベートにする
|
||||||
members.private=プライベート
|
members.private=プライベート
|
||||||
members.private_helper=公開する
|
members.private_helper=公開する
|
||||||
members.member_role=Member Role:
|
members.member_role=メンバーの役割:
|
||||||
members.owner=オーナー
|
members.owner=オーナー
|
||||||
members.member=メンバー
|
members.member=メンバー
|
||||||
members.remove=削除
|
members.remove=削除
|
||||||
members.leave=退出
|
members.leave=退出
|
||||||
members.invite_desc=Add a new member to %s:
|
members.invite_desc=%s に新しいメンバーを追加
|
||||||
members.invite_now=今すぐ招待
|
members.invite_now=今すぐ招待
|
||||||
|
|
||||||
teams.join=参加
|
teams.join=参加
|
||||||
|
@ -736,7 +753,7 @@ teams.read_permission_desc=このチームは<strong>読み取り</strong>権限
|
||||||
teams.write_permission_desc=このチームは<strong>書き込み</strong>権限を持ち: メンバーはリポジトリの表示及リポジトリへのプッシュができます。
|
teams.write_permission_desc=このチームは<strong>書き込み</strong>権限を持ち: メンバーはリポジトリの表示及リポジトリへのプッシュができます。
|
||||||
teams.admin_permission_desc=このチームは<strong>管理者</strong>の権限を持ち: メンバーはチームのリポジトリに対して、読み取り、プッシュや共同編集者の追加ができます。
|
teams.admin_permission_desc=このチームは<strong>管理者</strong>の権限を持ち: メンバーはチームのリポジトリに対して、読み取り、プッシュや共同編集者の追加ができます。
|
||||||
teams.repositories=チームのリポジトリ
|
teams.repositories=チームのリポジトリ
|
||||||
teams.search_repo_placeholder=Search repository...
|
teams.search_repo_placeholder=リポジトリを検索
|
||||||
teams.add_team_repository=チームのリポジトリを追加
|
teams.add_team_repository=チームのリポジトリを追加
|
||||||
teams.remove_repo=削除(Remove)
|
teams.remove_repo=削除(Remove)
|
||||||
teams.add_nonexistent_repo=追加しようとしているリポジトリは存在しません。まずはじめに作成してください。
|
teams.add_nonexistent_repo=追加しようとしているリポジトリは存在しません。まずはじめに作成してください。
|
||||||
|
|
|
@ -164,7 +164,7 @@ activate_account=Lūdzu, aktivizējiet savu kontu
|
||||||
activate_email=Apstipriniet savu e-pasta adresi
|
activate_email=Apstipriniet savu e-pasta adresi
|
||||||
reset_password=Atiestatīt savu paroli
|
reset_password=Atiestatīt savu paroli
|
||||||
register_success=Reģistrācija notikusi veiksmīgi
|
register_success=Reģistrācija notikusi veiksmīgi
|
||||||
register_notify=Welcome on board
|
register_notify=Laipni lūgti uz klāja
|
||||||
|
|
||||||
[modal]
|
[modal]
|
||||||
yes=Jā
|
yes=Jā
|
||||||
|
@ -352,9 +352,9 @@ auto_init=Inicializēt šo repozitoriju ar izvēlētajiem failiem un sagatavi
|
||||||
create_repo=Izveidot repozitoriju
|
create_repo=Izveidot repozitoriju
|
||||||
default_branch=Noklusējuma atzars
|
default_branch=Noklusējuma atzars
|
||||||
mirror_interval=Spoguļošanas intervāls (stundās)
|
mirror_interval=Spoguļošanas intervāls (stundās)
|
||||||
watchers=Watchers
|
watchers=Novērotāji
|
||||||
stargazers=Stargazers
|
stargazers=Zvaigžņdevēji
|
||||||
forks=Forks
|
forks=Atdalītie repozitoriji
|
||||||
|
|
||||||
form.name_reserved=Repozitorija nosaukums '%s' ir rezervēts.
|
form.name_reserved=Repozitorija nosaukums '%s' ir rezervēts.
|
||||||
form.name_pattern_not_allowed=Repozitorija nosaukums '%s' nav atļauts.
|
form.name_pattern_not_allowed=Repozitorija nosaukums '%s' nav atļauts.
|
||||||
|
@ -367,7 +367,7 @@ migrate.clone_address=Klonēšanas adrese
|
||||||
migrate.clone_address_desc=Tas var būt HTTP/HTTPS/GIT URL vai ceļš uz lokālā servera.
|
migrate.clone_address_desc=Tas var būt HTTP/HTTPS/GIT URL vai ceļš uz lokālā servera.
|
||||||
migrate.permission_denied=Jums nav tiesību importēt lokālu repozitoriju.
|
migrate.permission_denied=Jums nav tiesību importēt lokālu repozitoriju.
|
||||||
migrate.invalid_local_path=Nekorents lokālais ceļš, tas neeksistē vai nav direktorijs.
|
migrate.invalid_local_path=Nekorents lokālais ceļš, tas neeksistē vai nav direktorijs.
|
||||||
migrate.failed=Migration failed: %v
|
migrate.failed=Migrācija neizdevās: %v
|
||||||
|
|
||||||
forked_from=atdalīts no
|
forked_from=atdalīts no
|
||||||
fork_from_self=Nav iespējams atdalīt repozitoriju, kuram esat īpašnieks!
|
fork_from_self=Nav iespējams atdalīt repozitoriju, kuram esat īpašnieks!
|
||||||
|
@ -390,7 +390,7 @@ repo_is_empty=Šis repozitorijs ir tukšs, apskatiet atkal vēlāk!
|
||||||
|
|
||||||
branch=Atzars
|
branch=Atzars
|
||||||
tree=Koks
|
tree=Koks
|
||||||
filter_branch_and_tag=Filter branch or tag
|
filter_branch_and_tag=Filtrēt atzarus vai tagus
|
||||||
branches=Atzari
|
branches=Atzari
|
||||||
tags=Tagi
|
tags=Tagi
|
||||||
issues=Problēmas
|
issues=Problēmas
|
||||||
|
@ -485,7 +485,7 @@ issues.label_deletion=Etiķetes dzēšana
|
||||||
issues.label_deletion_desc=Dzēšot šo etiķeti, tā tiks noņemta no visām saistītajām problēmām. Vai vēlaties turpināt?
|
issues.label_deletion_desc=Dzēšot šo etiķeti, tā tiks noņemta no visām saistītajām problēmām. Vai vēlaties turpināt?
|
||||||
issues.label_deletion_success=Etiķete tika veiksmīgi izdzēsta!
|
issues.label_deletion_success=Etiķete tika veiksmīgi izdzēsta!
|
||||||
|
|
||||||
pulls.new=New Pull Request
|
pulls.new=Jauns izmaiņu pieprasījums
|
||||||
pulls.compare_changes=Salīdzināt izmaiņas
|
pulls.compare_changes=Salīdzināt izmaiņas
|
||||||
pulls.compare_changes_desc=Salīdzināt divus atzarus un izveidot izmaiņu pieprasījumu.
|
pulls.compare_changes_desc=Salīdzināt divus atzarus un izveidot izmaiņu pieprasījumu.
|
||||||
pulls.compare_base=pamata
|
pulls.compare_base=pamata
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=Atskaites punkta dzēšana
|
||||||
milestones.deletion_desc=Dzēšot šo atskaites punktu tiks noņemta arī saistītā informācija no problēmu ziņojumiem. Vai vēlaties turpināt?
|
milestones.deletion_desc=Dzēšot šo atskaites punktu tiks noņemta arī saistītā informācija no problēmu ziņojumiem. Vai vēlaties turpināt?
|
||||||
milestones.deletion_success=Atskaites punkts tika veiksmīgi izdzēsts!
|
milestones.deletion_success=Atskaites punkts tika veiksmīgi izdzēsts!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Iestatījumi
|
settings=Iestatījumi
|
||||||
settings.options=Opcijas
|
settings.options=Opcijas
|
||||||
settings.collaboration=Sadarbība
|
settings.collaboration=Sadarbība
|
||||||
|
@ -566,7 +582,7 @@ settings.confirm_delete=Apstiprināt dzēšanu
|
||||||
settings.add_collaborator=Pievienot jaunu līdzstrādnieku
|
settings.add_collaborator=Pievienot jaunu līdzstrādnieku
|
||||||
settings.add_collaborator_success=Jauns līdzstrādnieks ir pievienots.
|
settings.add_collaborator_success=Jauns līdzstrādnieks ir pievienots.
|
||||||
settings.remove_collaborator_success=Līdzstrādnieks tika noņemts.
|
settings.remove_collaborator_success=Līdzstrādnieks tika noņemts.
|
||||||
settings.search_user_placeholder=Search user...
|
settings.search_user_placeholder=Meklēt lietotāju...
|
||||||
settings.user_is_org_member=Lietotājs ir organizācijas biedrs, kas nevar tikt pievienots kā līdzstrādnieks.
|
settings.user_is_org_member=Lietotājs ir organizācijas biedrs, kas nevar tikt pievienots kā līdzstrādnieks.
|
||||||
settings.add_webhook=Pievienot tīmekļa āķi
|
settings.add_webhook=Pievienot tīmekļa āķi
|
||||||
settings.hooks_desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikomiem, kas notiek Git servisā. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Lai uzzinātu sīkāk skatieties <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
|
settings.hooks_desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikomiem, kas notiek Git servisā. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Lai uzzinātu sīkāk skatieties <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Domēns
|
||||||
settings.slack_channel=Kanāls
|
settings.slack_channel=Kanāls
|
||||||
settings.deploy_keys=Izvietot atslēgas
|
settings.deploy_keys=Izvietot atslēgas
|
||||||
settings.add_deploy_key=Pievienot izvietošanas atslēgu
|
settings.add_deploy_key=Pievienot izvietošanas atslēgu
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Nav pievienota neviena izvietošanas atslēga.
|
settings.no_deploy_keys=Nav pievienota neviena izvietošanas atslēga.
|
||||||
settings.title=Virsraksts
|
settings.title=Virsraksts
|
||||||
settings.deploy_key_content=Saturs
|
settings.deploy_key_content=Saturs
|
||||||
|
@ -639,28 +656,28 @@ release.stable=Stabila
|
||||||
release.edit=labot
|
release.edit=labot
|
||||||
release.ahead=<strong>%d</strong> revīzijas atzarā %s kopš šī laidiena
|
release.ahead=<strong>%d</strong> revīzijas atzarā %s kopš šī laidiena
|
||||||
release.source_code=Izejas kods
|
release.source_code=Izejas kods
|
||||||
release.new_subheader=Publish releases to iterate product.
|
release.new_subheader=Publicējiet laidienus, lai veiktu produkta iterācijas.
|
||||||
release.edit_subheader=Detailed change log can help users understand what has been improved.
|
release.edit_subheader=Detalizēts žurnāls var palīdzēt lietotājiem saprast, kas tika uzlabots.
|
||||||
release.tag_name=Taga nosaukums
|
release.tag_name=Taga nosaukums
|
||||||
release.target=Mērķis
|
release.target=Mērķis
|
||||||
release.tag_helper=Publicējot, izvēlieties esošu vai izveidojiet jaunu tagu.
|
release.tag_helper=Publicējot, izvēlieties esošu vai izveidojiet jaunu tagu.
|
||||||
release.title=Title
|
release.title=Virsraksts
|
||||||
release.content=Content
|
release.content=Saturs
|
||||||
release.write=Rakstīt
|
release.write=Rakstīt
|
||||||
release.preview=Priekšskatītījums
|
release.preview=Priekšskatītījums
|
||||||
release.loading=Notiek ielāde...
|
release.loading=Notiek ielāde...
|
||||||
release.prerelease_desc=Šī ir pirmslaidiena versija
|
release.prerelease_desc=Šī ir pirmslaidiena versija
|
||||||
release.prerelease_helper=Tiks norādīts, ka šis laidiens nav gatavs lietošanai produkcijas režīmā.
|
release.prerelease_helper=Tiks norādīts, ka šis laidiens nav gatavs lietošanai produkcijas režīmā.
|
||||||
release.cancel=Cancel
|
release.cancel=Atcelt
|
||||||
release.publish=Publicēt laidienu
|
release.publish=Publicēt laidienu
|
||||||
release.save_draft=Saglabāt melnrakstu
|
release.save_draft=Saglabāt melnrakstu
|
||||||
release.edit_release=Labot laidienu
|
release.edit_release=Labot laidienu
|
||||||
release.delete_release=Delete This Release
|
release.delete_release=Dzēst šo laidienu
|
||||||
release.deletion=Release Deletion
|
release.deletion=Laidiena dzēšana
|
||||||
release.deletion_desc=Delete this release will delete corresponding Git tag. Do you want to continue?
|
release.deletion_desc=Dzēšot šo laidienu tiks dzēsts arī atbilstošs Git tags. Vai vēlaties turpināt?
|
||||||
release.deletion_success=Release has been deleted successfully!
|
release.deletion_success=Laidiens tika veiksmīgi dzēsts!
|
||||||
release.tag_name_already_exist=Laidiens ar šādu taga nosaukumu jau eksistē.
|
release.tag_name_already_exist=Laidiens ar šādu taga nosaukumu jau eksistē.
|
||||||
release.downloads=Downloads
|
release.downloads=Lejupielādes
|
||||||
|
|
||||||
[org]
|
[org]
|
||||||
org_name_holder=Organizācijas nosaukums
|
org_name_holder=Organizācijas nosaukums
|
||||||
|
@ -701,17 +718,17 @@ settings.delete_org_title=Organizācijas dzēšana
|
||||||
settings.delete_org_desc=Šī organizācija tiks pilnībā izdzēsta, vai vēlaties turpināt?
|
settings.delete_org_desc=Šī organizācija tiks pilnībā izdzēsta, vai vēlaties turpināt?
|
||||||
settings.hooks_desc=Pievienot tīmekļa āķus, kas nostrādās <strong>visiem repozitorijiem</strong> šajā organizācijā.
|
settings.hooks_desc=Pievienot tīmekļa āķus, kas nostrādās <strong>visiem repozitorijiem</strong> šajā organizācijā.
|
||||||
|
|
||||||
members.membership_visibility=Membership Visibility:
|
members.membership_visibility=Dalībnieka redzamība:
|
||||||
members.public=Publisks
|
members.public=Publisks
|
||||||
members.public_helper=padarīt privātu
|
members.public_helper=padarīt privātu
|
||||||
members.private=Privāts
|
members.private=Privāts
|
||||||
members.private_helper=padarīt publisku
|
members.private_helper=padarīt publisku
|
||||||
members.member_role=Member Role:
|
members.member_role=Dalībnieka loma:
|
||||||
members.owner=Īpašnieks
|
members.owner=Īpašnieks
|
||||||
members.member=Biedri
|
members.member=Biedri
|
||||||
members.remove=Noņemt
|
members.remove=Noņemt
|
||||||
members.leave=Atstāt
|
members.leave=Atstāt
|
||||||
members.invite_desc=Add a new member to %s:
|
members.invite_desc=Pievienot jaunu dalībnieku pie %s:
|
||||||
members.invite_now=Uzaicināt tagad
|
members.invite_now=Uzaicināt tagad
|
||||||
|
|
||||||
teams.join=Pievienoties
|
teams.join=Pievienoties
|
||||||
|
@ -736,7 +753,7 @@ teams.read_permission_desc=Šai komandai ir <strong>lasīšanas</strong> tiesīb
|
||||||
teams.write_permission_desc=Šai komandai ir <strong>rakstīšanas</strong> tiesības: dalībnieki var lasīt un nosūtīt izmaiņas repozitorijiem.
|
teams.write_permission_desc=Šai komandai ir <strong>rakstīšanas</strong> tiesības: dalībnieki var lasīt un nosūtīt izmaiņas repozitorijiem.
|
||||||
teams.admin_permission_desc=Šai komandai ir <strong>administratora</strong> tiesības: dalībnieki var lasīt, rakstīt un pievienot citus dalībniekus komandas repozitorijiem.
|
teams.admin_permission_desc=Šai komandai ir <strong>administratora</strong> tiesības: dalībnieki var lasīt, rakstīt un pievienot citus dalībniekus komandas repozitorijiem.
|
||||||
teams.repositories=Komandas repozitoriji
|
teams.repositories=Komandas repozitoriji
|
||||||
teams.search_repo_placeholder=Search repository...
|
teams.search_repo_placeholder=Meklēt repozitorijā...
|
||||||
teams.add_team_repository=Pievienot komandas repozitoriju
|
teams.add_team_repository=Pievienot komandas repozitoriju
|
||||||
teams.remove_repo=Noņemt
|
teams.remove_repo=Noņemt
|
||||||
teams.add_nonexistent_repo=Repozitorijs, kuram Jūs mēģinat pievienot neeksistē, sākumā izveidojiet to.
|
teams.add_nonexistent_repo=Repozitorijs, kuram Jūs mēģinat pievienot neeksistē, sākumā izveidojiet to.
|
||||||
|
@ -767,8 +784,8 @@ dashboard.delete_inactivate_accounts=Dzēst visus neaktīvos kontus
|
||||||
dashboard.delete_inactivate_accounts_success=Visi neaktīvie kotni tika veiksmīgi izdzēsti.
|
dashboard.delete_inactivate_accounts_success=Visi neaktīvie kotni tika veiksmīgi izdzēsti.
|
||||||
dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus
|
dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus
|
||||||
dashboard.delete_repo_archives_success=Visu repozitoriju arhīvi tika veiksmīgi izdzēsti.
|
dashboard.delete_repo_archives_success=Visu repozitoriju arhīvi tika veiksmīgi izdzēsti.
|
||||||
dashboard.delete_missing_repos=Delete all repository records that lost Git files
|
dashboard.delete_missing_repos=Dzēst visus repozitorija ierakstus, kas zaudēja Git failus
|
||||||
dashboard.delete_missing_repos_success=All repository records that lost Git files have been deleted successfully.
|
dashboard.delete_missing_repos_success=Visi repozitorija ieraksti, kas zaudēja Git failus tika veiksmīgi dzēsti.
|
||||||
dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
|
dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
|
||||||
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
|
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
|
||||||
dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_keys' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
|
dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_keys' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=Mijlpaal verwijderen
|
||||||
milestones.deletion_desc=Het verwijderen van dit label zal alle informatie in de gerelateerde problemen verwijderen. Wilt u doorgaan?
|
milestones.deletion_desc=Het verwijderen van dit label zal alle informatie in de gerelateerde problemen verwijderen. Wilt u doorgaan?
|
||||||
milestones.deletion_success=Mijlpaal is met succes verwijderd!
|
milestones.deletion_success=Mijlpaal is met succes verwijderd!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Instellingen
|
settings=Instellingen
|
||||||
settings.options=Opties
|
settings.options=Opties
|
||||||
settings.collaboration=Samenwerking
|
settings.collaboration=Samenwerking
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Slack domein
|
||||||
settings.slack_channel=Slack kanaal
|
settings.slack_channel=Slack kanaal
|
||||||
settings.deploy_keys=Installeer sleutels
|
settings.deploy_keys=Installeer sleutels
|
||||||
settings.add_deploy_key=Toevoegen deploy sleutel
|
settings.add_deploy_key=Toevoegen deploy sleutel
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=U hebt nog geen deploy sleutels toegevoegd.
|
settings.no_deploy_keys=U hebt nog geen deploy sleutels toegevoegd.
|
||||||
settings.title=Titel
|
settings.title=Titel
|
||||||
settings.deploy_key_content=Inhoud
|
settings.deploy_key_content=Inhoud
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=Milestone Deletion
|
||||||
milestones.deletion_desc=Delete this milestone will remove its information in all related issues. Do you want to continue?
|
milestones.deletion_desc=Delete this milestone will remove its information in all related issues. Do you want to continue?
|
||||||
milestones.deletion_success=Kamień milowy został usunięty pomyślnie!
|
milestones.deletion_success=Kamień milowy został usunięty pomyślnie!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Ustawienia
|
settings=Ustawienia
|
||||||
settings.options=Opcje
|
settings.options=Opcje
|
||||||
settings.collaboration=Współpraca
|
settings.collaboration=Współpraca
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Domena
|
||||||
settings.slack_channel=Kanał
|
settings.slack_channel=Kanał
|
||||||
settings.deploy_keys=Klucze wdrożeniowe
|
settings.deploy_keys=Klucze wdrożeniowe
|
||||||
settings.add_deploy_key=Add Deploy Key
|
settings.add_deploy_key=Add Deploy Key
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=You haven't added any deploy key.
|
settings.no_deploy_keys=You haven't added any deploy key.
|
||||||
settings.title=Tytuł
|
settings.title=Tytuł
|
||||||
settings.deploy_key_content=Treść
|
settings.deploy_key_content=Treść
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
app_desc=Um serviço de Git auto-hospedado e amigável escrito em Go
|
app_desc=Um serviço de Git auto-hospedado e amigável escrito em Go
|
||||||
|
|
||||||
home=Página Inicial
|
home=Página Inicial
|
||||||
dashboard=Painel de controle
|
dashboard=Página Inicial
|
||||||
explore=Explorar
|
explore=Explorar
|
||||||
help=Ajuda
|
help=Ajuda
|
||||||
sign_in=Entrar
|
sign_in=Entrar
|
||||||
|
@ -164,7 +164,7 @@ activate_account=Por favor, ative sua conta
|
||||||
activate_email=Verifique seu endereço de e-mail
|
activate_email=Verifique seu endereço de e-mail
|
||||||
reset_password=Resetar sua senha
|
reset_password=Resetar sua senha
|
||||||
register_success=Registrado com sucesso. Bem vindo
|
register_success=Registrado com sucesso. Bem vindo
|
||||||
register_notify=Welcome on board
|
register_notify=Bem-vindo a bordo
|
||||||
|
|
||||||
[modal]
|
[modal]
|
||||||
yes=Sim
|
yes=Sim
|
||||||
|
@ -352,8 +352,8 @@ auto_init=Inicializar este repositório com os arquivos selecionados e modelo
|
||||||
create_repo=Criar Repositório
|
create_repo=Criar Repositório
|
||||||
default_branch=Branch padrão
|
default_branch=Branch padrão
|
||||||
mirror_interval=Intervalo de Espelho (hora)
|
mirror_interval=Intervalo de Espelho (hora)
|
||||||
watchers=Watchers
|
watchers=Observadores
|
||||||
stargazers=Stargazers
|
stargazers=Usuários que estrelaram
|
||||||
forks=Forks
|
forks=Forks
|
||||||
|
|
||||||
form.name_reserved=O nome de repositório '%s' não pode ser usado.
|
form.name_reserved=O nome de repositório '%s' não pode ser usado.
|
||||||
|
@ -367,7 +367,7 @@ migrate.clone_address=Endereço de Clone
|
||||||
migrate.clone_address_desc=Isto pode ser uma URL de HTTP/HTTPS/GIT ou um caminho de diretório local.
|
migrate.clone_address_desc=Isto pode ser uma URL de HTTP/HTTPS/GIT ou um caminho de diretório local.
|
||||||
migrate.permission_denied=Você não pode importar repositórios locais.
|
migrate.permission_denied=Você não pode importar repositórios locais.
|
||||||
migrate.invalid_local_path=Caminho local inválido, não existe ou não é um diretório.
|
migrate.invalid_local_path=Caminho local inválido, não existe ou não é um diretório.
|
||||||
migrate.failed=Migration failed: %v
|
migrate.failed=Migração falhou: %v
|
||||||
|
|
||||||
forked_from=forkado de
|
forked_from=forkado de
|
||||||
fork_from_self=Você não pode criar fork de um repositório que já é seu!
|
fork_from_self=Você não pode criar fork de um repositório que já é seu!
|
||||||
|
@ -390,7 +390,7 @@ repo_is_empty=Este repositório está vazio, por favor volte mais tarde!
|
||||||
|
|
||||||
branch=Branch
|
branch=Branch
|
||||||
tree=Árvore
|
tree=Árvore
|
||||||
filter_branch_and_tag=Filter branch or tag
|
filter_branch_and_tag=Filtrar branch ou tag
|
||||||
branches=Branches
|
branches=Branches
|
||||||
tags=Tags
|
tags=Tags
|
||||||
issues=Problemas
|
issues=Problemas
|
||||||
|
@ -485,7 +485,7 @@ issues.label_deletion=Exclusão de etiqueta
|
||||||
issues.label_deletion_desc=Excluir uma etiqueta a retirará de todos os problemas que ela estiver marcando. Quer mesmo continuar?
|
issues.label_deletion_desc=Excluir uma etiqueta a retirará de todos os problemas que ela estiver marcando. Quer mesmo continuar?
|
||||||
issues.label_deletion_success=A etiqueta foi excluída com sucesso!
|
issues.label_deletion_success=A etiqueta foi excluída com sucesso!
|
||||||
|
|
||||||
pulls.new=New Pull Request
|
pulls.new=Novo Pull Request
|
||||||
pulls.compare_changes=Comparar mudanças
|
pulls.compare_changes=Comparar mudanças
|
||||||
pulls.compare_changes_desc=Comparar os dois branches e criar pull request com as mudanças.
|
pulls.compare_changes_desc=Comparar os dois branches e criar pull request com as mudanças.
|
||||||
pulls.compare_base=base
|
pulls.compare_base=base
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=Exclusão de marco
|
||||||
milestones.deletion_desc=Excluir este marco removerá a informação dele em todos os problemas aos quais estiver associado. Você quer mesmo continuar?
|
milestones.deletion_desc=Excluir este marco removerá a informação dele em todos os problemas aos quais estiver associado. Você quer mesmo continuar?
|
||||||
milestones.deletion_success=Marco excluído com sucesso!
|
milestones.deletion_success=Marco excluído com sucesso!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Configurações
|
settings=Configurações
|
||||||
settings.options=Opções
|
settings.options=Opções
|
||||||
settings.collaboration=Colaboração
|
settings.collaboration=Colaboração
|
||||||
|
@ -566,7 +582,7 @@ settings.confirm_delete=Confirmar Deleção
|
||||||
settings.add_collaborator=Adicionar um Novo Colaborador
|
settings.add_collaborator=Adicionar um Novo Colaborador
|
||||||
settings.add_collaborator_success=O novo colaborador foi adicionado.
|
settings.add_collaborator_success=O novo colaborador foi adicionado.
|
||||||
settings.remove_collaborator_success=O colaborador foi removido.
|
settings.remove_collaborator_success=O colaborador foi removido.
|
||||||
settings.search_user_placeholder=Search user...
|
settings.search_user_placeholder=Pesquisar usuário...
|
||||||
settings.user_is_org_member=O usuário é um membro da organização que não pode ser adicionado como um colaborador.
|
settings.user_is_org_member=O usuário é um membro da organização que não pode ser adicionado como um colaborador.
|
||||||
settings.add_webhook=Adicionar Webhook
|
settings.add_webhook=Adicionar Webhook
|
||||||
settings.hooks_desc=Hooks da web ou Webhooks permitem serviços externos serem notificados quando certos eventos acontecem no Gogs. Quando acontecem os eventos especificados, enviaremos uma solicitação POST para cada uma das URLs que você fornecer. Saiba mais no nosso <a target="_blank" href="%s"> Guia de Webhooks</a>.
|
settings.hooks_desc=Hooks da web ou Webhooks permitem serviços externos serem notificados quando certos eventos acontecem no Gogs. Quando acontecem os eventos especificados, enviaremos uma solicitação POST para cada uma das URLs que você fornecer. Saiba mais no nosso <a target="_blank" href="%s"> Guia de Webhooks</a>.
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Domínio
|
||||||
settings.slack_channel=Canal
|
settings.slack_channel=Canal
|
||||||
settings.deploy_keys=Chaves de Deploy
|
settings.deploy_keys=Chaves de Deploy
|
||||||
settings.add_deploy_key=Nova chave
|
settings.add_deploy_key=Nova chave
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Você ainda não adicionou chaves para implantação de software.
|
settings.no_deploy_keys=Você ainda não adicionou chaves para implantação de software.
|
||||||
settings.title=Título
|
settings.title=Título
|
||||||
settings.deploy_key_content=Conteúdo da chave
|
settings.deploy_key_content=Conteúdo da chave
|
||||||
|
@ -639,26 +656,26 @@ release.stable=Estável
|
||||||
release.edit=editar
|
release.edit=editar
|
||||||
release.ahead=<strong>%d</strong> commits para %s depois desta versão
|
release.ahead=<strong>%d</strong> commits para %s depois desta versão
|
||||||
release.source_code=Código fonte
|
release.source_code=Código fonte
|
||||||
release.new_subheader=Publish releases to iterate product.
|
release.new_subheader=Publicar versões para iterar o produto.
|
||||||
release.edit_subheader=Detailed change log can help users understand what has been improved.
|
release.edit_subheader=Um changelog detalhado ajuda os usuários a entenderem o que foi melhorado.
|
||||||
release.tag_name=Nome da tag
|
release.tag_name=Nome da tag
|
||||||
release.target=Destino
|
release.target=Destino
|
||||||
release.tag_helper=Escolha uma tag existente, ou crie uma nova tag em publicar.
|
release.tag_helper=Escolha uma tag existente, ou crie uma nova tag em publicar.
|
||||||
release.title=Title
|
release.title=Título
|
||||||
release.content=Content
|
release.content=Conteúdo
|
||||||
release.write=Escrever
|
release.write=Escrever
|
||||||
release.preview=Visualizar
|
release.preview=Visualizar
|
||||||
release.loading=Carregando...
|
release.loading=Carregando...
|
||||||
release.prerelease_desc=Esta é uma versão prévia
|
release.prerelease_desc=Esta é uma versão prévia
|
||||||
release.prerelease_helper=Vou salientar que esta versão é identificada como não pronta para produção.
|
release.prerelease_helper=Vou salientar que esta versão é identificada como não pronta para produção.
|
||||||
release.cancel=Cancel
|
release.cancel=Cancelar
|
||||||
release.publish=Publicar Versão
|
release.publish=Publicar Versão
|
||||||
release.save_draft=Salvar Rascunho
|
release.save_draft=Salvar Rascunho
|
||||||
release.edit_release=Editar Versão
|
release.edit_release=Editar Versão
|
||||||
release.delete_release=Delete This Release
|
release.delete_release=Deletar esta versão
|
||||||
release.deletion=Release Deletion
|
release.deletion=Deleção de versão
|
||||||
release.deletion_desc=Delete this release will delete corresponding Git tag. Do you want to continue?
|
release.deletion_desc=Deletar esta versão vai deletar a tag do git correspondente. Você deseja continuar?
|
||||||
release.deletion_success=Release has been deleted successfully!
|
release.deletion_success=A versão foi deletada com sucesso!
|
||||||
release.tag_name_already_exist=Já existiu versão com esse nome de tag.
|
release.tag_name_already_exist=Já existiu versão com esse nome de tag.
|
||||||
release.downloads=Downloads
|
release.downloads=Downloads
|
||||||
|
|
||||||
|
@ -701,17 +718,17 @@ settings.delete_org_title=Deleção da Organização
|
||||||
settings.delete_org_desc=Esta organização será deletada permanentemente, você quer continuar?
|
settings.delete_org_desc=Esta organização será deletada permanentemente, você quer continuar?
|
||||||
settings.hooks_desc=Adicionar Webhooks que serão acionados para <strong>todos os repositórios</strong> dessa organização.
|
settings.hooks_desc=Adicionar Webhooks que serão acionados para <strong>todos os repositórios</strong> dessa organização.
|
||||||
|
|
||||||
members.membership_visibility=Membership Visibility:
|
members.membership_visibility=Visibilidade da associação:
|
||||||
members.public=Público
|
members.public=Público
|
||||||
members.public_helper=tornar privado
|
members.public_helper=tornar privado
|
||||||
members.private=Privado
|
members.private=Privado
|
||||||
members.private_helper=torar público
|
members.private_helper=torar público
|
||||||
members.member_role=Member Role:
|
members.member_role=Categoria de membro:
|
||||||
members.owner=Dono
|
members.owner=Dono
|
||||||
members.member=Membro
|
members.member=Membro
|
||||||
members.remove=Remover
|
members.remove=Remover
|
||||||
members.leave=Sair
|
members.leave=Sair
|
||||||
members.invite_desc=Add a new member to %s:
|
members.invite_desc=Adicionar novo membro em %s:
|
||||||
members.invite_now=Convidar Agora
|
members.invite_now=Convidar Agora
|
||||||
|
|
||||||
teams.join=Juntar-se
|
teams.join=Juntar-se
|
||||||
|
@ -736,7 +753,7 @@ teams.read_permission_desc=Essa equipe concede acesso para <strong>Leitura</stro
|
||||||
teams.write_permission_desc=Esta equipe concede acesso para <strong>escrita</strong>: Membros podem ler e fazer push para os repositórios da equipe.
|
teams.write_permission_desc=Esta equipe concede acesso para <strong>escrita</strong>: Membros podem ler e fazer push para os repositórios da equipe.
|
||||||
teams.admin_permission_desc=Esta equipe concede acesso de <strong>Administrador</strong>: Membros podem ler, fazer push e adicionar outros colaboradores para os repositórios da equipe.
|
teams.admin_permission_desc=Esta equipe concede acesso de <strong>Administrador</strong>: Membros podem ler, fazer push e adicionar outros colaboradores para os repositórios da equipe.
|
||||||
teams.repositories=Repositórios da Equipe
|
teams.repositories=Repositórios da Equipe
|
||||||
teams.search_repo_placeholder=Search repository...
|
teams.search_repo_placeholder=Pesquisar repositório...
|
||||||
teams.add_team_repository=Adicionar Repositório da Equipe
|
teams.add_team_repository=Adicionar Repositório da Equipe
|
||||||
teams.remove_repo=Remover
|
teams.remove_repo=Remover
|
||||||
teams.add_nonexistent_repo=O repositório que você está tentando adicionar não existe, por favor, crie-o primeiro.
|
teams.add_nonexistent_repo=O repositório que você está tentando adicionar não existe, por favor, crie-o primeiro.
|
||||||
|
@ -767,8 +784,8 @@ dashboard.delete_inactivate_accounts=Excluir todas as contas inativas
|
||||||
dashboard.delete_inactivate_accounts_success=Todas as contas inativas foram excluídas com sucesso.
|
dashboard.delete_inactivate_accounts_success=Todas as contas inativas foram excluídas com sucesso.
|
||||||
dashboard.delete_repo_archives=Excluir todos os arquivos dos repositórios
|
dashboard.delete_repo_archives=Excluir todos os arquivos dos repositórios
|
||||||
dashboard.delete_repo_archives_success=Todos os arquivos dos repositórios foram excluídos com sucesso.
|
dashboard.delete_repo_archives_success=Todos os arquivos dos repositórios foram excluídos com sucesso.
|
||||||
dashboard.delete_missing_repos=Delete all repository records that lost Git files
|
dashboard.delete_missing_repos=Deletar todos os repositórios que perderam arquivos do git
|
||||||
dashboard.delete_missing_repos_success=All repository records that lost Git files have been deleted successfully.
|
dashboard.delete_missing_repos_success=Todos os registros de repositórios que perderam arquivos do git foram deletados com sucesso.
|
||||||
dashboard.git_gc_repos=Fazer coleta de lixo nos repositórios
|
dashboard.git_gc_repos=Fazer coleta de lixo nos repositórios
|
||||||
dashboard.git_gc_repos_success=Em todos repositórios, a coleta de lixo foi realizada com sucesso.
|
dashboard.git_gc_repos_success=Em todos repositórios, a coleta de lixo foi realizada com sucesso.
|
||||||
dashboard.resync_all_sshkeys=Reescrever o arquivo '.ssh/authorized_keys' (atenção: chaves que não sejam do Gogs serão perdidas)
|
dashboard.resync_all_sshkeys=Reescrever o arquivo '.ssh/authorized_keys' (atenção: chaves que não sejam do Gogs serão perdidas)
|
||||||
|
|
|
@ -353,7 +353,7 @@ create_repo=Создать репозиторий
|
||||||
default_branch=Ветка по умолчанию
|
default_branch=Ветка по умолчанию
|
||||||
mirror_interval=Интервал зеркалирования (час)
|
mirror_interval=Интервал зеркалирования (час)
|
||||||
watchers=Наблюдатели
|
watchers=Наблюдатели
|
||||||
stargazers=Stargazers
|
stargazers=Звездочеты
|
||||||
forks=Форки
|
forks=Форки
|
||||||
|
|
||||||
form.name_reserved=Имя репозитория '%s' зарезервировано.
|
form.name_reserved=Имя репозитория '%s' зарезервировано.
|
||||||
|
@ -367,7 +367,7 @@ migrate.clone_address=Скопировать адрес
|
||||||
migrate.clone_address_desc=Это может быть HTTP/HTTPS/GIT адрес или локальный путь на сервере.
|
migrate.clone_address_desc=Это может быть HTTP/HTTPS/GIT адрес или локальный путь на сервере.
|
||||||
migrate.permission_denied=У вас нет прав на импорт локальных репозиториев.
|
migrate.permission_denied=У вас нет прав на импорт локальных репозиториев.
|
||||||
migrate.invalid_local_path=Недопустимый локальный путь. Возможно он не существует или является не папкой.
|
migrate.invalid_local_path=Недопустимый локальный путь. Возможно он не существует или является не папкой.
|
||||||
migrate.failed=Migration failed: %v
|
migrate.failed=Миграция не удалась: %v
|
||||||
|
|
||||||
forked_from=форк от
|
forked_from=форк от
|
||||||
fork_from_self=Вы не можете форкнуть репозитарий, так как Вы уже его владелец!
|
fork_from_self=Вы не можете форкнуть репозитарий, так как Вы уже его владелец!
|
||||||
|
@ -390,7 +390,7 @@ repo_is_empty=Этот репозиторий пуст, пожалуйста, в
|
||||||
|
|
||||||
branch=Ветка
|
branch=Ветка
|
||||||
tree=Дерево
|
tree=Дерево
|
||||||
filter_branch_and_tag=Filter branch or tag
|
filter_branch_and_tag=Фильтр по ветке или тегу
|
||||||
branches=Ветки
|
branches=Ветки
|
||||||
tags=Метки
|
tags=Метки
|
||||||
issues=Обсуждения
|
issues=Обсуждения
|
||||||
|
@ -535,6 +535,22 @@ milestones.deletion=Удаление контрольной точки
|
||||||
milestones.deletion_desc=Удаление этой контрольной точки приведет с удалению всей информации, во всех вопросах (Issues). Вы действительно хотите продолжить?
|
milestones.deletion_desc=Удаление этой контрольной точки приведет с удалению всей информации, во всех вопросах (Issues). Вы действительно хотите продолжить?
|
||||||
milestones.deletion_success=Контрольная точка успешно удалена!
|
milestones.deletion_success=Контрольная точка успешно удалена!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=Настройки
|
settings=Настройки
|
||||||
settings.options=Опции
|
settings.options=Опции
|
||||||
settings.collaboration=Сотрудничество
|
settings.collaboration=Сотрудничество
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=Домен
|
||||||
settings.slack_channel=Канал
|
settings.slack_channel=Канал
|
||||||
settings.deploy_keys=Ключи развертывания
|
settings.deploy_keys=Ключи развертывания
|
||||||
settings.add_deploy_key=Добавить ключ развертывания
|
settings.add_deploy_key=Добавить ключ развертывания
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=Вы не добавляли ключи развертывания.
|
settings.no_deploy_keys=Вы не добавляли ключи развертывания.
|
||||||
settings.title=Заголовок
|
settings.title=Заголовок
|
||||||
settings.deploy_key_content=Содержимое
|
settings.deploy_key_content=Содержимое
|
||||||
|
@ -639,13 +656,13 @@ release.stable=Стабильный
|
||||||
release.edit=Редактировать
|
release.edit=Редактировать
|
||||||
release.ahead=<strong>%d</strong> коммитов %s начиная с этого релиза
|
release.ahead=<strong>%d</strong> коммитов %s начиная с этого релиза
|
||||||
release.source_code=Исходный код
|
release.source_code=Исходный код
|
||||||
release.new_subheader=Publish releases to iterate product.
|
release.new_subheader=Публикуйте релизы для итерации продукта.
|
||||||
release.edit_subheader=Detailed change log can help users understand what has been improved.
|
release.edit_subheader=Подробный журнал изменений может помочь пользователям понять, что было улучшено.
|
||||||
release.tag_name=Имя тега
|
release.tag_name=Имя тега
|
||||||
release.target=Цель
|
release.target=Цель
|
||||||
release.tag_helper=Выберите существующий тег, или создайте новый.
|
release.tag_helper=Выберите существующий тег, или создайте новый.
|
||||||
release.title=Title
|
release.title=Заголовок
|
||||||
release.content=Content
|
release.content=Содержимое
|
||||||
release.write=Запись
|
release.write=Запись
|
||||||
release.preview=Предварительный просмотр
|
release.preview=Предварительный просмотр
|
||||||
release.loading=Загрузка...
|
release.loading=Загрузка...
|
||||||
|
@ -655,10 +672,10 @@ release.cancel=Отменить
|
||||||
release.publish=Опубликовать релиз
|
release.publish=Опубликовать релиз
|
||||||
release.save_draft=Сохранить черновик
|
release.save_draft=Сохранить черновик
|
||||||
release.edit_release=Редактировать релиз
|
release.edit_release=Редактировать релиз
|
||||||
release.delete_release=Delete This Release
|
release.delete_release=Удалить этот релиз
|
||||||
release.deletion=Release Deletion
|
release.deletion=Удаление релиза
|
||||||
release.deletion_desc=Delete this release will delete corresponding Git tag. Do you want to continue?
|
release.deletion_desc=Удаление данного релиза так же удалит все относящиеся к нему Git теги. Продолжить?
|
||||||
release.deletion_success=Release has been deleted successfully!
|
release.deletion_success=Релиз был успешно удален!
|
||||||
release.tag_name_already_exist=Релиз с этим именем тега уже существует.
|
release.tag_name_already_exist=Релиз с этим именем тега уже существует.
|
||||||
release.downloads=Загрузки
|
release.downloads=Загрузки
|
||||||
|
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=删除里程碑操作
|
||||||
milestones.deletion_desc=删除该里程碑将会移除所有工单中相关的信息。是否继续?
|
milestones.deletion_desc=删除该里程碑将会移除所有工单中相关的信息。是否继续?
|
||||||
milestones.deletion_success=里程碑删除成功!
|
milestones.deletion_success=里程碑删除成功!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=欢迎使用 Wiki!
|
||||||
|
wiki.welcome_desc=Wiki 是用于共同协作文档的地方,清晰的文档可以帮助其他人深入了解您的项目。
|
||||||
|
wiki.create_first_page=创建第一个页面
|
||||||
|
wiki.page=页面
|
||||||
|
wiki.filter_page=过滤页面
|
||||||
|
wiki.new_page=创建新的页面
|
||||||
|
wiki.default_commit_message=关于此次修改的说明(可选)。
|
||||||
|
wiki.save_page=保存页面
|
||||||
|
wiki.last_commit_info=%s 于 %s 修改了此页面
|
||||||
|
wiki.edit_page_button=修改
|
||||||
|
wiki.new_page_button=新的页面
|
||||||
|
wiki.page_already_exists=相同名称的 Wiki 页面已经存在。
|
||||||
|
wiki.pages=所有页面
|
||||||
|
wiki.last_updated=最后更新于 %s
|
||||||
|
|
||||||
settings=仓库设置
|
settings=仓库设置
|
||||||
settings.options=基本设置
|
settings.options=基本设置
|
||||||
settings.collaboration=管理协作者
|
settings.collaboration=管理协作者
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=域名
|
||||||
settings.slack_channel=频道
|
settings.slack_channel=频道
|
||||||
settings.deploy_keys=管理部署密钥
|
settings.deploy_keys=管理部署密钥
|
||||||
settings.add_deploy_key=添加部署密钥
|
settings.add_deploy_key=添加部署密钥
|
||||||
|
settings.deploy_key_desc=部署密钥仅具有只读权限,它在功能上和个人用户的公开密钥有本质区别。
|
||||||
settings.no_deploy_keys=您还没有添加任何部署密钥。
|
settings.no_deploy_keys=您还没有添加任何部署密钥。
|
||||||
settings.title=标题
|
settings.title=标题
|
||||||
settings.deploy_key_content=密钥文本
|
settings.deploy_key_content=密钥文本
|
||||||
|
|
|
@ -535,6 +535,22 @@ milestones.deletion=刪除里程碑
|
||||||
milestones.deletion_desc=刪除該里程碑將會移除所有問題中相關信息。是否繼續?
|
milestones.deletion_desc=刪除該里程碑將會移除所有問題中相關信息。是否繼續?
|
||||||
milestones.deletion_success=里程碑刪除成功!
|
milestones.deletion_success=里程碑刪除成功!
|
||||||
|
|
||||||
|
wiki=Wiki
|
||||||
|
wiki.welcome=Welcome to Wiki!
|
||||||
|
wiki.welcome_desc=Wiki is the place where you would like to document your project together and make it better.
|
||||||
|
wiki.create_first_page=Create the first page
|
||||||
|
wiki.page=Page
|
||||||
|
wiki.filter_page=Filter page
|
||||||
|
wiki.new_page=Create New Page
|
||||||
|
wiki.default_commit_message=Write a note about this update (optional).
|
||||||
|
wiki.save_page=Save Page
|
||||||
|
wiki.last_commit_info=%s edited this page %s
|
||||||
|
wiki.edit_page_button=Edit
|
||||||
|
wiki.new_page_button=New Page
|
||||||
|
wiki.page_already_exists=Wiki page with same name already exists.
|
||||||
|
wiki.pages=Pages
|
||||||
|
wiki.last_updated=Last updated %s
|
||||||
|
|
||||||
settings=倉庫設置
|
settings=倉庫設置
|
||||||
settings.options=基本設置
|
settings.options=基本設置
|
||||||
settings.collaboration=管理協作者
|
settings.collaboration=管理協作者
|
||||||
|
@ -612,6 +628,7 @@ settings.slack_domain=域名
|
||||||
settings.slack_channel=頻道
|
settings.slack_channel=頻道
|
||||||
settings.deploy_keys=管理部署密鑰
|
settings.deploy_keys=管理部署密鑰
|
||||||
settings.add_deploy_key=添加部署密鑰
|
settings.add_deploy_key=添加部署密鑰
|
||||||
|
settings.deploy_key_desc=Deploy key only has read-only access. It is not same as personal account SSH keys.
|
||||||
settings.no_deploy_keys=您還沒有添加任何部署密鑰。
|
settings.no_deploy_keys=您還沒有添加任何部署密鑰。
|
||||||
settings.title=標題
|
settings.title=標題
|
||||||
settings.deploy_key_content=密鑰文本
|
settings.deploy_key_content=密鑰文本
|
||||||
|
|
1956
config.codekit
1956
config.codekit
File diff suppressed because it is too large
Load diff
|
@ -107,6 +107,26 @@ func (err ErrUserHasOrgs) Error() string {
|
||||||
return fmt.Sprintf("user still has membership of organizations [uid: %d]", err.UID)
|
return fmt.Sprintf("user still has membership of organizations [uid: %d]", err.UID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// __ __.__ __ .__
|
||||||
|
// / \ / \__| | _|__|
|
||||||
|
// \ \/\/ / | |/ / |
|
||||||
|
// \ /| | <| |
|
||||||
|
// \__/\ / |__|__|_ \__|
|
||||||
|
// \/ \/
|
||||||
|
|
||||||
|
type ErrWikiAlreadyExist struct {
|
||||||
|
Title string
|
||||||
|
}
|
||||||
|
|
||||||
|
func IsErrWikiAlreadyExist(err error) bool {
|
||||||
|
_, ok := err.(ErrWikiAlreadyExist)
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
func (err ErrWikiAlreadyExist) Error() string {
|
||||||
|
return fmt.Sprintf("wiki page already exists [title: %s]", err.Title)
|
||||||
|
}
|
||||||
|
|
||||||
// __________ ___. .__ .__ ____ __.
|
// __________ ___. .__ .__ ____ __.
|
||||||
// \______ \__ _\_ |__ | | |__| ____ | |/ _|____ ___.__.
|
// \______ \__ _\_ |__ | | |__| ____ | |/ _|____ ___.__.
|
||||||
// | ___/ | \ __ \| | | |/ ___\ | <_/ __ < | |
|
// | ___/ | \ __ \| | | |/ ___\ | <_/ __ < | |
|
||||||
|
|
|
@ -252,7 +252,7 @@ func (pr *PullRequest) testPatch() (err error) {
|
||||||
|
|
||||||
// Checkout base branch.
|
// Checkout base branch.
|
||||||
_, stderr, err := process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(),
|
_, stderr, err := process.ExecDir(-1, pr.BaseRepo.LocalCopyPath(),
|
||||||
fmt.Sprintf("PullRequest.Merge(git checkout): %s", pr.BaseRepo.ID),
|
fmt.Sprintf("PullRequest.Merge(git checkout): %v", pr.BaseRepo.ID),
|
||||||
"git", "checkout", pr.BaseBranch)
|
"git", "checkout", pr.BaseBranch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("git checkout: %s", stderr)
|
return fmt.Errorf("git checkout: %s", stderr)
|
||||||
|
@ -415,12 +415,7 @@ func (pr *PullRequest) UpdatePatch() (err error) {
|
||||||
return fmt.Errorf("GetOwner: %v", err)
|
return fmt.Errorf("GetOwner: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
headRepoPath, err := pr.HeadRepo.RepoPath()
|
headGitRepo, err := git.OpenRepository(pr.HeadRepo.RepoPath())
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("HeadRepo.RepoPath: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
headGitRepo, err := git.OpenRepository(headRepoPath)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("OpenRepository: %v", err)
|
return fmt.Errorf("OpenRepository: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,10 @@ func IsReleaseExist(repoID int64, tagName string) (bool, error) {
|
||||||
return x.Get(&Release{RepoID: repoID, LowerTagName: strings.ToLower(tagName)})
|
return x.Get(&Release{RepoID: repoID, LowerTagName: strings.ToLower(tagName)})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
git.GetVersion()
|
||||||
|
}
|
||||||
|
|
||||||
func createTag(gitRepo *git.Repository, rel *Release) error {
|
func createTag(gitRepo *git.Repository, rel *Release) error {
|
||||||
// Only actual create when publish.
|
// Only actual create when publish.
|
||||||
if !rel.IsDraft {
|
if !rel.IsDraft {
|
||||||
|
@ -175,12 +179,8 @@ func DeleteReleaseByID(id int64) error {
|
||||||
return fmt.Errorf("GetRepositoryByID: %v", err)
|
return fmt.Errorf("GetRepositoryByID: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
repoPath, err := repo.RepoPath()
|
_, stderr, err := process.ExecDir(-1, repo.RepoPath(),
|
||||||
if err != nil {
|
fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
|
||||||
return fmt.Errorf("RepoPath: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, stderr, err := process.ExecDir(-1, repoPath, fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
|
|
||||||
"git", "tag", "-d", rel.TagName)
|
"git", "tag", "-d", rel.TagName)
|
||||||
if err != nil && !strings.Contains(stderr, "not found") {
|
if err != nil && !strings.Contains(stderr, "not found") {
|
||||||
return fmt.Errorf("git tag -d: %v - %s", err, stderr)
|
return fmt.Errorf("git tag -d: %v - %s", err, stderr)
|
||||||
|
|
254
models/repo.go
254
models/repo.go
|
@ -24,11 +24,13 @@ import (
|
||||||
"github.com/Unknwon/cae/zip"
|
"github.com/Unknwon/cae/zip"
|
||||||
"github.com/Unknwon/com"
|
"github.com/Unknwon/com"
|
||||||
"github.com/go-xorm/xorm"
|
"github.com/go-xorm/xorm"
|
||||||
|
"github.com/mcuadros/go-version"
|
||||||
"gopkg.in/ini.v1"
|
"gopkg.in/ini.v1"
|
||||||
|
|
||||||
|
"github.com/gogits/git-shell"
|
||||||
|
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
"github.com/gogits/gogs/modules/bindata"
|
"github.com/gogits/gogs/modules/bindata"
|
||||||
"github.com/gogits/gogs/modules/git"
|
|
||||||
"github.com/gogits/gogs/modules/log"
|
"github.com/gogits/gogs/modules/log"
|
||||||
"github.com/gogits/gogs/modules/process"
|
"github.com/gogits/gogs/modules/process"
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
|
@ -95,19 +97,15 @@ func NewRepoContext() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Git version.
|
// Check Git version.
|
||||||
ver, err := git.GetVersion()
|
gitVer, err := git.Version()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(4, "Fail to get Git version: %v", err)
|
log.Fatal(4, "Fail to get Git version: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
reqVer, err := git.ParseVersion("1.7.1")
|
log.Info("Git Version: %s", gitVer)
|
||||||
if err != nil {
|
if version.Compare("1.7.1", gitVer, ">") {
|
||||||
log.Fatal(4, "Fail to parse required Git version: %v", err)
|
|
||||||
}
|
|
||||||
if ver.LessThan(reqVer) {
|
|
||||||
log.Fatal(4, "Gogs requires Git version greater or equal to 1.7.1")
|
log.Fatal(4, "Gogs requires Git version greater or equal to 1.7.1")
|
||||||
}
|
}
|
||||||
log.Info("Git Version: %s", ver.String())
|
|
||||||
|
|
||||||
// Git requires setting user.name and user.email in order to commit changes.
|
// Git requires setting user.name and user.email in order to commit changes.
|
||||||
for configKey, defaultValue := range map[string]string{"user.name": "Gogs", "user.email": "gogs@fake.local"} {
|
for configKey, defaultValue := range map[string]string{"user.name": "Gogs", "user.email": "gogs@fake.local"} {
|
||||||
|
@ -197,6 +195,25 @@ func (repo *Repository) GetOwner() error {
|
||||||
return repo.getOwner(x)
|
return repo.getOwner(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) mustOwner(e Engine) *User {
|
||||||
|
if err := repo.getOwner(e); err != nil {
|
||||||
|
return &User{
|
||||||
|
Name: "error",
|
||||||
|
FullName: err.Error(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return repo.Owner
|
||||||
|
}
|
||||||
|
|
||||||
|
// MustOwner always returns a valid *User object to avoid
|
||||||
|
// conceptually impossible error handling.
|
||||||
|
// It creates a fake object that contains error deftail
|
||||||
|
// when error occurs.
|
||||||
|
func (repo *Repository) MustOwner() *User {
|
||||||
|
return repo.mustOwner(x)
|
||||||
|
}
|
||||||
|
|
||||||
// GetAssignees returns all users that have write access of repository.
|
// GetAssignees returns all users that have write access of repository.
|
||||||
func (repo *Repository) GetAssignees() (_ []*User, err error) {
|
func (repo *Repository) GetAssignees() (_ []*User, err error) {
|
||||||
if err = repo.GetOwner(); err != nil {
|
if err = repo.GetOwner(); err != nil {
|
||||||
|
@ -253,22 +270,16 @@ func (repo *Repository) GetBaseRepo() (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) repoPath(e Engine) (string, error) {
|
func (repo *Repository) repoPath(e Engine) string {
|
||||||
if err := repo.getOwner(e); err != nil {
|
return RepoPath(repo.mustOwner(e).Name, repo.Name)
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return RepoPath(repo.Owner.Name, repo.Name), nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) RepoPath() (string, error) {
|
func (repo *Repository) RepoPath() string {
|
||||||
return repo.repoPath(x)
|
return repo.repoPath(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) RepoLink() (string, error) {
|
func (repo *Repository) RepoLink() string {
|
||||||
if err := repo.GetOwner(); err != nil {
|
return setting.AppSubUrl + "/" + repo.MustOwner().Name + "/" + repo.Name
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
return setting.AppSubUrl + "/" + repo.Owner.Name + "/" + repo.Name, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) HasAccess(u *User) bool {
|
func (repo *Repository) HasAccess(u *User) bool {
|
||||||
|
@ -305,31 +316,24 @@ func (repo *Repository) LocalCopyPath() string {
|
||||||
return path.Join(setting.AppDataPath, "tmp/local", com.ToStr(repo.ID))
|
return path.Join(setting.AppDataPath, "tmp/local", com.ToStr(repo.ID))
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpdateLocalCopy makes sure the local copy of repository is up-to-date.
|
func updateLocalCopy(repoPath, localPath string) error {
|
||||||
func (repo *Repository) UpdateLocalCopy() error {
|
|
||||||
repoPath, err := repo.RepoPath()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
localPath := repo.LocalCopyPath()
|
|
||||||
if !com.IsExist(localPath) {
|
if !com.IsExist(localPath) {
|
||||||
_, stderr, err := process.Exec(
|
if err := git.Clone(repoPath, localPath); err != nil {
|
||||||
fmt.Sprintf("UpdateLocalCopy(git clone): %s", repoPath), "git", "clone", repoPath, localPath)
|
return fmt.Errorf("Clone: %v", err)
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("git clone: %v - %s", err, stderr)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_, stderr, err := process.ExecDir(-1, localPath,
|
if err := git.Pull(localPath, true); err != nil {
|
||||||
fmt.Sprintf("UpdateLocalCopy(git pull --all): %s", repoPath), "git", "pull", "--all")
|
return fmt.Errorf("Pull: %v", err)
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("git pull: %v - %s", err, stderr)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateLocalCopy makes sure the local copy of repository is up-to-date.
|
||||||
|
func (repo *Repository) UpdateLocalCopy() error {
|
||||||
|
return updateLocalCopy(repo.RepoPath(), repo.LocalCopyPath())
|
||||||
|
}
|
||||||
|
|
||||||
// PatchPath returns corresponding patch file path of repository by given issue ID.
|
// PatchPath returns corresponding patch file path of repository by given issue ID.
|
||||||
func (repo *Repository) PatchPath(index int64) (string, error) {
|
func (repo *Repository) PatchPath(index int64) (string, error) {
|
||||||
if err := repo.GetOwner(); err != nil {
|
if err := repo.GetOwner(); err != nil {
|
||||||
|
@ -374,24 +378,31 @@ type CloneLink struct {
|
||||||
Git string
|
Git string
|
||||||
}
|
}
|
||||||
|
|
||||||
// CloneLink returns clone URLs of repository.
|
func (repo *Repository) cloneLink(isWiki bool) *CloneLink {
|
||||||
func (repo *Repository) CloneLink() (cl CloneLink, err error) {
|
repoName := repo.Name
|
||||||
if err = repo.GetOwner(); err != nil {
|
if isWiki {
|
||||||
return cl, err
|
repoName += ".wiki"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repo.Owner = repo.MustOwner()
|
||||||
|
cl := new(CloneLink)
|
||||||
if setting.SSHPort != 22 {
|
if setting.SSHPort != 22 {
|
||||||
cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSHDomain, setting.SSHPort, repo.Owner.Name, repo.Name)
|
cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSHDomain, setting.SSHPort, repo.Owner.Name, repoName)
|
||||||
} else {
|
} else {
|
||||||
cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSHDomain, repo.Owner.Name, repo.Name)
|
cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSHDomain, repo.Owner.Name, repoName)
|
||||||
}
|
}
|
||||||
cl.HTTPS = fmt.Sprintf("%s%s/%s.git", setting.AppUrl, repo.Owner.Name, repo.Name)
|
cl.HTTPS = fmt.Sprintf("%s%s/%s.git", setting.AppUrl, repo.Owner.Name, repoName)
|
||||||
return cl, nil
|
return cl
|
||||||
|
}
|
||||||
|
|
||||||
|
// CloneLink returns clone URLs of repository.
|
||||||
|
func (repo *Repository) CloneLink() (cl *CloneLink) {
|
||||||
|
return repo.cloneLink(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
reservedNames = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new"}
|
reservedNames = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new"}
|
||||||
reservedPatterns = []string{"*.git", "*.keys"}
|
reservedPatterns = []string{"*.git", "*.keys", "*.wiki"}
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsUsableName checks if name is reserved or pattern of name is not allowed.
|
// IsUsableName checks if name is reserved or pattern of name is not allowed.
|
||||||
|
@ -463,6 +474,11 @@ func UpdateMirror(m *Mirror) error {
|
||||||
return updateMirror(x, m)
|
return updateMirror(x, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func createUpdateHook(repoPath string) error {
|
||||||
|
return git.SetUpdateHook(repoPath,
|
||||||
|
fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+setting.AppPath+"\"", setting.CustomConf))
|
||||||
|
}
|
||||||
|
|
||||||
// MirrorRepository creates a mirror repository from source.
|
// MirrorRepository creates a mirror repository from source.
|
||||||
func MirrorRepository(repoId int64, userName, repoName, repoPath, url string) error {
|
func MirrorRepository(repoId int64, userName, repoName, repoPath, url string) error {
|
||||||
_, stderr, err := process.ExecTimeout(10*time.Minute,
|
_, stderr, err := process.ExecTimeout(10*time.Minute,
|
||||||
|
@ -560,13 +576,19 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if repository has master branch, if so set it to default branch.
|
// Try to get HEAD branch and set it as default branch.
|
||||||
gitRepo, err := git.OpenRepository(repoPath)
|
gitRepo, err := git.OpenRepository(repoPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return repo, fmt.Errorf("open git repository: %v", err)
|
log.Error(4, "OpenRepository: %v", err)
|
||||||
|
return repo, nil
|
||||||
}
|
}
|
||||||
if gitRepo.IsBranchExist("master") {
|
headBranch, err := gitRepo.GetHEADBranch()
|
||||||
repo.DefaultBranch = "master"
|
if err != nil {
|
||||||
|
log.Error(4, "GetHEADBranch: %v", err)
|
||||||
|
return repo, nil
|
||||||
|
}
|
||||||
|
if headBranch != nil {
|
||||||
|
repo.DefaultBranch = headBranch.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
return repo, UpdateRepository(repo, false)
|
return repo, UpdateRepository(repo, false)
|
||||||
|
@ -596,13 +618,6 @@ func initRepoCommit(tmpPath string, sig *git.Signature) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func createUpdateHook(repoPath string) error {
|
|
||||||
hookPath := path.Join(repoPath, "hooks/update")
|
|
||||||
os.MkdirAll(path.Dir(hookPath), os.ModePerm)
|
|
||||||
return ioutil.WriteFile(hookPath,
|
|
||||||
[]byte(fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+setting.AppPath+"\"", setting.CustomConf)), 0777)
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateRepoOptions struct {
|
type CreateRepoOptions struct {
|
||||||
Name string
|
Name string
|
||||||
Description string
|
Description string
|
||||||
|
@ -639,10 +654,7 @@ func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRep
|
||||||
return fmt.Errorf("getRepoInitFile[%s]: %v", opts.Readme, err)
|
return fmt.Errorf("getRepoInitFile[%s]: %v", opts.Readme, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneLink, err := repo.CloneLink()
|
cloneLink := repo.CloneLink()
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("CloneLink: %v", err)
|
|
||||||
}
|
|
||||||
match := map[string]string{
|
match := map[string]string{
|
||||||
"Name": repo.Name,
|
"Name": repo.Name,
|
||||||
"Description": repo.Description,
|
"Description": repo.Description,
|
||||||
|
@ -691,22 +703,17 @@ func prepareRepoCommit(repo *Repository, tmpDir, repoPath string, opts CreateRep
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitRepository initializes README and .gitignore if needed.
|
// InitRepository initializes README and .gitignore if needed.
|
||||||
func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts CreateRepoOptions) error {
|
func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts CreateRepoOptions) (err error) {
|
||||||
// Somehow the directory could exist.
|
// Somehow the directory could exist.
|
||||||
if com.IsExist(repoPath) {
|
if com.IsExist(repoPath) {
|
||||||
return fmt.Errorf("initRepository: path already exists: %s", repoPath)
|
return fmt.Errorf("initRepository: path already exists: %s", repoPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init bare new repository.
|
// Init bare new repository.
|
||||||
os.MkdirAll(repoPath, os.ModePerm)
|
if err = git.InitRepository(repoPath, true); err != nil {
|
||||||
_, stderr, err := process.ExecDir(-1, repoPath,
|
return fmt.Errorf("InitRepository: %v", err)
|
||||||
fmt.Sprintf("initRepository (git init --bare): %s", repoPath), "git", "init", "--bare")
|
} else if err = createUpdateHook(repoPath); err != nil {
|
||||||
if err != nil {
|
return fmt.Errorf("createUpdateHook: %v", err)
|
||||||
return fmt.Errorf("git init --bare: %v - %s", err, stderr)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := createUpdateHook(repoPath); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))
|
tmpDir := filepath.Join(os.TempDir(), "gogs-"+repo.Name+"-"+com.ToStr(time.Now().Nanosecond()))
|
||||||
|
@ -977,7 +984,9 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
|
||||||
|
|
||||||
// Change repository directory name.
|
// Change repository directory name.
|
||||||
if err = os.Rename(RepoPath(owner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil {
|
if err = os.Rename(RepoPath(owner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil {
|
||||||
return fmt.Errorf("rename directory: %v", err)
|
return fmt.Errorf("rename repository directory: %v", err)
|
||||||
|
} else if err = os.Rename(WikiPath(owner.Name, repo.Name), WikiPath(newOwner.Name, repo.Name)); err != nil {
|
||||||
|
return fmt.Errorf("rename repository wiki: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return sess.Commit()
|
return sess.Commit()
|
||||||
|
@ -999,7 +1008,10 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change repository directory name.
|
// Change repository directory name.
|
||||||
return os.Rename(RepoPath(u.LowerName, oldRepoName), RepoPath(u.LowerName, newRepoName))
|
if err = os.Rename(RepoPath(u.Name, oldRepoName), RepoPath(u.Name, newRepoName)); err != nil {
|
||||||
|
return fmt.Errorf("rename repository directory: %v", err)
|
||||||
|
}
|
||||||
|
return os.Rename(WikiPath(u.Name, oldRepoName), WikiPath(u.Name, newRepoName))
|
||||||
}
|
}
|
||||||
|
|
||||||
func getRepositoriesByForkID(e Engine, forkID int64) ([]*Repository, error) {
|
func getRepositoriesByForkID(e Engine, forkID int64) ([]*Repository, error) {
|
||||||
|
@ -1103,26 +1115,19 @@ func DeleteRepository(uid, repoID int64) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = sess.Delete(&Repository{ID: repoID}); err != nil {
|
if err = deleteBeans(sess,
|
||||||
return err
|
&Repository{ID: repoID},
|
||||||
} else if _, err = sess.Delete(&Access{RepoID: repo.ID}); err != nil {
|
&Access{RepoID: repo.ID},
|
||||||
return err
|
&Action{RepoID: repo.ID},
|
||||||
} else if _, err = sess.Delete(&Action{RepoID: repo.ID}); err != nil {
|
&Watch{RepoID: repoID},
|
||||||
return err
|
&Mirror{RepoID: repoID},
|
||||||
} else if _, err = sess.Delete(&Watch{RepoID: repoID}); err != nil {
|
&IssueUser{RepoID: repoID},
|
||||||
return err
|
&Milestone{RepoID: repoID},
|
||||||
} else if _, err = sess.Delete(&Mirror{RepoID: repoID}); err != nil {
|
&Release{RepoID: repoID},
|
||||||
return err
|
&Collaboration{RepoID: repoID},
|
||||||
} else if _, err = sess.Delete(&IssueUser{RepoID: repoID}); err != nil {
|
&PullRequest{BaseRepoID: repoID},
|
||||||
return err
|
); err != nil {
|
||||||
} else if _, err = sess.Delete(&Milestone{RepoID: repoID}); err != nil {
|
return fmt.Errorf("deleteBeans: %v", err)
|
||||||
return err
|
|
||||||
} else if _, err = sess.Delete(&Release{RepoID: repoID}); err != nil {
|
|
||||||
return err
|
|
||||||
} else if _, err = sess.Delete(&Collaboration{RepoID: repoID}); err != nil {
|
|
||||||
return err
|
|
||||||
} else if _, err = sess.Delete(&PullRequest{BaseRepoID: repoID}); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete comments and attachments.
|
// Delete comments and attachments.
|
||||||
|
@ -1164,12 +1169,18 @@ func DeleteRepository(uid, repoID int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove repository files.
|
// Remove repository files.
|
||||||
repoPath, err := repo.repoPath(sess)
|
repoPath := repo.repoPath(sess)
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("RepoPath: %v", err)
|
|
||||||
}
|
|
||||||
if err = os.RemoveAll(repoPath); err != nil {
|
if err = os.RemoveAll(repoPath); err != nil {
|
||||||
desc := fmt.Sprintf("delete repository files[%s]: %v", repoPath, err)
|
desc := fmt.Sprintf("delete repository files [%s]: %v", repoPath, err)
|
||||||
|
log.Warn(desc)
|
||||||
|
if err = CreateRepositoryNotice(desc); err != nil {
|
||||||
|
log.Error(4, "CreateRepositoryNotice: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wikiPath := repo.WikiPath()
|
||||||
|
if err = os.RemoveAll(wikiPath); err != nil {
|
||||||
|
desc := fmt.Sprintf("delete repository wiki [%s]: %v", wikiPath, err)
|
||||||
log.Warn(desc)
|
log.Warn(desc)
|
||||||
if err = CreateRepositoryNotice(desc); err != nil {
|
if err = CreateRepositoryNotice(desc); err != nil {
|
||||||
log.Error(4, "CreateRepositoryNotice: %v", err)
|
log.Error(4, "CreateRepositoryNotice: %v", err)
|
||||||
|
@ -1315,14 +1326,7 @@ func DeleteRepositoryArchives() error {
|
||||||
return x.Where("id > 0").Iterate(new(Repository),
|
return x.Where("id > 0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
repo := bean.(*Repository)
|
repo := bean.(*Repository)
|
||||||
repoPath, err := repo.RepoPath()
|
return os.RemoveAll(filepath.Join(repo.RepoPath(), "archives"))
|
||||||
if err != nil {
|
|
||||||
if err2 := CreateRepositoryNotice(fmt.Sprintf("DeleteRepositoryArchives.RepoPath [%d]: %v", repo.ID, err)); err2 != nil {
|
|
||||||
log.Error(4, "CreateRepositoryNotice: %v", err2)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return os.RemoveAll(filepath.Join(repoPath, "archives"))
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1332,15 +1336,7 @@ func DeleteMissingRepositories() error {
|
||||||
if err := x.Where("id > 0").Iterate(new(Repository),
|
if err := x.Where("id > 0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
repo := bean.(*Repository)
|
repo := bean.(*Repository)
|
||||||
repoPath, err := repo.RepoPath()
|
if !com.IsDir(repo.RepoPath()) {
|
||||||
if err != nil {
|
|
||||||
if err2 := CreateRepositoryNotice(fmt.Sprintf("DeleteRepositoryArchives.RepoPath [%d]: %v", repo.ID, err)); err2 != nil {
|
|
||||||
log.Error(4, "CreateRepositoryNotice: %v", err2)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if !com.IsDir(repoPath) {
|
|
||||||
repos = append(repos, repo)
|
repos = append(repos, repo)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -1371,14 +1367,7 @@ func RewriteRepositoryUpdateHook() error {
|
||||||
return x.Where("id > 0").Iterate(new(Repository),
|
return x.Where("id > 0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
repo := bean.(*Repository)
|
repo := bean.(*Repository)
|
||||||
repoPath, err := repo.RepoPath()
|
return createUpdateHook(repo.RepoPath())
|
||||||
if err != nil {
|
|
||||||
if err2 := CreateRepositoryNotice(fmt.Sprintf("RewriteRepositoryUpdateHook[%d]: %v", repo.ID, err)); err2 != nil {
|
|
||||||
log.Error(4, "CreateRepositoryNotice: %v", err2)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return createUpdateHook(repoPath)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1445,11 +1434,7 @@ func MirrorUpdate() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
repoPath, err := m.Repo.RepoPath()
|
repoPath := m.Repo.RepoPath()
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("Repo.RepoPath: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if _, stderr, err := process.ExecDir(10*time.Minute,
|
if _, stderr, err := process.ExecDir(10*time.Minute,
|
||||||
repoPath, fmt.Sprintf("MirrorUpdate: %s", repoPath),
|
repoPath, fmt.Sprintf("MirrorUpdate: %s", repoPath),
|
||||||
"git", "remote", "update", "--prune"); err != nil {
|
"git", "remote", "update", "--prune"); err != nil {
|
||||||
|
@ -1489,12 +1474,8 @@ func GitFsck() {
|
||||||
if err := x.Where("id>0").Iterate(new(Repository),
|
if err := x.Where("id>0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
repo := bean.(*Repository)
|
repo := bean.(*Repository)
|
||||||
repoPath, err := repo.RepoPath()
|
repoPath := repo.RepoPath()
|
||||||
if err != nil {
|
_, _, err := process.ExecDir(-1, repoPath, "Repository health check", "git", args...)
|
||||||
return fmt.Errorf("RepoPath: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, _, err = process.ExecDir(-1, repoPath, "Repository health check", "git", args...)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
desc := fmt.Sprintf("Fail to health check repository(%s)", repoPath)
|
desc := fmt.Sprintf("Fail to health check repository(%s)", repoPath)
|
||||||
log.Warn(desc)
|
log.Warn(desc)
|
||||||
|
@ -1912,15 +1893,10 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
oldRepoPath, err := oldRepo.RepoPath()
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("get old repository path: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
repoPath := RepoPath(u.Name, repo.Name)
|
repoPath := RepoPath(u.Name, repo.Name)
|
||||||
_, stderr, err := process.ExecTimeout(10*time.Minute,
|
_, stderr, err := process.ExecTimeout(10*time.Minute,
|
||||||
fmt.Sprintf("ForkRepository(git clone): %s/%s", u.Name, repo.Name),
|
fmt.Sprintf("ForkRepository(git clone): %s/%s", u.Name, repo.Name),
|
||||||
"git", "clone", "--bare", oldRepoPath, repoPath)
|
"git", "clone", "--bare", oldRepo.RepoPath(), repoPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("git clone: %v", stderr)
|
return nil, fmt.Errorf("git clone: %v", stderr)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,11 @@ import (
|
||||||
"github.com/go-xorm/xorm"
|
"github.com/go-xorm/xorm"
|
||||||
"github.com/nfnt/resize"
|
"github.com/nfnt/resize"
|
||||||
|
|
||||||
|
"github.com/gogits/git-shell"
|
||||||
|
|
||||||
"github.com/gogits/gogs/modules/avatar"
|
"github.com/gogits/gogs/modules/avatar"
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
"github.com/gogits/gogs/modules/git"
|
oldgit "github.com/gogits/gogs/modules/git"
|
||||||
"github.com/gogits/gogs/modules/log"
|
"github.com/gogits/gogs/modules/log"
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
@ -664,7 +666,7 @@ func deleteUser(e *xorm.Session, u *User) error {
|
||||||
&IssueUser{UID: u.Id},
|
&IssueUser{UID: u.Id},
|
||||||
&EmailAddress{UID: u.Id},
|
&EmailAddress{UID: u.Id},
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return fmt.Errorf("deleteUser: %v", err)
|
return fmt.Errorf("deleteBeans: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***** START: PublicKey *****
|
// ***** START: PublicKey *****
|
||||||
|
@ -938,11 +940,11 @@ func MakeEmailPrimary(email *EmailAddress) error {
|
||||||
// UserCommit represents a commit with validation of user.
|
// UserCommit represents a commit with validation of user.
|
||||||
type UserCommit struct {
|
type UserCommit struct {
|
||||||
User *User
|
User *User
|
||||||
*git.Commit
|
*oldgit.Commit
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateCommitWithEmail chceck if author's e-mail of commit is corresponsind to a user.
|
// ValidateCommitWithEmail chceck if author's e-mail of commit is corresponsind to a user.
|
||||||
func ValidateCommitWithEmail(c *git.Commit) *User {
|
func ValidateCommitWithEmail(c *oldgit.Commit) *User {
|
||||||
u, err := GetUserByEmail(c.Author.Email)
|
u, err := GetUserByEmail(c.Author.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
|
@ -959,7 +961,7 @@ func ValidateCommitsWithEmails(oldCommits *list.List) *list.List {
|
||||||
e = oldCommits.Front()
|
e = oldCommits.Front()
|
||||||
)
|
)
|
||||||
for e != nil {
|
for e != nil {
|
||||||
c := e.Value.(*git.Commit)
|
c := e.Value.(*oldgit.Commit)
|
||||||
|
|
||||||
if v, ok := emails[c.Author.Email]; !ok {
|
if v, ok := emails[c.Author.Email]; !ok {
|
||||||
u, _ = GetUserByEmail(c.Author.Email)
|
u, _ = GetUserByEmail(c.Author.Email)
|
||||||
|
|
178
models/wiki.go
Normal file
178
models/wiki.go
Normal file
|
@ -0,0 +1,178 @@
|
||||||
|
// Copyright 2015 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package models
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"path"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
"github.com/Unknwon/com"
|
||||||
|
|
||||||
|
"github.com/gogits/git-shell"
|
||||||
|
|
||||||
|
"github.com/gogits/gogs/modules/setting"
|
||||||
|
)
|
||||||
|
|
||||||
|
// workingPool represents a pool of working status which makes sure
|
||||||
|
// that only one instance of same task is performing at a time.
|
||||||
|
// However, different type of tasks can performing at the same time.
|
||||||
|
type workingPool struct {
|
||||||
|
lock sync.Mutex
|
||||||
|
pool map[string]*sync.Mutex
|
||||||
|
count map[string]int
|
||||||
|
}
|
||||||
|
|
||||||
|
// CheckIn checks in a task and waits if others are running.
|
||||||
|
func (p *workingPool) CheckIn(name string) {
|
||||||
|
p.lock.Lock()
|
||||||
|
|
||||||
|
lock, has := p.pool[name]
|
||||||
|
if !has {
|
||||||
|
lock = &sync.Mutex{}
|
||||||
|
p.pool[name] = lock
|
||||||
|
}
|
||||||
|
p.count[name]++
|
||||||
|
|
||||||
|
p.lock.Unlock()
|
||||||
|
lock.Lock()
|
||||||
|
}
|
||||||
|
|
||||||
|
// CheckOut checks out a task to let other tasks run.
|
||||||
|
func (p *workingPool) CheckOut(name string) {
|
||||||
|
p.lock.Lock()
|
||||||
|
defer p.lock.Unlock()
|
||||||
|
|
||||||
|
p.pool[name].Unlock()
|
||||||
|
if p.count[name] == 1 {
|
||||||
|
delete(p.pool, name)
|
||||||
|
delete(p.count, name)
|
||||||
|
} else {
|
||||||
|
p.count[name]--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var wikiWorkingPool = &workingPool{
|
||||||
|
pool: make(map[string]*sync.Mutex),
|
||||||
|
count: make(map[string]int),
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToWikiPageURL formats a string to corresponding wiki URL name.
|
||||||
|
func ToWikiPageURL(name string) string {
|
||||||
|
return strings.Replace(name, " ", "-", -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToWikiPageName formats a URL back to corresponding wiki page name.
|
||||||
|
func ToWikiPageName(name string) string {
|
||||||
|
return strings.Replace(name, "-", " ", -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WikiCloneLink returns clone URLs of repository wiki.
|
||||||
|
func (repo *Repository) WikiCloneLink() (cl *CloneLink) {
|
||||||
|
return repo.cloneLink(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WikiPath returns wiki data path by given user and repository name.
|
||||||
|
func WikiPath(userName, repoName string) string {
|
||||||
|
return filepath.Join(UserPath(userName), strings.ToLower(repoName)+".wiki.git")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) WikiPath() string {
|
||||||
|
return WikiPath(repo.MustOwner().Name, repo.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasWiki returns true if repository has wiki.
|
||||||
|
func (repo *Repository) HasWiki() bool {
|
||||||
|
return com.IsDir(repo.WikiPath())
|
||||||
|
}
|
||||||
|
|
||||||
|
// InitWiki initializes a wiki for repository,
|
||||||
|
// it does nothing when repository already has wiki.
|
||||||
|
func (repo *Repository) InitWiki() error {
|
||||||
|
if repo.HasWiki() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := git.InitRepository(repo.WikiPath(), true); err != nil {
|
||||||
|
return fmt.Errorf("InitRepository: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) LocalWikiPath() string {
|
||||||
|
return path.Join(setting.AppDataPath, "tmp/local-wiki", com.ToStr(repo.ID))
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateLocalWiki makes sure the local copy of repository wiki is up-to-date.
|
||||||
|
func (repo *Repository) UpdateLocalWiki() error {
|
||||||
|
return updateLocalCopy(repo.WikiPath(), repo.LocalWikiPath())
|
||||||
|
}
|
||||||
|
|
||||||
|
// updateWikiPage adds new page to repository wiki.
|
||||||
|
func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, message string, isNew bool) (err error) {
|
||||||
|
wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
|
||||||
|
defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
|
||||||
|
|
||||||
|
if err = repo.InitWiki(); err != nil {
|
||||||
|
return fmt.Errorf("InitWiki: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
localPath := repo.LocalWikiPath()
|
||||||
|
|
||||||
|
// Discard local commits make sure even to remote when local copy exists.
|
||||||
|
if com.IsExist(localPath) {
|
||||||
|
// No need to check if nothing in the repository.
|
||||||
|
if git.IsBranchExist(localPath, "master") {
|
||||||
|
if err = git.Reset(localPath, true, "origin/master"); err != nil {
|
||||||
|
return fmt.Errorf("Reset: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = repo.UpdateLocalWiki(); err != nil {
|
||||||
|
return fmt.Errorf("UpdateLocalWiki: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
title = ToWikiPageName(strings.Replace(title, "/", " ", -1))
|
||||||
|
filename := path.Join(localPath, title+".md")
|
||||||
|
|
||||||
|
// If not a new file, show perform update not create.
|
||||||
|
if isNew {
|
||||||
|
if com.IsExist(filename) {
|
||||||
|
return ErrWikiAlreadyExist{filename}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
os.Remove(path.Join(localPath, oldTitle+".md"))
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = ioutil.WriteFile(filename, []byte(content), 0666); err != nil {
|
||||||
|
return fmt.Errorf("WriteFile: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(message) == 0 {
|
||||||
|
message = "Update page '" + title + "'"
|
||||||
|
}
|
||||||
|
if err = git.AddChanges(localPath, true); err != nil {
|
||||||
|
return fmt.Errorf("AddChanges: %v", err)
|
||||||
|
} else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil {
|
||||||
|
return fmt.Errorf("CommitChanges: %v", err)
|
||||||
|
} else if err = git.Push(localPath, "origin", "master"); err != nil {
|
||||||
|
return fmt.Errorf("Push: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) AddWikiPage(doer *User, title, content, message string) error {
|
||||||
|
return repo.updateWikiPage(doer, "", title, content, message, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (repo *Repository) EditWikiPage(doer *User, oldTitle, title, content, message string) error {
|
||||||
|
return repo.updateWikiPage(doer, oldTitle, title, content, message, false)
|
||||||
|
}
|
|
@ -237,3 +237,22 @@ type EditReleaseForm struct {
|
||||||
func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||||
return validate(errs, ctx.Data, f, ctx.Locale)
|
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// __ __.__ __ .__
|
||||||
|
// / \ / \__| | _|__|
|
||||||
|
// \ \/\/ / | |/ / |
|
||||||
|
// \ /| | <| |
|
||||||
|
// \__/\ / |__|__|_ \__|
|
||||||
|
// \/ \/
|
||||||
|
|
||||||
|
type NewWikiForm struct {
|
||||||
|
OldTitle string
|
||||||
|
Title string `binding:"Required"`
|
||||||
|
Content string `binding:"Required"`
|
||||||
|
Message string
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: use code generation to generate this method.
|
||||||
|
func (f *NewWikiForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||||
|
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||||
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -59,7 +59,7 @@ type Context struct {
|
||||||
IsSigned bool
|
IsSigned bool
|
||||||
IsBasicAuth bool
|
IsBasicAuth bool
|
||||||
|
|
||||||
Repo RepoContext
|
Repo *RepoContext
|
||||||
|
|
||||||
Org struct {
|
Org struct {
|
||||||
IsOwner bool
|
IsOwner bool
|
||||||
|
@ -73,17 +73,22 @@ type Context struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsOwner returns true if current user is the owner of repository.
|
// IsOwner returns true if current user is the owner of repository.
|
||||||
func (r RepoContext) IsOwner() bool {
|
func (r *RepoContext) IsOwner() bool {
|
||||||
return r.AccessMode >= models.ACCESS_MODE_OWNER
|
return r.AccessMode >= models.ACCESS_MODE_OWNER
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsAdmin returns true if current user has admin or higher access of repository.
|
// IsAdmin returns true if current user has admin or higher access of repository.
|
||||||
func (r RepoContext) IsAdmin() bool {
|
func (r *RepoContext) IsAdmin() bool {
|
||||||
return r.AccessMode >= models.ACCESS_MODE_ADMIN
|
return r.AccessMode >= models.ACCESS_MODE_ADMIN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsPusher returns true if current user has write or higher access of repository.
|
||||||
|
func (r *RepoContext) IsPusher() bool {
|
||||||
|
return r.AccessMode >= models.ACCESS_MODE_WRITE
|
||||||
|
}
|
||||||
|
|
||||||
// Return if the current user has read access for this repository
|
// Return if the current user has read access for this repository
|
||||||
func (r RepoContext) HasAccess() bool {
|
func (r *RepoContext) HasAccess() bool {
|
||||||
return r.AccessMode >= models.ACCESS_MODE_READ
|
return r.AccessMode >= models.ACCESS_MODE_READ
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ package middleware
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -223,8 +222,10 @@ func RetrieveBaseRepo(ctx *Context, repo *models.Repository) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
func RepoAssignment(args ...bool) macaron.Handler {
|
||||||
return func(ctx *Context) {
|
return func(ctx *Context) {
|
||||||
|
ctx.Repo = &RepoContext{}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
displayBare bool // To display bare page if it is a bare repo.
|
displayBare bool // To display bare page if it is a bare repo.
|
||||||
)
|
)
|
||||||
|
@ -311,11 +312,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Repo.GitRepo = gitRepo
|
ctx.Repo.GitRepo = gitRepo
|
||||||
ctx.Repo.RepoLink, err = repo.RepoLink()
|
ctx.Repo.RepoLink = repo.RepoLink()
|
||||||
if err != nil {
|
|
||||||
ctx.Handle(500, "RepoLink", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.Data["RepoLink"] = ctx.Repo.RepoLink
|
ctx.Data["RepoLink"] = ctx.Repo.RepoLink
|
||||||
ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name
|
ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name
|
||||||
|
|
||||||
|
@ -339,14 +336,11 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
||||||
ctx.Data["Owner"] = ctx.Repo.Repository.Owner
|
ctx.Data["Owner"] = ctx.Repo.Repository.Owner
|
||||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
|
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
|
||||||
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
|
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
|
||||||
|
ctx.Data["IsRepositoryPusher"] = ctx.Repo.IsPusher()
|
||||||
|
|
||||||
ctx.Data["DisableSSH"] = setting.DisableSSH
|
ctx.Data["DisableSSH"] = setting.DisableSSH
|
||||||
ctx.Repo.CloneLink, err = repo.CloneLink()
|
ctx.Data["CloneLink"] = repo.CloneLink()
|
||||||
if err != nil {
|
ctx.Data["WikiCloneLink"] = repo.WikiCloneLink()
|
||||||
ctx.Handle(500, "CloneLink", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.Data["CloneLink"] = ctx.Repo.CloneLink
|
|
||||||
|
|
||||||
if ctx.IsSigned {
|
if ctx.IsSigned {
|
||||||
ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.Id, repo.ID)
|
ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.Id, repo.ID)
|
||||||
|
@ -401,11 +395,15 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
|
||||||
func RequireRepoAdmin() macaron.Handler {
|
func RequireRepoAdmin() macaron.Handler {
|
||||||
return func(ctx *Context) {
|
return func(ctx *Context) {
|
||||||
if !ctx.Repo.IsAdmin() {
|
if !ctx.Repo.IsAdmin() {
|
||||||
if !ctx.IsSigned {
|
ctx.Handle(404, ctx.Req.RequestURI, nil)
|
||||||
ctx.SetCookie("redirect_to", "/"+url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl)
|
return
|
||||||
ctx.Redirect(setting.AppSubUrl + "/user/login")
|
}
|
||||||
return
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func RequireRepoPusher() macaron.Handler {
|
||||||
|
return func(ctx *Context) {
|
||||||
|
if !ctx.Repo.IsPusher() {
|
||||||
ctx.Handle(404, ctx.Req.RequestURI, nil)
|
ctx.Handle(404, ctx.Req.RequestURI, nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,8 @@ func Remove(pid int64) {
|
||||||
func Kill(pid int64) error {
|
func Kill(pid int64) error {
|
||||||
for i, proc := range Processes {
|
for i, proc := range Processes {
|
||||||
if proc.Pid == pid {
|
if proc.Pid == pid {
|
||||||
if proc.Cmd.Process != nil && proc.Cmd.ProcessState != nil && !proc.Cmd.ProcessState.Exited() {
|
if proc.Cmd != nil && proc.Cmd.Process != nil &&
|
||||||
|
proc.Cmd.ProcessState != nil && !proc.Cmd.ProcessState.Exited() {
|
||||||
if err := proc.Cmd.Process.Kill(); err != nil {
|
if err := proc.Cmd.Process.Kill(); err != nil {
|
||||||
return fmt.Errorf("fail to kill process(%d/%s): %v", proc.Pid, proc.Description, err)
|
return fmt.Errorf("fail to kill process(%d/%s): %v", proc.Pid, proc.Description, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
"files": {
|
"files": {
|
||||||
"\/css\/dropzone-4.2.0.css": {
|
"\/css\/dropzone-4.2.0.css": {
|
||||||
"fileType": 16,
|
"fileType": 16,
|
||||||
"ignore": 0,
|
"ignore": 1,
|
||||||
"ignoreWasSetByUser": 0,
|
"ignoreWasSetByUser": 1,
|
||||||
"inputAbbreviatedPath": "\/css\/dropzone-4.2.0.css",
|
"inputAbbreviatedPath": "\/css\/dropzone-4.2.0.css",
|
||||||
"outputAbbreviatedPath": "No Output Path",
|
"outputAbbreviatedPath": "No Output Path",
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
|
@ -92,6 +92,15 @@
|
||||||
"outputPathIsOutsideProject": 0,
|
"outputPathIsOutsideProject": 0,
|
||||||
"outputPathIsSetByUser": 0
|
"outputPathIsSetByUser": 0
|
||||||
},
|
},
|
||||||
|
"\/css\/simplemde-1.8.1.min.css": {
|
||||||
|
"fileType": 16,
|
||||||
|
"ignore": 1,
|
||||||
|
"ignoreWasSetByUser": 1,
|
||||||
|
"inputAbbreviatedPath": "\/css\/simplemde-1.8.1.min.css",
|
||||||
|
"outputAbbreviatedPath": "No Output Path",
|
||||||
|
"outputPathIsOutsideProject": 0,
|
||||||
|
"outputPathIsSetByUser": 0
|
||||||
|
},
|
||||||
"\/css\/themes\/default\/assets\/images\/flags.png": {
|
"\/css\/themes\/default\/assets\/images\/flags.png": {
|
||||||
"fileType": 32768,
|
"fileType": 32768,
|
||||||
"ignore": 0,
|
"ignore": 0,
|
||||||
|
|
|
@ -1758,6 +1758,11 @@ footer .container .links > *:first-child {
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
.repository .navbar .ui.label {
|
||||||
|
margin-top: -2px;
|
||||||
|
margin-left: 7px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
}
|
||||||
.repository .owner.dropdown {
|
.repository .owner.dropdown {
|
||||||
min-width: 40% !important;
|
min-width: 40% !important;
|
||||||
}
|
}
|
||||||
|
@ -1801,6 +1806,28 @@ footer .container .links > *:first-child {
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
.repository #clone-panel {
|
||||||
|
margin-top: -8px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.repository #clone-panel input {
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
.repository #clone-panel .clone.button {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
.repository #clone-panel .clone.button:first-child {
|
||||||
|
border-radius: .28571429rem 0 0 .28571429rem;
|
||||||
|
}
|
||||||
|
.repository #clone-panel .icon.button {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.repository #clone-panel .dropdown .menu {
|
||||||
|
right: 0!important;
|
||||||
|
left: auto!important;
|
||||||
|
}
|
||||||
.repository.file.list #repo-desc {
|
.repository.file.list #repo-desc {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
@ -1821,28 +1848,6 @@ footer .container .links > *:first-child {
|
||||||
.repository.file.list .head.meta li .ui.breadcrumb a {
|
.repository.file.list .head.meta li .ui.breadcrumb a {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.repository.file.list .clone.input {
|
|
||||||
margin-top: -8px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.repository.file.list .clone.input input {
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 5px 10px;
|
|
||||||
}
|
|
||||||
.repository.file.list .clone.input .clone.button {
|
|
||||||
font-size: 13px;
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
.repository.file.list .clone.input .clone.button:first-child {
|
|
||||||
border-radius: .28571429rem 0 0 .28571429rem;
|
|
||||||
}
|
|
||||||
.repository.file.list .clone.input .icon.button {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.repository.file.list .clone.input .dropdown .menu {
|
|
||||||
right: 0!important;
|
|
||||||
left: auto!important;
|
|
||||||
}
|
|
||||||
.repository.file.list #repo-files-table .table.list {
|
.repository.file.list #repo-files-table .table.list {
|
||||||
width: 80% !important;
|
width: 80% !important;
|
||||||
}
|
}
|
||||||
|
@ -2513,6 +2518,36 @@ footer .container .links > *:first-child {
|
||||||
.repository.forks .list .item .link {
|
.repository.forks .list .item .link {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
.repository.wiki.start .ui.segment {
|
||||||
|
padding-top: 70px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
.repository.wiki.start .ui.segment .mega-octicon {
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
.repository.wiki.new .CodeMirror .CodeMirror-code .cm-comment {
|
||||||
|
background: inherit;
|
||||||
|
}
|
||||||
|
.repository.wiki.new .editor-preview {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.repository.wiki.view .choose.page {
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
.repository.wiki.view .ui.sub.header {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
.repository.wiki.view .markdown {
|
||||||
|
padding: 15px 30px;
|
||||||
|
}
|
||||||
|
.repository.wiki.view .markdown h1:first-of-type,
|
||||||
|
.repository.wiki.view .markdown h2:first-of-type,
|
||||||
|
.repository.wiki.view .markdown h3:first-of-type,
|
||||||
|
.repository.wiki.view .markdown h4:first-of-type,
|
||||||
|
.repository.wiki.view .markdown h5:first-of-type,
|
||||||
|
.repository.wiki.view .markdown h6:first-of-type {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
.repository.settings.collaboration .collaborator.list {
|
.repository.settings.collaboration .collaborator.list {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
7
public/css/simplemde-1.8.1.min.css
vendored
Executable file
7
public/css/simplemde-1.8.1.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
|
@ -231,6 +231,11 @@ function initRepository() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wiki
|
||||||
|
if ($('.repository.wiki.view').length > 0) {
|
||||||
|
initFilterSearchDropdown('.choose.page .dropdown');
|
||||||
|
}
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
if ($('.repository.settings.options').length > 0) {
|
if ($('.repository.settings.options').length > 0) {
|
||||||
$('#repo_name').keyup(function () {
|
$('#repo_name').keyup(function () {
|
||||||
|
@ -314,23 +319,23 @@ function initRepository() {
|
||||||
$('#edit-title').click(editTitleToggle);
|
$('#edit-title').click(editTitleToggle);
|
||||||
$('#cancel-edit-title').click(editTitleToggle);
|
$('#cancel-edit-title').click(editTitleToggle);
|
||||||
$('#save-edit-title').click(editTitleToggle).
|
$('#save-edit-title').click(editTitleToggle).
|
||||||
click(function () {
|
click(function () {
|
||||||
if ($edit_input.val().length == 0 ||
|
if ($edit_input.val().length == 0 ||
|
||||||
$edit_input.val() == $issue_title.text()) {
|
$edit_input.val() == $issue_title.text()) {
|
||||||
$edit_input.val($issue_title.text());
|
$edit_input.val($issue_title.text());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post($(this).data('update-url'), {
|
$.post($(this).data('update-url'), {
|
||||||
"_csrf": csrf,
|
"_csrf": csrf,
|
||||||
"title": $edit_input.val()
|
"title": $edit_input.val()
|
||||||
},
|
},
|
||||||
function (data) {
|
function (data) {
|
||||||
$edit_input.val(data.title);
|
$edit_input.val(data.title);
|
||||||
$issue_title.text(data.title);
|
$issue_title.text(data.title);
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Edit issue or comment content
|
// Edit issue or comment content
|
||||||
$('.edit-content').click(function () {
|
$('.edit-content').click(function () {
|
||||||
|
@ -445,6 +450,53 @@ function initRepository() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function initWiki() {
|
||||||
|
if ($('.repository.wiki').length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($('.repository.wiki.new').length > 0) {
|
||||||
|
var $edit_area = $('#edit-area');
|
||||||
|
var simplemde = new SimpleMDE({
|
||||||
|
autoDownloadFontAwesome: false,
|
||||||
|
element: $edit_area[0],
|
||||||
|
previewRender: function (plainText, preview) { // Async method
|
||||||
|
setTimeout(function () {
|
||||||
|
if ($('.editor-preview-active').length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post($edit_area.data('url'), {
|
||||||
|
"_csrf": csrf,
|
||||||
|
"mode": "gfm",
|
||||||
|
"context": $edit_area.data('context'),
|
||||||
|
"text": plainText
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
preview.innerHTML = '<div class="markdown">' + data + '</div>';
|
||||||
|
emojify.run($('.editor-preview')[0]);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
return "Loading...";
|
||||||
|
},
|
||||||
|
renderingConfig: {
|
||||||
|
singleLineBreaks: false
|
||||||
|
},
|
||||||
|
spellChecker: false,
|
||||||
|
tabSize: 4,
|
||||||
|
toolbar: ["bold", "italic", "strikethrough", "|",
|
||||||
|
"heading", "heading-1", "heading-2", "heading-3", "|",
|
||||||
|
"code", "quote", "|",
|
||||||
|
"unordered-list", "ordered-list", "|",
|
||||||
|
"link", "image", "horizontal-rule", "|",
|
||||||
|
"preview", "fullscreen"]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function initOrganization() {
|
function initOrganization() {
|
||||||
if ($('.organization').length == 0) {
|
if ($('.organization').length == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -682,9 +734,9 @@ $(document).ready(function () {
|
||||||
// Show exact time
|
// Show exact time
|
||||||
$('.time-since').each(function () {
|
$('.time-since').each(function () {
|
||||||
$(this).addClass('poping up').
|
$(this).addClass('poping up').
|
||||||
attr('data-content', $(this).attr('title')).
|
attr('data-content', $(this).attr('title')).
|
||||||
attr('data-variation', 'inverted tiny').
|
attr('data-variation', 'inverted tiny').
|
||||||
attr('title', '');
|
attr('title', '');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Semantic UI modules.
|
// Semantic UI modules.
|
||||||
|
@ -835,6 +887,7 @@ $(document).ready(function () {
|
||||||
initCommentForm();
|
initCommentForm();
|
||||||
initInstall();
|
initInstall();
|
||||||
initRepository();
|
initRepository();
|
||||||
|
initWiki();
|
||||||
initOrganization();
|
initOrganization();
|
||||||
initUser();
|
initUser();
|
||||||
initWebhook();
|
initWebhook();
|
||||||
|
|
14
public/js/libs/simplemde-1.8.1.min.js
vendored
Executable file
14
public/js/libs/simplemde-1.8.1.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
|
@ -32,6 +32,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
.ui.label {
|
||||||
|
margin-top: -2px;
|
||||||
|
margin-left: 7px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.owner.dropdown {
|
.owner.dropdown {
|
||||||
min-width: 40% !important;
|
min-width: 40% !important;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +91,31 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#clone-panel {
|
||||||
|
margin-top: -8px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
input {
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clone.button {
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 0 5px;
|
||||||
|
&:first-child {
|
||||||
|
border-radius: .28571429rem 0 0 .28571429rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.icon.button {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.dropdown .menu {
|
||||||
|
right: 0!important;
|
||||||
|
left: auto!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.file.list {
|
&.file.list {
|
||||||
#repo-desc {
|
#repo-desc {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
|
@ -109,31 +142,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.clone.input {
|
|
||||||
margin-top: -8px;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
input {
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 5px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clone.button {
|
|
||||||
font-size: 13px;
|
|
||||||
padding: 0 5px;
|
|
||||||
&:first-child {
|
|
||||||
border-radius: .28571429rem 0 0 .28571429rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.icon.button {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
.dropdown .menu {
|
|
||||||
right: 0!important;
|
|
||||||
left: auto!important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#repo-files-table {
|
#repo-files-table {
|
||||||
.table.list {
|
.table.list {
|
||||||
width: 80% !important;
|
width: 80% !important;
|
||||||
|
@ -939,6 +947,50 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.wiki {
|
||||||
|
&.start {
|
||||||
|
.ui.segment {
|
||||||
|
padding-top: 70px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
|
||||||
|
.mega-octicon {
|
||||||
|
font-size: 48px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.new {
|
||||||
|
.CodeMirror {
|
||||||
|
.CodeMirror-code .cm-comment {
|
||||||
|
background: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor-preview {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.view {
|
||||||
|
.choose.page {
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.sub.header {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
.markdown {
|
||||||
|
padding: 15px 30px;
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.settings {
|
&.settings {
|
||||||
&.collaboration {
|
&.collaboration {
|
||||||
.collaborator.list {
|
.collaborator.list {
|
||||||
|
|
|
@ -5,12 +5,9 @@
|
||||||
package v1
|
package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/gogits/gogs/modules/auth/apiv1"
|
"github.com/gogits/gogs/modules/auth/apiv1"
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
"github.com/gogits/gogs/modules/middleware"
|
"github.com/gogits/gogs/modules/middleware"
|
||||||
"github.com/gogits/gogs/modules/setting"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Render an arbitrary Markdown document.
|
// Render an arbitrary Markdown document.
|
||||||
|
@ -27,8 +24,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) {
|
||||||
|
|
||||||
switch form.Mode {
|
switch form.Mode {
|
||||||
case "gfm":
|
case "gfm":
|
||||||
ctx.Write(base.RenderMarkdown([]byte(form.Text),
|
ctx.Write(base.RenderMarkdown([]byte(form.Text), form.Context))
|
||||||
setting.AppUrl+strings.TrimPrefix(form.Context, "/")))
|
|
||||||
default:
|
default:
|
||||||
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
|
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,10 +20,7 @@ import (
|
||||||
|
|
||||||
// ToApiRepository converts repository to API format.
|
// ToApiRepository converts repository to API format.
|
||||||
func ToApiRepository(owner *models.User, repo *models.Repository, permission api.Permission) *api.Repository {
|
func ToApiRepository(owner *models.User, repo *models.Repository, permission api.Permission) *api.Repository {
|
||||||
cl, err := repo.CloneLink()
|
cl := repo.CloneLink()
|
||||||
if err != nil {
|
|
||||||
log.Error(4, "CloneLink: %v", err)
|
|
||||||
}
|
|
||||||
return &api.Repository{
|
return &api.Repository{
|
||||||
Id: repo.ID,
|
Id: repo.ID,
|
||||||
Owner: *ToApiUser(owner),
|
Owner: *ToApiUser(owner),
|
||||||
|
|
|
@ -17,6 +17,8 @@ import (
|
||||||
"gopkg.in/ini.v1"
|
"gopkg.in/ini.v1"
|
||||||
"gopkg.in/macaron.v1"
|
"gopkg.in/macaron.v1"
|
||||||
|
|
||||||
|
"github.com/gogits/git-shell"
|
||||||
|
|
||||||
"github.com/gogits/gogs/models"
|
"github.com/gogits/gogs/models"
|
||||||
"github.com/gogits/gogs/models/cron"
|
"github.com/gogits/gogs/models/cron"
|
||||||
"github.com/gogits/gogs/modules/auth"
|
"github.com/gogits/gogs/modules/auth"
|
||||||
|
@ -39,6 +41,7 @@ func checkRunMode() {
|
||||||
macaron.Env = macaron.PROD
|
macaron.Env = macaron.PROD
|
||||||
macaron.ColorLog = false
|
macaron.ColorLog = false
|
||||||
setting.ProdMode = true
|
setting.ProdMode = true
|
||||||
|
git.Debug = false
|
||||||
}
|
}
|
||||||
log.Info("Run Mode: %s", strings.Title(macaron.Env))
|
log.Info("Run Mode: %s", strings.Title(macaron.Env))
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,12 @@ import (
|
||||||
func authRequired(ctx *middleware.Context) {
|
func authRequired(ctx *middleware.Context) {
|
||||||
ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"")
|
ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"")
|
||||||
ctx.Data["ErrorMsg"] = "no basic auth and digit auth"
|
ctx.Data["ErrorMsg"] = "no basic auth and digit auth"
|
||||||
ctx.HTML(401, base.TplName("status/401"))
|
ctx.Error(401)
|
||||||
}
|
}
|
||||||
|
|
||||||
func HTTP(ctx *middleware.Context) {
|
func HTTP(ctx *middleware.Context) {
|
||||||
username := ctx.Params(":username")
|
username := ctx.Params(":username")
|
||||||
reponame := ctx.Params(":reponame")
|
reponame := strings.TrimSuffix(ctx.Params(":reponame"), ".git")
|
||||||
if strings.HasSuffix(reponame, ".git") {
|
|
||||||
reponame = reponame[:len(reponame)-4]
|
|
||||||
}
|
|
||||||
|
|
||||||
var isPull bool
|
var isPull bool
|
||||||
service := ctx.Query("service")
|
service := ctx.Query("service")
|
||||||
|
@ -53,6 +50,12 @@ func HTTP(ctx *middleware.Context) {
|
||||||
isPull = (ctx.Req.Method == "GET")
|
isPull = (ctx.Req.Method == "GET")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isWiki := false
|
||||||
|
if strings.HasSuffix(reponame, ".wiki") {
|
||||||
|
isWiki = true
|
||||||
|
reponame = reponame[:len(reponame)-5]
|
||||||
|
}
|
||||||
|
|
||||||
repoUser, err := models.GetUserByName(username)
|
repoUser, err := models.GetUserByName(username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if models.IsErrUserNotExist(err) {
|
if models.IsErrUserNotExist(err) {
|
||||||
|
@ -165,45 +168,46 @@ func HTTP(ctx *middleware.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
callback := func(rpc string, input []byte) {
|
callback := func(rpc string, input []byte) {
|
||||||
if rpc == "receive-pack" {
|
if rpc != "receive-pack" || isWiki {
|
||||||
var lastLine int64 = 0
|
return
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
var lastLine int64 = 0
|
||||||
head := input[lastLine : lastLine+2]
|
for {
|
||||||
if head[0] == '0' && head[1] == '0' {
|
head := input[lastLine : lastLine+2]
|
||||||
size, err := strconv.ParseInt(string(input[lastLine+2:lastLine+4]), 16, 32)
|
if head[0] == '0' && head[1] == '0' {
|
||||||
if err != nil {
|
size, err := strconv.ParseInt(string(input[lastLine+2:lastLine+4]), 16, 32)
|
||||||
log.Error(4, "%v", err)
|
if err != nil {
|
||||||
return
|
log.Error(4, "%v", err)
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if size == 0 {
|
if size == 0 {
|
||||||
//fmt.Println(string(input[lastLine:]))
|
//fmt.Println(string(input[lastLine:]))
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
line := input[lastLine : lastLine+size]
|
|
||||||
idx := bytes.IndexRune(line, '\000')
|
|
||||||
if idx > -1 {
|
|
||||||
line = line[:idx]
|
|
||||||
}
|
|
||||||
fields := strings.Fields(string(line))
|
|
||||||
if len(fields) >= 3 {
|
|
||||||
oldCommitId := fields[0][4:]
|
|
||||||
newCommitId := fields[1]
|
|
||||||
refName := fields[2]
|
|
||||||
|
|
||||||
// FIXME: handle error.
|
|
||||||
if err = models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id); err == nil {
|
|
||||||
go models.HookQueue.Add(repo.ID)
|
|
||||||
go models.AddTestPullRequestTask(repo.ID, strings.TrimPrefix(refName, "refs/heads/"))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
lastLine = lastLine + size
|
|
||||||
} else {
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
line := input[lastLine : lastLine+size]
|
||||||
|
idx := bytes.IndexRune(line, '\000')
|
||||||
|
if idx > -1 {
|
||||||
|
line = line[:idx]
|
||||||
|
}
|
||||||
|
fields := strings.Fields(string(line))
|
||||||
|
if len(fields) >= 3 {
|
||||||
|
oldCommitId := fields[0][4:]
|
||||||
|
newCommitId := fields[1]
|
||||||
|
refName := fields[2]
|
||||||
|
|
||||||
|
// FIXME: handle error.
|
||||||
|
if err = models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id); err == nil {
|
||||||
|
go models.HookQueue.Add(repo.ID)
|
||||||
|
go models.AddTestPullRequestTask(repo.ID, strings.TrimPrefix(refName, "refs/heads/"))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
lastLine = lastLine + size
|
||||||
|
} else {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,6 +259,29 @@ var routes = []route{
|
||||||
{regexp.MustCompile("(.*?)/objects/pack/pack-[0-9a-f]{40}\\.idx$"), "GET", getIdxFile},
|
{regexp.MustCompile("(.*?)/objects/pack/pack-[0-9a-f]{40}\\.idx$"), "GET", getIdxFile},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getGitDir(config *Config, fPath string) (string, error) {
|
||||||
|
root := config.RepoRootPath
|
||||||
|
if len(root) == 0 {
|
||||||
|
cwd, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
log.GitLogger.Error(4, err.Error())
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
root = cwd
|
||||||
|
}
|
||||||
|
|
||||||
|
if !strings.HasSuffix(fPath, ".git") {
|
||||||
|
fPath = fPath + ".git"
|
||||||
|
}
|
||||||
|
|
||||||
|
f := filepath.Join(root, fPath)
|
||||||
|
if _, err := os.Stat(f); os.IsNotExist(err) {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
return f, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Request handling function
|
// Request handling function
|
||||||
func HTTPBackend(config *Config) http.HandlerFunc {
|
func HTTPBackend(config *Config) http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -268,15 +295,13 @@ func HTTPBackend(config *Config) http.HandlerFunc {
|
||||||
|
|
||||||
file := strings.Replace(r.URL.Path, m[1]+"/", "", 1)
|
file := strings.Replace(r.URL.Path, m[1]+"/", "", 1)
|
||||||
dir, err := getGitDir(config, m[1])
|
dir, err := getGitDir(config, m[1])
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.GitLogger.Error(4, err.Error())
|
log.GitLogger.Error(4, err.Error())
|
||||||
renderNotFound(w)
|
renderNotFound(w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hr := handler{config, w, r, dir, file}
|
route.handler(handler{config, w, r, dir, file})
|
||||||
route.handler(hr)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,32 +444,6 @@ func sendFile(contentType string, hr handler) {
|
||||||
http.ServeFile(w, r, reqFile)
|
http.ServeFile(w, r, reqFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGitDir(config *Config, fPath string) (string, error) {
|
|
||||||
root := config.RepoRootPath
|
|
||||||
|
|
||||||
if root == "" {
|
|
||||||
cwd, err := os.Getwd()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.GitLogger.Error(4, err.Error())
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
root = cwd
|
|
||||||
}
|
|
||||||
|
|
||||||
if !strings.HasSuffix(fPath, ".git") {
|
|
||||||
fPath = fPath + ".git"
|
|
||||||
}
|
|
||||||
|
|
||||||
f := filepath.Join(root, fPath)
|
|
||||||
if _, err := os.Stat(f); os.IsNotExist(err) {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
return f, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func getServiceType(r *http.Request) string {
|
func getServiceType(r *http.Request) string {
|
||||||
serviceType := r.FormValue("service")
|
serviceType := r.FormValue("service")
|
||||||
|
|
||||||
|
|
|
@ -210,13 +210,7 @@ func PrepareViewPullInfo(ctx *middleware.Context, pull *models.Issue) *git.PullR
|
||||||
}
|
}
|
||||||
|
|
||||||
if pull.HeadRepo != nil {
|
if pull.HeadRepo != nil {
|
||||||
headRepoPath, err := pull.HeadRepo.RepoPath()
|
headGitRepo, err = git.OpenRepository(pull.HeadRepo.RepoPath())
|
||||||
if err != nil {
|
|
||||||
ctx.Handle(500, "HeadRepo.RepoPath", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
headGitRepo, err = git.OpenRepository(headRepoPath)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "OpenRepository", err)
|
ctx.Handle(500, "OpenRepository", err)
|
||||||
return nil
|
return nil
|
||||||
|
@ -496,11 +490,7 @@ func PrepareCompareDiff(
|
||||||
)
|
)
|
||||||
|
|
||||||
// Get diff information.
|
// Get diff information.
|
||||||
ctx.Data["CommitRepoLink"], err = headRepo.RepoLink()
|
ctx.Data["CommitRepoLink"] = headRepo.RepoLink()
|
||||||
if err != nil {
|
|
||||||
ctx.Handle(500, "RepoLink", err)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
headCommitID, err := headGitRepo.GetCommitIdOfBranch(headBranch)
|
headCommitID, err := headGitRepo.GetCommitIdOfBranch(headBranch)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -29,6 +29,7 @@ const (
|
||||||
|
|
||||||
func Home(ctx *middleware.Context) {
|
func Home(ctx *middleware.Context) {
|
||||||
ctx.Data["Title"] = ctx.Repo.Repository.Name
|
ctx.Data["Title"] = ctx.Repo.Repository.Name
|
||||||
|
ctx.Data["PageIsViewCode"] = true
|
||||||
ctx.Data["RequireHighlightJS"] = true
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
|
|
||||||
branchName := ctx.Repo.BranchName
|
branchName := ctx.Repo.BranchName
|
||||||
|
@ -52,8 +53,6 @@ func Home(ctx *middleware.Context) {
|
||||||
treeLink += "/" + treename
|
treeLink += "/" + treename
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Data["IsRepoToolbarSource"] = true
|
|
||||||
|
|
||||||
isViewBranch := ctx.Repo.IsBranch
|
isViewBranch := ctx.Repo.IsBranch
|
||||||
ctx.Data["IsViewBranch"] = isViewBranch
|
ctx.Data["IsViewBranch"] = isViewBranch
|
||||||
|
|
||||||
|
|
245
routers/repo/wiki.go
Normal file
245
routers/repo/wiki.go
Normal file
|
@ -0,0 +1,245 @@
|
||||||
|
// Copyright 2015 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package repo
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io/ioutil"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gogits/git-shell"
|
||||||
|
|
||||||
|
"github.com/gogits/gogs/models"
|
||||||
|
"github.com/gogits/gogs/modules/auth"
|
||||||
|
"github.com/gogits/gogs/modules/base"
|
||||||
|
"github.com/gogits/gogs/modules/middleware"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
WIKI_START base.TplName = "repo/wiki/start"
|
||||||
|
WIKI_VIEW base.TplName = "repo/wiki/view"
|
||||||
|
WIKI_NEW base.TplName = "repo/wiki/new"
|
||||||
|
WIKI_PAGES base.TplName = "repo/wiki/pages"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PageMeta struct {
|
||||||
|
Name string
|
||||||
|
URL string
|
||||||
|
Updated time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
func renderWikiPage(ctx *middleware.Context, isViewPage bool) (*git.Repository, string) {
|
||||||
|
wikiRepo, err := git.OpenRepository(ctx.Repo.Repository.WikiPath())
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "OpenRepository", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
commit, err := wikiRepo.GetCommitOfBranch("master")
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "GetCommitOfBranch", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get page list.
|
||||||
|
if isViewPage {
|
||||||
|
entries, err := commit.ListEntries()
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "ListEntries", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
pages := make([]PageMeta, 0, len(entries))
|
||||||
|
for i := range entries {
|
||||||
|
if entries[i].Type == git.OBJECT_BLOB {
|
||||||
|
name := strings.TrimSuffix(entries[i].Name(), ".md")
|
||||||
|
pages = append(pages, PageMeta{
|
||||||
|
Name: name,
|
||||||
|
URL: models.ToWikiPageURL(name),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ctx.Data["Pages"] = pages
|
||||||
|
}
|
||||||
|
|
||||||
|
pageURL := ctx.Params(":page")
|
||||||
|
if len(pageURL) == 0 {
|
||||||
|
pageURL = "Home"
|
||||||
|
}
|
||||||
|
ctx.Data["PageURL"] = pageURL
|
||||||
|
|
||||||
|
pageName := models.ToWikiPageName(pageURL)
|
||||||
|
ctx.Data["old_title"] = pageName
|
||||||
|
ctx.Data["Title"] = pageName
|
||||||
|
ctx.Data["title"] = pageName
|
||||||
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
|
|
||||||
|
blob, err := commit.GetBlobByPath(pageName + ".md")
|
||||||
|
if err != nil {
|
||||||
|
if git.IsErrNotExist(err) {
|
||||||
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/_pages")
|
||||||
|
} else {
|
||||||
|
ctx.Handle(500, "GetBlobByPath", err)
|
||||||
|
}
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
r, err := blob.Data()
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "Data", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
data, err := ioutil.ReadAll(r)
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "ReadAll", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
if isViewPage {
|
||||||
|
ctx.Data["content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink))
|
||||||
|
} else {
|
||||||
|
ctx.Data["content"] = string(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
return wikiRepo, pageName
|
||||||
|
}
|
||||||
|
|
||||||
|
func Wiki(ctx *middleware.Context) {
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
|
||||||
|
if !ctx.Repo.Repository.HasWiki() {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("repo.wiki")
|
||||||
|
ctx.HTML(200, WIKI_START)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
wikiRepo, pageName := renderWikiPage(ctx, true)
|
||||||
|
if ctx.Written() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get last change information.
|
||||||
|
lastCommit, err := wikiRepo.GetCommitByPath(pageName + ".md")
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "GetCommitByPath", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ctx.Data["Author"] = lastCommit.Author
|
||||||
|
|
||||||
|
ctx.HTML(200, WIKI_VIEW)
|
||||||
|
}
|
||||||
|
|
||||||
|
func WikiPages(ctx *middleware.Context) {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("repo.wiki.pages")
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
|
||||||
|
if !ctx.Repo.Repository.HasWiki() {
|
||||||
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
wikiRepo, err := git.OpenRepository(ctx.Repo.Repository.WikiPath())
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "OpenRepository", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
commit, err := wikiRepo.GetCommitOfBranch("master")
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "GetCommitOfBranch", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
entries, err := commit.ListEntries()
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "ListEntries", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
pages := make([]PageMeta, 0, len(entries))
|
||||||
|
for i := range entries {
|
||||||
|
if entries[i].Type == git.OBJECT_BLOB {
|
||||||
|
c, err := wikiRepo.GetCommitByPath(entries[i].Name())
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "GetCommit", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
name := strings.TrimSuffix(entries[i].Name(), ".md")
|
||||||
|
pages = append(pages, PageMeta{
|
||||||
|
Name: name,
|
||||||
|
URL: models.ToWikiPageURL(name),
|
||||||
|
Updated: c.Author.When,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ctx.Data["Pages"] = pages
|
||||||
|
|
||||||
|
ctx.HTML(200, WIKI_PAGES)
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewWiki(ctx *middleware.Context) {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page")
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
|
|
||||||
|
if !ctx.Repo.Repository.HasWiki() {
|
||||||
|
ctx.Data["title"] = "Home"
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.HTML(200, WIKI_NEW)
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewWikiPost(ctx *middleware.Context, form auth.NewWikiForm) {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page")
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
|
|
||||||
|
if ctx.HasError() {
|
||||||
|
ctx.HTML(200, WIKI_NEW)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := ctx.Repo.Repository.AddWikiPage(ctx.User, form.Title, form.Content, form.Message); err != nil {
|
||||||
|
if models.IsErrWikiAlreadyExist(err) {
|
||||||
|
ctx.Data["Err_Title"] = true
|
||||||
|
ctx.RenderWithErr(ctx.Tr("repo.wiki.page_already_exists"), WIKI_NEW, &form)
|
||||||
|
} else {
|
||||||
|
ctx.Handle(500, "AddWikiPage", err)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageURL(form.Title))
|
||||||
|
}
|
||||||
|
|
||||||
|
func EditWiki(ctx *middleware.Context) {
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
ctx.Data["PageIsWikiEdit"] = true
|
||||||
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
|
|
||||||
|
if !ctx.Repo.Repository.HasWiki() {
|
||||||
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
renderWikiPage(ctx, false)
|
||||||
|
if ctx.Written() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.HTML(200, WIKI_NEW)
|
||||||
|
}
|
||||||
|
|
||||||
|
func EditWikiPost(ctx *middleware.Context, form auth.NewWikiForm) {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page")
|
||||||
|
ctx.Data["PageIsWiki"] = true
|
||||||
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
|
|
||||||
|
if ctx.HasError() {
|
||||||
|
ctx.HTML(200, WIKI_NEW)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := ctx.Repo.Repository.EditWikiPage(ctx.User, form.OldTitle, form.Title, form.Content, form.Message); err != nil {
|
||||||
|
ctx.Handle(500, "EditWikiPage", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageURL(form.Title))
|
||||||
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "compiling LESS Files"
|
echo "compiling LESS Files"
|
||||||
lessc ../public/ng/less/gogs.less ../public/ng/css/gogs.css
|
lessc ../public/less/gogs.less ../public/css/gogs.css
|
||||||
lessc ../public/ng/less/ui.less ../public/ng/css/ui.css
|
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
|
@ -19,6 +19,11 @@
|
||||||
<script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
|
<script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
|
||||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
|
<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
|
||||||
|
|
||||||
|
{{if .RequireSimpleMDE}}
|
||||||
|
<link rel="stylesheet" href="{{AppSubUrl}}/css/simplemde-1.8.1.min.css">
|
||||||
|
<script src="{{AppSubUrl}}/js/libs/simplemde-1.8.1.min.js"></script>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<!-- Stylesheet -->
|
<!-- Stylesheet -->
|
||||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.1.6.min.css">
|
<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.1.6.min.css">
|
||||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.css?v={{MD5 AppVer}}">
|
<link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.css?v={{MD5 AppVer}}">
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui six wide column">
|
<div class="ui six wide column">
|
||||||
<div class="ui action small clone input">
|
<div class="ui action small input" id="clone-panel">
|
||||||
{{if not $.DisableSSH}}
|
{{if not $.DisableSSH}}
|
||||||
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
||||||
SSH
|
SSH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui top attached tabular menu" data-write="write" data-preview="preview">
|
<div class="ui top attached tabular menu" data-write="write" data-preview="preview">
|
||||||
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
||||||
<a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
<a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||||
<textarea id="content" name="content" tabindex="4"></textarea>
|
<textarea id="content" name="content" tabindex="4"></textarea>
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
<div id="body-nav" class="repo-nav">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-7">
|
|
||||||
<h3 class="name"><i class="fa fa-book fa-lg"></i><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Repository.Name}}">{{.Repository.Name}}</a> {{if .Repository.IsPrivate}}<span class="label label-default">Private</span>{{else if .Repository.IsMirror}}<span class="label label-default">Mirror</span>{{end}}</h3>
|
|
||||||
<p class="desc">{{.Repository.DescriptionHtml}}{{if .Repository.Website}} <a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5 actions text-right clone-group-btn">
|
|
||||||
{{if not .IsBareRepo}}
|
|
||||||
<div class="btn-group" id="repo-clone">
|
|
||||||
<a class="btn btn-default" href="{{.RepoLink}}/archive/{{.BranchName}}/{{.Repository.Name}}.zip"><i class="fa fa-download fa-lg fa-m"></i></a>
|
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu clone-group-btn dropdown-menu-right no-propagation">
|
|
||||||
<div class="input-group">
|
|
||||||
<span class="input-group-btn">
|
|
||||||
<button class="btn btn-default" data-link="{{.CloneLink.SSH}}" type="button">SSH</button>
|
|
||||||
<button class="btn btn-default" data-link="{{.CloneLink.HTTPS}}" type="button">HTTPS</button>
|
|
||||||
</span>
|
|
||||||
<input type="text" class="form-control clone-group-url" value="" readonly id="repo-clone-ipt"/>
|
|
||||||
<span class="input-group-btn">
|
|
||||||
<button class="btn btn-default" type="button" data-toggle="tooltip" title="copy to clipboard" data-placement="top" data-init="copy" data-copy-val="val" data-copy-from="#repo-clone-ipt"><i class="fa fa-copy"></i></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<p class="help-block text-center">Need help cloning? Visit <a target="_blank" href="https://help.github.com/articles/fork-a-repo">Help</a>!</p>
|
|
||||||
<hr/>
|
|
||||||
<div class="clone-zip text-center">
|
|
||||||
<a class="btn btn-success btn-lg" href="{{.RepoLink}}/archive/{{.BranchName}}/{{.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-suitcase"></i>Download ZIP</a>
|
|
||||||
<a class="btn btn-success btn-lg" href="{{.RepoLink}}/archive/{{.BranchName}}/{{.Repository.Name}}.tar.gz" rel="nofollow"><i class="fa fa-suitcase"></i>Download TAR.GZ</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{if .IsSigned}}
|
|
||||||
<div class="btn-group {{if .IsRepositoryWatching}}watching{{else}}no-watching{{end}}" id="repo-watching" data-watch="{{AppSubUrl}}/{{.Owner.Name}}/{{.Repository.Name}}/action/watch" data-unwatch="{{AppSubUrl}}/{{.Owner.Name}}/{{.Repository.Name}}/action/unwatch">
|
|
||||||
{{if .IsRepositoryWatching}}
|
|
||||||
<button type="button" class="btn btn-default"><i class="fa fa-eye fa-lg fa-m"></i></button>
|
|
||||||
{{else}}
|
|
||||||
<button type="button" class="btn btn-default"><i class="fa fa-eye-slash fa-lg fa-m"></i></button>
|
|
||||||
{{end}}
|
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
|
||||||
<div class="dropdown-item text-left to-unwatch">
|
|
||||||
<h4 role="presentation" class="dropdown-header {{if not .IsRepositoryWatching}}text-primary{{end}}">Not Watching</h4>
|
|
||||||
<p class="description">You only receive notifications for conversations in which you participate or are @mentioned.</p>
|
|
||||||
<p class="divider"></p>
|
|
||||||
</div>
|
|
||||||
<div class="dropdown-item text-left to-watch">
|
|
||||||
<h4 role="presentation" class="dropdown-header {{if .IsRepositoryWatching}}text-primary{{end}}">Watching</h4>
|
|
||||||
<p class="description">You receive notifications for all conversations in this repository.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<!-- <div class="btn-group">
|
|
||||||
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Star"><i class="fa fa-star"></i> {{.Repository.NumStars}}</button>
|
|
||||||
</div> -->
|
|
||||||
{{end}}
|
|
||||||
<!-- <div class="btn-group">
|
|
||||||
<a type="button" {{if not .IsRepositoryOwner}}href="{{AppSubUrl}}/{{.Username}}/{{.Reponame}}/fork"{{end}} class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Fork"><i class="fa fa-code-fork fa-lg"></i> {{.Repository.NumForks}}</a>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,16 +1,22 @@
|
||||||
{{if not .IsBareRepo}}
|
{{if not .IsBareRepo}}
|
||||||
<div class="ui {{if .IsRepositoryAdmin}}five{{else}}four{{end}} item menu">
|
<div class="ui secondary pointing menu navbar">
|
||||||
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||||
|
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||||
|
</a>
|
||||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
||||||
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue label">{{.Repository.NumOpenIssues}}</span>
|
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui blue small label">{{.Repository.NumOpenIssues}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
||||||
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue label">{{.Repository.NumOpenPulls}}</span>
|
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui blue small label">{{.Repository.NumOpenPulls}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
||||||
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue label">{{.CommitsCount}}</span>
|
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui blue small label">{{.CommitsCount}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||||
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue label">{{.Repository.NumTags}}</span>
|
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui blue small label">{{.Repository.NumTags}}</span>
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
|
||||||
|
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
||||||
</a>
|
</a>
|
||||||
{{if .IsRepositoryAdmin}}
|
{{if .IsRepositoryAdmin}}
|
||||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||||
|
|
35
templates/repo/wiki/new.tmpl
Normal file
35
templates/repo/wiki/new.tmpl
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
<div class="repository wiki new">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container">
|
||||||
|
{{template "repo/sidebar" .}}
|
||||||
|
{{template "base/alert" .}}
|
||||||
|
<div class="ui header">
|
||||||
|
{{.i18n.Tr "repo.wiki.new_page"}}
|
||||||
|
{{if .PageIsWikiEdit}}
|
||||||
|
<div class="ui right">
|
||||||
|
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="old_title" value="{{.old_title}}">
|
||||||
|
<div class="field {{if .Err_Title}}error{{end}}">
|
||||||
|
<input name="title" value="{{.title}}" autofocus required>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">
|
||||||
|
</div>
|
||||||
|
<div class="text right">
|
||||||
|
<button class="ui green button">
|
||||||
|
{{.i18n.Tr "repo.wiki.save_page"}}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
28
templates/repo/wiki/pages.tmpl
Normal file
28
templates/repo/wiki/pages.tmpl
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
<div class="repository wiki pages">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container">
|
||||||
|
{{template "repo/sidebar" .}}
|
||||||
|
<div class="ui header">
|
||||||
|
{{.i18n.Tr "repo.wiki.pages"}}
|
||||||
|
<div class="ui right">
|
||||||
|
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="ui table">
|
||||||
|
<tbody>
|
||||||
|
{{range .Pages}}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<i class="icon octicon octicon-file-text"></i>
|
||||||
|
<a href="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</a>
|
||||||
|
</td>
|
||||||
|
{{$timeSince := TimeSince .Updated $.Lang}}
|
||||||
|
<td class="text right grey">{{$.i18n.Tr "repo.wiki.last_updated" $timeSince | Safe}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
16
templates/repo/wiki/start.tmpl
Normal file
16
templates/repo/wiki/start.tmpl
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
<div class="repository wiki start">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container">
|
||||||
|
{{template "repo/sidebar" .}}
|
||||||
|
<div class="ui center segment">
|
||||||
|
<span class="mega-octicon octicon-book"></span>
|
||||||
|
<h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2>
|
||||||
|
<p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p>
|
||||||
|
{{if .IsSigned}}
|
||||||
|
<a class="ui green button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.create_first_page"}}</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
73
templates/repo/wiki/view.tmpl
Normal file
73
templates/repo/wiki/view.tmpl
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
{{template "base/head" .}}
|
||||||
|
<div class="repository wiki view">
|
||||||
|
{{template "repo/header" .}}
|
||||||
|
<div class="ui container">
|
||||||
|
{{template "repo/sidebar" .}}
|
||||||
|
<div class="ui grid">
|
||||||
|
<div class="ui ten wide column">
|
||||||
|
<div class="choose page">
|
||||||
|
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||||
|
<div class="ui basic small button">
|
||||||
|
<span class="text">
|
||||||
|
{{.i18n.Tr "repo.wiki.page"}}:
|
||||||
|
<strong>{{.title}}</strong>
|
||||||
|
</span>
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
</div>
|
||||||
|
<div class="menu">
|
||||||
|
<div class="ui icon search input">
|
||||||
|
<i class="filter icon"></i>
|
||||||
|
<input name="search" placeholder="{{.i18n.Tr "repo.wiki.filter_page"}}...">
|
||||||
|
</div>
|
||||||
|
<div class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
|
||||||
|
{{range .Pages}}
|
||||||
|
<div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui six wide column">
|
||||||
|
<div class="ui action small input" id="clone-panel">
|
||||||
|
{{if not $.DisableSSH}}
|
||||||
|
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.WikiCloneLink.SSH}}">
|
||||||
|
SSH
|
||||||
|
</button>
|
||||||
|
{{end}}
|
||||||
|
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.WikiCloneLink.HTTPS}}">
|
||||||
|
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
||||||
|
</button>
|
||||||
|
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.WikiCloneLink.SSH}}{{end}}" readonly>
|
||||||
|
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||||
|
<i class="octicon octicon-clippy"></i>
|
||||||
|
</button>
|
||||||
|
<div class="ui basic jump dropdown icon button">
|
||||||
|
<i class="download icon"></i>
|
||||||
|
<div class="menu">
|
||||||
|
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
|
||||||
|
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui dividing header">
|
||||||
|
{{.title}}
|
||||||
|
{{if .IsRepositoryPusher}}
|
||||||
|
<div class="ui right">
|
||||||
|
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
|
||||||
|
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="ui sub header">
|
||||||
|
{{$timeSince := TimeSince .Author.When $.Lang}}
|
||||||
|
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui segment markdown">
|
||||||
|
{{.content | Str2html}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "base/footer" .}}
|
|
@ -1,5 +0,0 @@
|
||||||
{{template "base/head" .}}
|
|
||||||
<div class="ui container center">
|
|
||||||
401 Unauthorized
|
|
||||||
</div>
|
|
||||||
{{template "base/footer" .}}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{{template "base/head" .}}
|
|
||||||
<div class="ui container center">
|
|
||||||
403 Forbidden
|
|
||||||
</div>
|
|
||||||
{{template "base/footer" .}}
|
|
Loading…
Reference in a new issue