Compare commits

...

62 Commits

Author SHA1 Message Date
Andrey Nering
7da3f899a6 First version of page to see notifications 2016-12-10 17:29:20 -02:00
Andrey Nering
a9844aeb8d Register notification router 2016-12-10 14:08:59 -02:00
Andrey Nering
fedf445f6a Notification item on menu 2016-12-10 14:08:59 -02:00
Andrey Nering
f692adea69 First version of notification service 2016-12-10 14:08:59 -02:00
Andrey Nering
679d91afdf Fix SQLs 2016-12-10 14:08:59 -02:00
Andrey Nering
8a3c856b1c Also create notification while commenting on issue 2016-12-10 14:08:59 -02:00
Andrey Nering
c3810c6d43 Lint 2016-12-10 14:08:59 -02:00
Andrey Nering
75c2752ee6 Use own type (smallint on DB) and iota instead of VARCHAR(1) 2016-12-10 14:08:59 -02:00
Andrey Nering
b19ec55338 Creating notifications on new issue 2016-12-10 14:08:59 -02:00
Andrey Nering
0f1b484e9a Create notification model/table 2016-12-10 14:08:59 -02:00
Bwko
cbcb4361d5 Fixes issue #283
Delete old temp local copy before we create a new temp local copy
2016-12-09 20:13:48 +01:00
Ethan Koenig
7b5b5178e1 Bug fix for edit-hook API endpoint 2016-12-09 20:11:56 +01:00
Henning Henkel
bab737bf02 Fix alignment of tooltip and add bindata - related to #359 (#364) 2016-12-08 20:59:47 +08:00
Ethan Koenig
401a8db0ed Remove stale comment in models/repo.go (#366) 2016-12-08 00:04:12 +01:00
Bwko
39d0db52de Fix for #361, renamed username to login 2016-12-07 15:56:43 +01:00
Ethan Koenig
04b9a7e7a2 Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
2016-12-07 12:55:24 +01:00
Henning Henkel
08b9af9ad8 Added download tooltip - solves #221 (#359) 2016-12-07 09:38:20 +01:00
Bwko
026ad4aee7 Fixes panic when there's no user initialized (#358) 2016-12-06 21:58:34 +01:00
Thomas Boerger
83ed234472 Integrate templates into bindata optionally (#314)
Integrated optional bindata for the templates
2016-12-06 18:58:31 +01:00
Kim "BKC" Carlbäcker
1b5b297c39 Actually fix 'make build' (#353)
* Actually fix bloddy 'make build'
2016-12-05 18:35:22 +01:00
Thomas Boerger
2b63f32b8a Enabled bindata build tag and generate bindata (#352) 2016-12-05 23:39:45 +08:00
Kim "BKC" Carlbäcker
cd0ce9f3d8 Awlays build, even when it thinks it's up to date (#351) 2016-12-05 22:58:04 +08:00
Thomas Boerger
70134323d1 Merge pull request #348 from tboerger/release-fixes
Fix drone release publishing and test steps
2016-12-05 14:49:00 +01:00
Thomas Boerger
8a28130540 Fixed build tags and deps for all build/test steps 2016-12-05 14:34:55 +01:00
Thomas Boerger
e52b24ad5d Properly move releases within drone builds 2016-12-05 14:31:49 +01:00
Antonio Facciolo
947d2ee21b Fixes #316
Export Pusher name as GITEA_PUSHER_NAME env variable
Export also GITEA_UUID, but keep the uuid env variable for backward compatibility

export pusher name ENV variable #316

change env variable prefix to GITEA_

Signed-off-by: Antonio Facciolo <afdev82@gmail.com>

Export also GITEA_UUID #316

Keep uuid env variable for backward compatibility
2016-12-05 12:25:45 +01:00
Kim "BKC" Carlbäcker
d07c955e2a Fix regression in PR-API #248 (#349)
* Fix #344 (regression in PR-API #248)
2016-12-05 12:17:39 +01:00
Thomas Boerger
edae0f134c Merge pull request #347 from thehowl/fix-contributing-typos
Fix typos in CONTRIBUTING
2016-12-05 08:22:16 +01:00
Morgan Bazalgette
db29855d2d Apply suggested changes 2016-12-04 22:50:36 +01:00
Morgan Bazalgette
e6cb9a7397 Fix typos in CONTRIBUTING
Signed-off-by: Morgan Bazalgette <the@howl.moe>
2016-12-04 20:56:21 +01:00
Andrey Nering
dc14d0c046 Merge pull request #345 from Bwko/fix_for_320
Fix for #320
2016-12-03 20:06:05 -02:00
Bwko
0118b275b6 Fix for #320
Suppress the error when we're removing a file that may not exist
2016-12-03 22:31:54 +01:00
Denis Denisov
c8f300b2cd Safe compare password (timing attack) (#338) 2016-12-03 13:49:17 +08:00
Thomas Boerger
db6a4e9fbf Merge pull request #334 from avelino/scripts_project_name_update
Fixed project name on scripts
2016-12-02 20:13:20 +01:00
Avelino
b21bf80dd4 update SERVICENAME on init scripts 2016-12-02 15:52:28 -02:00
Kim "BKC" Carlbäcker
0f05470cb8 [API] Pull Requests (#248) 2016-12-02 12:10:39 +01:00
Kim "BKC" Carlbäcker
d7ed78a919 Merge pull request #227 from go-gitea/api/github-compliance
GitHub API Compliance Fixes
2016-12-02 10:04:15 +01:00
Kim "BKC" Carlbäcker
e8e0539b45 Linting 2016-12-02 09:31:44 +01:00
Kim "BKC" Carlbäcker
e6cfccdd40 GitHub API Compliance (& linting) 2016-12-02 09:18:15 +01:00
Kim "BKC" Carlbäcker
71bb6df75a Add undocumented endpoint for /repositories/:id 2016-12-02 09:18:15 +01:00
Avelino
bea9d55da6 Fixed project name on setting module key APP_NAME 2016-12-02 07:52:27 +01:00
Avelino
d93429af8b Fixed project name on base template head 2016-12-02 07:48:11 +01:00
Avelino
7e09f80ee3 Fixed project name on repo template mail 2016-12-02 07:46:31 +01:00
Avelino
baf60bf603 Fixed project on repo template hook settings 2016-12-02 07:46:02 +01:00
Bwko
4ff0db0246 Catch os... errors 2016-12-02 07:41:19 +01:00
Avelino
79bd7648b0 fixed typo on rename project name scripts for windows (bat) 2016-12-02 03:51:34 -02:00
Avelino
b78d3f5865 Fixed project name on scripts 2016-12-02 03:18:58 -02:00
Bwko
5ab85372da Added rel="noopener" to target="_blank" hrefs (#327)
* Added rel="noopener" to target="_blank" hrefs

* Replaced gogs.io/docs with docs.gitea.io
2016-12-02 09:12:16 +08:00
Lunny Xiao
1ae6ccb5f1 Bug fixed for .dockerignore (#329)
* bug fixed for .dockerignore

* clean up
2016-12-01 23:05:28 +08:00
Andrey Nering
0a6d9295df Merge pull request #326 from tboerger/maintainers
Added real name of Bwko to maintainers file
2016-12-01 13:03:32 -02:00
Thomas Boerger
6598745f07 Copy gitea binary to docker from correct path (#325)
Signed-off-by: Thomas Boerger <tboerger@suse.de>
2016-12-01 18:53:26 +08:00
Lunny Xiao
590a79ff8a Resolved #296 (#324)
* resolved #296

* Indentation fixed
2016-12-01 18:52:57 +08:00
Lunny Xiao
2343feadd4 resolved #310: hide fork to self (#323) 2016-12-01 18:51:50 +08:00
Thomas Boerger
bb3ed784bc Added real name of Bwko to maintainers file
Signed-off-by: Thomas Boerger <tboerger@suse.de>
2016-12-01 10:26:34 +01:00
Kim "BKC" Carlbäcker
31950cb262 Merge pull request #322 from lunny/lunny/pull_typo
typo in model/pull.go
2016-12-01 09:20:48 +01:00
Thomas Boerger
2932042a6d Get rid of bin folder within makefile, enabled TiDB (#319)
* Get rid of the bin folder within the build process

Signed-off-by: Thomas Boerger <thomas@webhippie.de>

* Dropped latest make task, it is unused

Signed-off-by: Thomas Boerger <thomas@webhippie.de>

* Added tidb tag to drone config

Signed-off-by: Thomas Boerger <thomas@webhippie.de>

* Dropped the cert build tag

Signed-off-by: Thomas Boerger <thomas@webhippie.de>

* Dropped useless minwinsvc build tag

Signed-off-by: Thomas Boerger <thomas@webhippie.de>

* Dropped the useless build tags from drone config

Signed-off-by: Thomas Boerger <thomas@webhippie.de>
2016-12-01 15:28:43 +08:00
Lunny Xiao
646e02b521 typo 2016-12-01 09:05:32 +08:00
Andrey Nering
bf0edcbdea Merge pull request #318 from stroucki/20161128locale
Suggested de locale fix
2016-11-30 19:40:29 -02:00
Michael Stroucken
4bd5730e02 Based on @tboerger's screenshot, these "times" are counts and not
clock times. Change translation to reflect that.
2016-11-30 13:25:05 -05:00
Sandro Santilli
a3fb627350 Have "make" create the executable in root dir (#247)
Same as "go build".
Makes it functional by default as it'd then find template/ and public/
by default w/out setting GITEA_WORK_DIR
2016-11-30 23:59:17 +08:00
Matthias Loibl
6dc6926abe Merge pull request #306 from Bwko/Security
Fixes xss, clickjacking & password autocompletion
2016-11-30 08:22:45 +01:00
Bwko
1e9730a779 Fixes xss, clickjacking & password autocompletion 2016-11-29 22:49:06 +01:00
122 changed files with 2286 additions and 897 deletions

View File

@@ -1,5 +1,5 @@
*
!gitea
!docker
!bin
!public
!templates

View File

@@ -8,10 +8,12 @@ pipeline:
pull: true
environment:
CGO_ENABLED: 1
TAGS: cert sqlite pam miniwinsvc
TAGS: sqlite bindata
GOPATH: /srv/app
commands:
- apk -U add linux-pam-dev openssh-client
- apk -U add openssh-client
- make clean
- make generate
- make vet
- make lint
- make test
@@ -22,34 +24,46 @@ pipeline:
test-mysql:
image: webhippie/golang:edge
pull: true
environment:
CGO_ENABLED: 1
TAGS: sqlite bindata
GOPATH: /srv/app
commands:
- make test-mysql
- make test-mysql
when:
event: [ push ]
test-pgsql:
image: webhippie/golang:edge
pull: true
environment:
CGO_ENABLED: 1
TAGS: sqlite bindata
GOPATH: /srv/app
commands:
- make test-pgsql
- make test-pgsql
when:
event: [ push ]
updater:
image: karalabe/xgo-latest:latest
pull: true
environment:
CGO_ENABLED: 1
TAGS: sqlite bindata
GOPATH: /srv/app
commands:
- make release
when:
event: [ push, tag ]
branch: [ master, refs/tags/* ]
coverage:
image: plugins/coverage
server: https://coverage.gitea.io
when:
event: [ push, tag, pull_request ]
updater:
image: karalabe/xgo-latest:latest
pull: true
commands:
- make publish
when:
event: [ push, tag ]
branch: [ master, refs/tags/* ]
docker:
image: plugins/docker
repo: gitea/gitea

View File

@@ -1 +1 @@
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogY2VydCBzcWxpdGUgcGFtIG1pbml3aW5zdmMKICAgIGNvbW1hbmRzOgogICAgICAtIGFwayAtVSBhZGQgbGludXgtcGFtLWRldiBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgY2xlYW4KICAgICAgLSBtYWtlIHZldAogICAgICAtIG1ha2UgbGludAogICAgICAtIG1ha2UgdGVzdAogICAgICAtIG1ha2UgYnVpbGQKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2gsIHRhZywgcHVsbF9yZXF1ZXN0IF0KCiAgdGVzdC1teXNxbDoKICAgIGltYWdlOiB3ZWJoaXBwaWUvZ29sYW5nOmVkZ2UKICAgIHB1bGw6IHRydWUKICAgIGNvbW1hbmRzOgogICAgIC0gbWFrZSB0ZXN0LW15c3FsCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KCiAgdGVzdC1wZ3NxbDoKICAgIGltYWdlOiB3ZWJoaXBwaWUvZ29sYW5nOmVkZ2UKICAgIHB1bGw6IHRydWUKICAgIGNvbW1hbmRzOgogICAgIC0gbWFrZSB0ZXN0LXBnc3FsCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KCiAgY292ZXJhZ2U6CiAgICBpbWFnZTogcGx1Z2lucy9jb3ZlcmFnZQogICAgc2VydmVyOiBodHRwczovL2NvdmVyYWdlLmdpdGVhLmlvCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcsIHB1bGxfcmVxdWVzdCBdCgogIHVwZGF0ZXI6CiAgICBpbWFnZToga2FyYWxhYmUveGdvLWxhdGVzdDpsYXRlc3QKICAgIHB1bGw6IHRydWUKICAgIGNvbW1hbmRzOgogICAgICAtIG1ha2UgcHVibGlzaAogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCwgdGFnIF0KICAgICAgYnJhbmNoOiBbIG1hc3RlciwgcmVmcy90YWdzLyogXQoKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IGdpdGVhL2dpdGVhCiAgICB0YWdzOiBbICcke1RBR30nIF0KICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHRhZyBdCiAgICAgIGJyYW5jaDogWyByZWZzL3RhZ3MvKiBdCgogIGRvY2tlcjoKICAgIGltYWdlOiBwbHVnaW5zL2RvY2tlcgogICAgcmVwbzogZ2l0ZWEvZ2l0ZWEKICAgIHRhZ3M6IFsgJ2xhdGVzdCcgXQogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCiAgICAgIGJyYW5jaDogWyBtYXN0ZXIgXQoKICByZWxlYXNlOgogICAgaW1hZ2U6IHBsdWdpbnMvczMKICAgIHBhdGhfc3R5bGU6IHRydWUKICAgIHN0cmlwX3ByZWZpeDogZGlzdC9yZWxlYXNlLwogICAgc291cmNlOiBkaXN0L3JlbGVhc2UvKgogICAgdGFyZ2V0OiAvZ2l0ZWEvbWFzdGVyCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KICAgICAgYnJhbmNoOiBbIG1hc3RlciBdCgogIHJlbGVhc2U6CiAgICBpbWFnZTogcGx1Z2lucy9zMwogICAgcGF0aF9zdHlsZTogdHJ1ZQogICAgc3RyaXBfcHJlZml4OiBkaXN0L3JlbGVhc2UvCiAgICBzb3VyY2U6IGRpc3QvcmVsZWFzZS8qCiAgICB0YXJnZXQ6IC9naXRlYS8kJFRBRwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgdGFnIF0KICAgICAgYnJhbmNoOiBbIHJlZnMvdGFncy8qIF0KCiAgZ2l0aHViOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0aHViLXJlbGVhc2UKICAgIGZpbGVzOgogICAgICAtIGRpc3QvcmVsZWFzZS8qCiAgICB3aGVuOgogICAgICBldmVudDogWyB0YWcgXQogICAgICBicmFuY2g6IFsgcmVmcy90YWdzLyogXQoKICBnaXR0ZXI6CiAgICBpbWFnZTogcGx1Z2lucy9naXR0ZXIKCnNlcnZpY2VzOgogIG15c3FsOgogICAgaW1hZ2U6IG15c3FsOjUuNwogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTVlTUUxfREFUQUJBU0U9dGVzdAogICAgICAtIE1ZU1FMX0FMTE9XX0VNUFRZX1BBU1NXT1JEPXllcwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCgogIHBnc3FsOgogICAgaW1hZ2U6IHBvc3RncmVzOjkuNQogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gUE9TVEdSRVNfREI9dGVzdAogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCg.fIX2wjyGG2j4vH7ZY2owmyND3XRjCTMgy3Vr3Q71eTE
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogc3FsaXRlIGJpbmRhdGEKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gYXBrIC1VIGFkZCBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgY2xlYW4KICAgICAgLSBtYWtlIGdlbmVyYXRlCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgLSBtYWtlIGxpbnQKICAgICAgLSBtYWtlIHRlc3QKICAgICAgLSBtYWtlIGJ1aWxkCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcsIHB1bGxfcmVxdWVzdCBdCgogIHRlc3QtbXlzcWw6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogc3FsaXRlIGJpbmRhdGEKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gbWFrZSB0ZXN0LW15c3FsCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KCiAgdGVzdC1wZ3NxbDoKICAgIGltYWdlOiB3ZWJoaXBwaWUvZ29sYW5nOmVkZ2UKICAgIHB1bGw6IHRydWUKICAgIGVudmlyb25tZW50OgogICAgICBDR09fRU5BQkxFRDogMQogICAgICBUQUdTOiBzcWxpdGUgYmluZGF0YQogICAgICBHT1BBVEg6IC9zcnYvYXBwCiAgICBjb21tYW5kczoKICAgICAgLSBtYWtlIHRlc3QtcGdzcWwKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2ggXQoKICB1cGRhdGVyOgogICAgaW1hZ2U6IGthcmFsYWJlL3hnby1sYXRlc3Q6bGF0ZXN0CiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogc3FsaXRlIGJpbmRhdGEKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gbWFrZSByZWxlYXNlCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoLCB0YWcgXQogICAgICBicmFuY2g6IFsgbWFzdGVyLCByZWZzL3RhZ3MvKiBdCgogIGNvdmVyYWdlOgogICAgaW1hZ2U6IHBsdWdpbnMvY292ZXJhZ2UKICAgIHNlcnZlcjogaHR0cHM6Ly9jb3ZlcmFnZS5naXRlYS5pbwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCwgdGFnLCBwdWxsX3JlcXVlc3QgXQoKICBkb2NrZXI6CiAgICBpbWFnZTogcGx1Z2lucy9kb2NrZXIKICAgIHJlcG86IGdpdGVhL2dpdGVhCiAgICB0YWdzOiBbICcke1RBR30nIF0KICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHRhZyBdCiAgICAgIGJyYW5jaDogWyByZWZzL3RhZ3MvKiBdCgogIGRvY2tlcjoKICAgIGltYWdlOiBwbHVnaW5zL2RvY2tlcgogICAgcmVwbzogZ2l0ZWEvZ2l0ZWEKICAgIHRhZ3M6IFsgJ2xhdGVzdCcgXQogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCiAgICAgIGJyYW5jaDogWyBtYXN0ZXIgXQoKICByZWxlYXNlOgogICAgaW1hZ2U6IHBsdWdpbnMvczMKICAgIHBhdGhfc3R5bGU6IHRydWUKICAgIHN0cmlwX3ByZWZpeDogZGlzdC9yZWxlYXNlLwogICAgc291cmNlOiBkaXN0L3JlbGVhc2UvKgogICAgdGFyZ2V0OiAvZ2l0ZWEvbWFzdGVyCiAgICB3aGVuOgogICAgICBldmVudDogWyBwdXNoIF0KICAgICAgYnJhbmNoOiBbIG1hc3RlciBdCgogIHJlbGVhc2U6CiAgICBpbWFnZTogcGx1Z2lucy9zMwogICAgcGF0aF9zdHlsZTogdHJ1ZQogICAgc3RyaXBfcHJlZml4OiBkaXN0L3JlbGVhc2UvCiAgICBzb3VyY2U6IGRpc3QvcmVsZWFzZS8qCiAgICB0YXJnZXQ6IC9naXRlYS8kJFRBRwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgdGFnIF0KICAgICAgYnJhbmNoOiBbIHJlZnMvdGFncy8qIF0KCiAgZ2l0aHViOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0aHViLXJlbGVhc2UKICAgIGZpbGVzOgogICAgICAtIGRpc3QvcmVsZWFzZS8qCiAgICB3aGVuOgogICAgICBldmVudDogWyB0YWcgXQogICAgICBicmFuY2g6IFsgcmVmcy90YWdzLyogXQoKICBnaXR0ZXI6CiAgICBpbWFnZTogcGx1Z2lucy9naXR0ZXIKCnNlcnZpY2VzOgogIG15c3FsOgogICAgaW1hZ2U6IG15c3FsOjUuNwogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTVlTUUxfREFUQUJBU0U9dGVzdAogICAgICAtIE1ZU1FMX0FMTE9XX0VNUFRZX1BBU1NXT1JEPXllcwogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCgogIHBnc3FsOgogICAgaW1hZ2U6IHBvc3RncmVzOjkuNQogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gUE9TVEdSRVNfREI9dGVzdAogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgcHVzaCBdCg.O00lMwJDnAI1CFYbrs1bAmspX4wA5ufdye66vq5lcWw

1
.gitignore vendored
View File

@@ -29,6 +29,7 @@ _testmain.go
coverage.out
/modules/public/bindata.go
/modules/templates/bindata.go
*.db
*.log

View File

@@ -24,17 +24,17 @@ This process gives everyone a chance to validate the design, helps prevent dupli
## Testing redux
Before sending code out for review, run all the tests for the whole tree to make sure the changes don't break other usage and keep the compatibility on upgrade. To make sure you are running the test suite exactly like we do you should install the CLI for [Drone CI](https://github.com/drone/drone) as we are using the server for continous testing, follow [these instructions](http://readme.drone.io/0.5/install/cli/). After that you can simply call `drone exec` within you working directory and it will try to run the test suite locally.
Before sending code out for review, run all the tests for the whole tree to make sure the changes don't break other usage and keep the compatibility on upgrade. To make sure you are running the test suite exactly like we do you should install the CLI for [Drone CI](https://github.com/drone/drone), as we are using the server for continous testing, following [these instructions](http://readme.drone.io/0.5/install/cli/). After that you can simply call `drone exec` within your working directory and it will try to run the test suite locally.
## Code review
Changes to Gitea must be reviewed before they are accepted, no matter who makes the change even if an owner or a maintainer. We use GitHub's pull request workflow to do that and we also use [LGTM](http://lgtm.co) to ensure every PR is reviewed by at least 2 maintainers.
Changes to Gitea must be reviewed before they are accepted, no matter who makes the change even if it is an owner or a maintainer. We use GitHub's pull request workflow to do that and we also use [LGTM](http://lgtm.co) to ensure every PR is reviewed by at least 2 maintainers.
Please try to make your pull request easy to review for us. Please read the "[How to get faster PR reviews](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md)" guide, it got useful tips for any project you may want to contribute. See some of the points:
Please try to make your pull request easy to review for us. Please read the "[How to get faster PR reviews](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md)" guide, it has lots of useful tips for any project you may want to contribute. Some of the key points:
* Make small pull requests. The smaller, the faster to review and the more likely it will be merged soon.
* Don't make changes unrelated to your PR. Maybe there are typos on some comments, maybe refactoring would welcome on a function... but if that is not related to you PR, please make *another* PR for that.
* Split big pull requests in multiple. An incremental change will be faster to review than a huge PR.
* Don't make changes unrelated to your PR. Maybe there are typos on some comments, maybe refactoring would be welcome on a function... but if that is not related to your PR, please make *another* PR for that.
* Split big pull requests in multiple small ones. An incremental change will be faster to review than a huge PR.
## Sign your work
@@ -48,19 +48,19 @@ Please use your real name, we really dislike pseudonyms or anonymous contributio
## Maintainers
To make sure every PR have been checked, we got team maintainers. Any PR MUST be reviewed and by at least two maintainers before it can get merged. Maintainers should be a contributor of Gitea (or Gogs) and contributed at least 4 accepted PRs. A contributor should apply as a maintainer in [Gitter development channel](https://gitter.im/go-gitea/develop). The owners or the team maintainers could invite the contributor. A maintainer should spend some time on code reviews. If some maintainer have no time to do that, he should apply to leave the maintainers team and we will give him an honor to be as a member of advisor team. Of course, if an advisor have time to code view, welcome it back to maintainers team. If someone have no time to code review and forget to leave the maintainers team, the owners have the power to move him from maintainers team to advisors team.
To make sure every PR is checked, we got team maintainers. Every PR **MUST** be reviewed by at least two maintainers (or owners) before it can get merged. A maintainer should be a contributor of Gitea (or Gogs) and contributed at least 4 accepted PRs. A contributor should apply as a maintainer in the [Gitter develop channel](https://gitter.im/go-gitea/develop). The owners or the team maintainers may invite the contributor. A maintainer should spend some time on code reviews. If a maintainer has no time to do that, they should apply to leave the maintainers team and we will give them the honor of being a member of the advisors team. Of course, if an advisor has time to code review, we will gladly welcome them back to maintainers team. If someone has no time to code review and forgets to leave the maintainers team, the owners have the power to move him from maintainers team to advisors team.
## Owners
Since Gitea is a pure community organization without any company support, to keep the development healthly we will elect the owners every year. Every time we will elect three owners. All the contributers could vote for three owners, one is the main owner, the other two are assistant owners. When the new owners have been elected, the old owners MUST move the power to the new owners. If some owner don't obey these rules, the other owners are allowed to revoke his owner status.
Since Gitea is a pure community organization without any company support, to keep the development healthy we will elect the owners every year. Every time we will elect three owners. All the contributors may vote up to three people, one of which is the main owner, and the others are assistant owners. When the new owners have been elected, the old owners MUST move the power to the new ones. If an owner don't obey these rules, the others are allowed to revoke his owner status.
After the election, the new owners should say he agrees with these rules on the [CONTRIBUTING](CONTRIBUTING.md) on the [Gitter main channel](https://gitter.im/go-gitea/gitea). Below are the words to speak:
After the election, the new owners should say they agree with these rules on the [CONTRIBUTING](CONTRIBUTING.md) on the [Gitter main channel](https://gitter.im/go-gitea/gitea). Below are the words to speak:
```
I'm glad to be an owner of Gitea, I agree with [CONTRIBUTING](CONTRIBUTING.md). I will spend part of my time on Gitea and lead the development of Gitea.
```
For a honor to the owners, this document will add the history owners below:
To honor the past owners, here's the history of the owners and the time they served:
* 2016-11-04 ~ 2017-12-31
* [Lunny Xiao](https://github.com/lunny) <xiaolunwen@gmail.com>
@@ -69,9 +69,9 @@ For a honor to the owners, this document will add the history owners below:
## Versions
Gitea has one master as a tip branch and have version branches such as `v0.9`. `v0.9` is a release branch and we will tag `v0.9.0` for binary download. If `v0.9.0` got some bug, we will accept pull requests on the `v0.9` branch and publish a `v0.9.1` tag, afterwards we will port the bug fix also to the master branch.
Gitea has the `master` branch as a tip branch and has version branches such as `v0.9`. `v0.9` is a release branch and we will tag `v0.9.0` for binary download. If `v0.9.0` has bugs, we will accept pull requests on the `v0.9` branch and publish a `v0.9.1` tag, after bringing the bug fix also to the master branch.
The `master` branch is a tip version, so if you wish a production usage, please download the latest release tag version. All the branches will be protected via github, all the PRs to all the branches should be review by two maintainers and pass the automatic tests.
Since the `master` branch is a tip version, if you wish to use Gitea in production, please download the latest release tag version. All the branches will be protected via GitHub, all the PRs to every branch must be reviewed by two maintainers and must pass the automatic tests.
## Copyright
@@ -83,4 +83,4 @@ Code that you contribute should use the standard copyright header:
// license that can be found in the LICENSE file.
```
Files in the repository are copyright the year they are added and the year they are last changed. If the copyright author is changed, just copy the head below the old one.
Files in the repository contain copyright from the year they are added to the year they are last changed. If the copyright author is changed, just paste the header below the old one.

View File

@@ -41,4 +41,4 @@ COPY docker /
COPY public /app/gitea/public
COPY templates /app/gitea/templates
COPY bin/gitea /app/gitea/gitea
COPY gitea /app/gitea/gitea

View File

@@ -41,4 +41,4 @@ COPY docker /
COPY public /app/gitea/public
COPY templates /app/gitea/templates
COPY bin/gitea /app/gitea/gitea
COPY gitea /app/gitea/gitea

View File

@@ -1,6 +1,6 @@
Alexey Makhov <amakhov@avito.ru> (@makhov)
Andrey Nering <andrey.nering@gmail.com> (@andreynering)
Bwko <bouwko@gmail.com> (@Bwko)
Kees de Vries <bouwko@gmail.com> (@Bwko)
Kim Carlbäcker <kim.carlbacker@gmail.com> (@bkcsoft)
LefsFlare <nobody@nobody.tld> (@LefsFlarey)
Lunny Xiao <xiaolunwen@gmail.com> (@lunny)

View File

@@ -1,6 +1,4 @@
DIST := dist
BIN := bin
EXECUTABLE := gitea
IMPORT := code.gitea.io/gitea
@@ -16,6 +14,7 @@ LDFLAGS += -X "code.gitea.io/gitea/modules/setting.BuildGitHash=$(SHA)"
TARGETS ?= linux/*,darwin/*,windows/*
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
SOURCES ?= $(shell find . -name "*.go" -type f)
TAGS ?=
@@ -35,7 +34,7 @@ all: build
.PHONY: clean
clean:
go clean -i ./...
rm -rf $(BIN) $(DIST)
rm -rf $(EXECUTABLE) $(DIST)
.PHONY: fmt
fmt:
@@ -86,45 +85,36 @@ install: $(wildcard *.go)
go install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
.PHONY: build
build: $(BIN)/$(EXECUTABLE)
build: $(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(wildcard *.go)
$(EXECUTABLE): $(SOURCES)
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
.PHONY: release
release: release-build release-copy release-check
release: release-dirs release-build release-copy release-check
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release
.PHONY: release-build
release-build:
@which xgo > /dev/null; if [ $$? -ne 0 ]; then \
go get -u github.com/karalabe/xgo; \
fi
xgo -dest $(BIN) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets '$(TARGETS)' -out $(EXECUTABLE)-$(VERSION) $(IMPORT)
xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -targets '$(TARGETS)' -out $(EXECUTABLE)-$(VERSION) $(IMPORT)
ifeq ($(CI),drone)
mv /build/* $(DIST)/binaries
endif
.PHONY: release-copy
release-copy:
mkdir -p $(DIST)/release
$(foreach file,$(wildcard $(BIN)/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
.PHONY: release-check
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: latest
latest: release-build latest-copy latest-check
.PHONY: latest-copy
latest-copy:
mkdir -p $(DIST)/latest
$(foreach file,$(wildcard $(BIN)/$(EXECUTABLE)-*),cp $(file) $(DIST)/latest/$(subst $(EXECUTABLE)-$(VERSION),$(EXECUTABLE)-latest,$(notdir $(file)));)
.PHONY: latest-check
latest-check:
cd $(DIST)/latest; $(foreach file,$(wildcard $(DIST)/latest/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: publish
publish: release latest
.PHONY: bindata
bindata: modules/bindata/bindata.go

View File

@@ -1,7 +1,6 @@
// +build cert
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2016 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

View File

@@ -1,30 +0,0 @@
// +build !cert
// Copyright 2009 The Go Authors. All rights reserved.
// Copyright 2014 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 cmd
import (
"fmt"
"os"
"github.com/urfave/cli"
)
// CmdCert represents the available cert sub-command.
var CmdCert = cli.Command{
Name: "cert",
Usage: "Generate self-signed certificate",
Description: `Please use build tags "cert" to rebuild Gogs in order to have this ability`,
Action: runCert,
}
func runCert(*cli.Context) error {
fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
os.Exit(1)
return nil
}

View File

@@ -79,7 +79,6 @@ func runDump(ctx *cli.Context) error {
log.Printf("Packing dump files...")
z, err := zip.Create(fileName)
if err != nil {
os.Remove(fileName)
log.Fatalf("Fail to create %s: %v", fileName, err)
}
@@ -102,7 +101,7 @@ func runDump(ctx *cli.Context) error {
}
// FIXME: SSH key file.
if err = z.Close(); err != nil {
os.Remove(fileName)
_ = os.Remove(fileName)
log.Fatalf("Fail to save %s: %v", fileName, err)
}
@@ -111,7 +110,10 @@ func runDump(ctx *cli.Context) error {
}
log.Printf("Removing tmp work dir: %s", TmpWorkDir)
os.RemoveAll(TmpWorkDir)
if err := os.RemoveAll(TmpWorkDir); err != nil {
log.Fatalf("Fail to remove %s: %v", TmpWorkDir, err)
}
log.Printf("Finish dumping in file %s", fileName)
return nil

View File

@@ -51,7 +51,9 @@ func setup(logPath string) {
if setting.UseSQLite3 || setting.UseTiDB {
workDir, _ := setting.WorkDir()
os.Chdir(workDir)
if err := os.Chdir(workDir); err != nil {
log.GitLogger.Fatal(4, "Fail to change directory %s: %v", workDir, err)
}
}
models.SetEngine()
@@ -253,10 +255,14 @@ func runServ(c *cli.Context) error {
"User %s does not have level %v access to repository %s",
user.Name, requestedMode, repoPath)
}
os.Setenv("GITEA_PUSHER_NAME", user.Name)
}
}
uuid := gouuid.NewV4().String()
os.Setenv("GITEA_UUID", uuid)
// Keep the old env variable name for backward compability
os.Setenv("uuid", uuid)
// Special handle for Windows.

View File

@@ -49,7 +49,7 @@ func runUpdate(c *cli.Context) error {
}
task := models.UpdateTask{
UUID: os.Getenv("uuid"),
UUID: os.Getenv("GITEA_UUID"),
RefName: args[0],
OldCommitID: args[1],
NewCommitID: args[2],

View File

@@ -7,7 +7,6 @@ package cmd
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/fcgi"
@@ -15,7 +14,6 @@ import (
"path"
"strings"
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/bindata"
@@ -23,7 +21,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/public"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template"
"code.gitea.io/gitea/modules/templates"
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/routers/admin"
apiv1 "code.gitea.io/gitea/routers/api/v1"
@@ -39,10 +37,7 @@ import (
"github.com/go-macaron/i18n"
"github.com/go-macaron/session"
"github.com/go-macaron/toolbox"
"github.com/go-xorm/xorm"
version "github.com/mcuadros/go-version"
"github.com/urfave/cli"
ini "gopkg.in/ini.v1"
macaron "gopkg.in/macaron.v1"
)
@@ -74,45 +69,6 @@ type VerChecker struct {
Expected string
}
// checkVersion checks if binary matches the version of templates files.
func checkVersion() {
// Templates.
data, err := ioutil.ReadFile(setting.StaticRootPath + "/templates/.VERSION")
if err != nil {
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
}
tplVer := string(data)
if tplVer != setting.AppVer {
if version.Compare(tplVer, setting.AppVer, ">") {
log.Fatal(4, "Binary version is lower than template file version, did you forget to recompile Gogs?")
} else {
log.Fatal(4, "Binary version is higher than template file version, did you forget to update template files?")
}
}
// Check dependency version.
checkers := []VerChecker{
{"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.5.5"},
{"github.com/go-macaron/binding", binding.Version, "0.3.2"},
{"github.com/go-macaron/cache", cache.Version, "0.1.2"},
{"github.com/go-macaron/csrf", csrf.Version, "0.1.0"},
{"github.com/go-macaron/i18n", i18n.Version, "0.3.0"},
{"github.com/go-macaron/session", session.Version, "0.1.6"},
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
{"gopkg.in/macaron.v1", macaron.Version, "1.1.7"},
{"code.gitea.io/git", git.Version, "0.4.1"},
}
for _, c := range checkers {
if !version.Compare(c.Version(), c.Expected, ">=") {
log.Fatal(4, `Dependency outdated!
Package '%s' current version (%s) is below requirement (%s),
please use following command to update this package and recompile Gogs:
go get -u %[1]s`, c.ImportPath, c.Version(), c.Expected)
}
}
}
// newMacaron initializes Macaron instance.
func newMacaron() *macaron.Macaron {
m := macaron.New()
@@ -140,15 +96,8 @@ func newMacaron() *macaron.Macaron {
},
))
funcMap := template.NewFuncMap()
m.Use(macaron.Renderer(macaron.RenderOptions{
Directory: path.Join(setting.StaticRootPath, "templates"),
AppendDirectories: []string{path.Join(setting.CustomPath, "templates")},
Funcs: funcMap,
IndentJSON: macaron.Env != macaron.PROD,
}))
models.InitMailRender(path.Join(setting.StaticRootPath, "templates/mail"),
path.Join(setting.CustomPath, "templates/mail"), funcMap)
m.Use(templates.Renderer())
models.InitMailRender(templates.Mailer())
localeNames, err := bindata.AssetDir("conf/locale")
if err != nil {
@@ -200,7 +149,6 @@ func runWeb(ctx *cli.Context) error {
setting.CustomConf = ctx.String("config")
}
routers.GlobalInit()
checkVersion()
m := newMacaron()
@@ -614,6 +562,8 @@ func runWeb(ctx *cli.Context) error {
})
// ***** END: Repository *****
m.Get("/notifications", reqSignIn, user.Notifications)
m.Group("/api", func() {
apiv1.RegisterRoutes(m)
}, ignSignIn)
@@ -654,8 +604,9 @@ func runWeb(ctx *cli.Context) error {
case setting.FCGI:
err = fcgi.Serve(nil, m)
case setting.UnixSocket:
os.Remove(listenAddr)
if err := os.Remove(listenAddr); err != nil {
log.Fatal(4, "Fail to remove unix socket directory %s: %v", listenAddr, err)
}
var listener *net.UnixListener
listener, err = net.ListenUnix("unix", &net.UnixAddr{Name: listenAddr, Net: "unix"})
if err != nil {

View File

@@ -47,7 +47,7 @@ cancel=Отказ
[install]
install=Инсталация
title=Стъпки за инсталиране при първоначално стартиране
docker_helper=Ако Gitea е стартиран в Docker контейнер, моля прочетете <a target="_blank" href="%s">нашите указания</a> внимателно, преди да правите промени по настройките на тази страница!
docker_helper=Ако Gitea е стартиран в Docker контейнер, моля прочетете <a target="_blank" rel="noopener" href="%s">нашите указания</a> внимателно, преди да правите промени по настройките на тази страница!
requite_db_desc=Gitea изисква MySQL, PostgreSQL, SQLite3 или TiDB.
db_title=Настройки на базата данни
db_type=Тип на база данни
@@ -351,7 +351,7 @@ visibility=Видимост
visiblity_helper=Това хранилище е <span class="ui red text">Частно</span>
visiblity_helper_forced=Административна настройка задължава всички нови хранилища да бъдат <span class="ui red text">Частни</span>
visiblity_fork_helper=(Промяна на тази стойност ще се отрази на всички разклонения)
clone_helper=Нуждаете се от помощ при клониране? Посетете <a target="_blank" href="%s">Помощ</a>!
clone_helper=Нуждаете се от помощ при клониране? Посетете <a target="_blank" rel="noopener" href="%s">Помощ</a>!
fork_repo=Разклони хранилището
fork_from=Разклонение от
fork_visiblity_helper=Не може да променяте видимостта на разклонено хранилище.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Клон '%s' вече съществува в то
editor.directory_is_a_file=Частта '%s' в пътя е файл, не директория в това хранилище.
editor.filename_is_a_directory=Име '%s' вече съществува като директория в това хранилище.
editor.file_editing_no_longer_exists=Файл '%s' който редактирате вече не съществува в това хранилище.
editor.file_changed_while_editing=Съдържанието на файла е било променено докато правихте редакциите. <a target="_blank" href="%s">Щракнете тук</a> за да прегледате какво е променено или <strong>натиснете Запис на ревизия</strong> отново за да презапишете чуждите промени.
editor.file_changed_while_editing=Съдържанието на файла е било променено докато правихте редакциите. <a target="_blank" rel="noopener" href="%s">Щракнете тук</a> за да прегледате какво е променено или <strong>натиснете Запис на ревизия</strong> отново за да презапишете чуждите промени.
editor.file_already_exists=Файл с име '%s' вече съществува в това хранилище.
editor.no_changes_to_show=Няма промени.
editor.fail_to_update_file=Невъзможно модифициране/създаване на файл '%s' заради грешка: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Име на потребител...
settings.org_not_allowed_to_be_collaborator=Невъзможно добавяне на организация като сътрудник.
settings.user_is_org_member=Потребителят вече участва в организацията и не може да бъде добавен като сътрудник.
settings.add_webhook=Добави уеб-кука
settings.hooks_desc=Уеб-куките много приличат на обикновен HTTP POST тригер. Когато нещо се случи в Gitea, ние ще изпратим уведомление до сървъра, който посочите. Научете повече в <a target="_blank" href="%s">Ръководство за уеб-куки</a>.
settings.hooks_desc=Уеб-куките много приличат на обикновен HTTP POST тригер. Когато нещо се случи в Gitea, ние ще изпратим уведомление до сървъра, който посочите. Научете повече в <a target="_blank" rel="noopener" href="%s">Ръководство за уеб-куки</a>.
settings.webhook_deletion=Изтрий уеб-кука
settings.webhook_deletion_desc=При изтриване на тази уеб-кука ще се премахне информацията за нея и цялата хронология на нейното изпращане. Желаете ли да продължите?
settings.webhook_deletion_success=Уеб-куката е изтрита успешно!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Ако куката е неактивна, ще бъ
settings.githook_name=Име на куката
settings.githook_content=Съдържание на куката
settings.update_githook=Запази куката
settings.add_webhook_desc=Gitea ще изпрати <code>POST</code> заявка към указания URL адрес заедно с информация за събитието, което е настъпило. Също можете да укажете в какъв формат желаете да получите данните при задействане на куката (JSON, x-www-form-urlencoded, XML) и др. Допълнително описание можете да намерите в нашето <a target="_blank" href="%s">Ръководство за уеб-куки</a>.
settings.add_webhook_desc=Gitea ще изпрати <code>POST</code> заявка към указания URL адрес заедно с информация за събитието, което е настъпило. Също можете да укажете в какъв формат желаете да получите данните при задействане на куката (JSON, x-www-form-urlencoded, XML) и др. Допълнително описание можете да намерите в нашето <a target="_blank" rel="noopener" href="%s">Ръководство за уеб-куки</a>.
settings.payload_url=URL адрес на изпращане
settings.content_type=Тип на съдържанието
settings.secret=Тайна

View File

@@ -47,7 +47,7 @@ cancel=Zrušit
[install]
install=Instalace
title=Kroky instalace pro první běh
docker_helper=Spouštíte-li Gitea uvnitř Dockeru, přečtěte si prosím pečlivě <a target="_blank" href="%s">návod</a>, než něco změníte na této stránce!
docker_helper=Spouštíte-li Gitea uvnitř Dockeru, přečtěte si prosím pečlivě <a target="_blank" rel="noopener" href="%s">návod</a>, než něco změníte na této stránce!
requite_db_desc=Gitea vyžaduje MySQL, PostgreSQL, SQLite3 nebo TiDB.
db_title=Nastavení databáze
db_type=Typ databáze
@@ -351,7 +351,7 @@ visibility=Viditelnost
visiblity_helper=Tento repositář je <span class="ui red text">soukromý</span>
visiblity_helper_forced=Správce vynutil na všech nových repositářích, aby byly <span class="ui red text">soukromé</span>
visiblity_fork_helper=(Změna této hodnoty ovlivní všechny repositáře rozštěpení)
clone_helper=Potřebujete pomoci s klonováním? Navštivte <a target="_blank" href="%s">nápovědu</a>!
clone_helper=Potřebujete pomoci s klonováním? Navštivte <a target="_blank" rel="noopener" href="%s">nápovědu</a>!
fork_repo=Repositář rozštěpení
fork_from=Rozštěpit z
fork_visiblity_helper=Nemůžete změnit viditelnost repositáře rozštěpení.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Repositář větev '%s' již obsahuje.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=Obsah souboru se změnil od začátku úprav. <a target="_blank" href="%s"> Klepnutím sem</a> zobrazíte, co se změnilo, nebo <strong>stiskněte potvrdit znovu</strong> pro přepsání změn.
editor.file_changed_while_editing=Obsah souboru se změnil od začátku úprav. <a target="_blank" rel="noopener" href="%s"> Klepnutím sem</a> zobrazíte, co se změnilo, nebo <strong>stiskněte potvrdit znovu</strong> pro přepsání změn.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Hledat uživatele...
settings.org_not_allowed_to_be_collaborator=Není dovoleno přidat organizaci jako spolupracovníka.
settings.user_is_org_member=Uživatel je již členem organizace, tudíž nemůže být přidán jako spolupracovník.
settings.add_webhook=Přidat webový háček
settings.hooks_desc=Webové háčky jsou podobné základním spouštím HTTP POST událostí. Kdykoliv se něco stane v Gitea, bude postaráno o oznámení specifikovanému cílovému serveru. Více se o daném dozvíte v <a target="_blank" href="%s">příručce webových háčků</a>.
settings.hooks_desc=Webové háčky jsou podobné základním spouštím HTTP POST událostí. Kdykoliv se něco stane v Gitea, bude postaráno o oznámení specifikovanému cílovému serveru. Více se o daném dozvíte v <a target="_blank" rel="noopener" href="%s">příručce webových háčků</a>.
settings.webhook_deletion=Smazat webový háček
settings.webhook_deletion_desc=Smazáním tohoto webového háčku dojte také ke smazání veškerých informací o něm a také historie volání. Chcete pokračovat?
settings.webhook_deletion_success=Webový háček byl úspěšně smazán!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Je-li háček neaktivní, bude zobrazen vzorový obsa
settings.githook_name=Název háčku
settings.githook_content=Obsah háčku
settings.update_githook=Upravit háček
settings.add_webhook_desc=Gitea zašle požadavek typu <code>POST</code> na zadanou URL, společně s informacemi o události, která nastala. Můžete také specifikovat, jaký datový formát se má použít po spuštění daného háčku (JSON, x-www-form-urlencoded, XML atp.). Více informací je k nalezení v našem <a target="_blank" href="%s">Návodu na webové háčky</a>.
settings.add_webhook_desc=Gitea zašle požadavek typu <code>POST</code> na zadanou URL, společně s informacemi o události, která nastala. Můžete také specifikovat, jaký datový formát se má použít po spuštění daného háčku (JSON, x-www-form-urlencoded, XML atp.). Více informací je k nalezení v našem <a target="_blank" rel="noopener" href="%s">Návodu na webové háčky</a>.
settings.payload_url=URL obsahu
settings.content_type=Typ obsahu
settings.secret=Tajný klíč

View File

@@ -47,7 +47,7 @@ cancel=Abbrechen
[install]
install=Installation
title=Installationsschritte für den ersten Start
docker_helper=Wenn Gitea innerhalb von Docker läuft, lesen Sie sich bitte den <a target="_blank" href="%s">Leitfaden</a> genau durch, bevor Sie irgendwas auf dieser Seite ändern!
docker_helper=Wenn Gitea innerhalb von Docker läuft, lesen Sie sich bitte den <a target="_blank" rel="noopener" href="%s">Leitfaden</a> genau durch, bevor Sie irgendwas auf dieser Seite ändern!
requite_db_desc=Gitea benötigt MySQL, PostgreSQL, SQLite3 oder TiDB.
db_title=Datenbankeinstellungen
db_type=Datenbanktyp
@@ -351,7 +351,7 @@ visibility=Sichtbarkeit
visiblity_helper=Dieses Repository ist <span class="ui red text">privat</span>
visiblity_helper_forced=Der Administrator hat festgelegt, dass alle neuen Repositories <span class="ui red text">privat</span> sein müssen
visiblity_fork_helper=(Eine Änderung dieses Wertes wirkt sich auf alle Forks aus)
clone_helper=Sie brauchen Hilfe beim Klonen? Öffnen Sie die <a target="_blank" href="%s">Hilfe</a>!
clone_helper=Sie brauchen Hilfe beim Klonen? Öffnen Sie die <a target="_blank" rel="noopener" href="%s">Hilfe</a>!
fork_repo=Repository forken
fork_from=Fork von
fork_visiblity_helper=Die Sichtbarkeit von geforkten Repositories ist nicht veränderbar.
@@ -401,6 +401,7 @@ watch=Beobachten
unstar=Favorit entfernen
star=Favorit hinzufügen
fork=Fork
download_archive=Dieses Repository herunterladen
no_desc=Keine Beschreibung
quick_guide=Kurzanleitung
@@ -457,7 +458,7 @@ editor.branch_already_exists=Branch '%s' existiert bereits in diesem Repository.
editor.directory_is_a_file='%s' im übergeordneten Verzeichnis ist eine Datei und kein Verzeichnis.
editor.filename_is_a_directory=Die Datei '%s' existiert bereits als Verzeichnis in diesem Repository.
editor.file_editing_no_longer_exists=Die Datei '%s', welche Sie bearbeiten, existiert in diesem Repository nicht mehr.
editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Datei geändert. <a target="_blank" href="%s">Hier klicken</a> um die Änderungen zu sehen, oder nochmals <strong>Commit drücken</strong> um die Änderungen zu überschreiben.
editor.file_changed_while_editing=Seit dem Start der Bearbeitung hat sich die Datei geändert. <a target="_blank" rel="noopener" href="%s">Hier klicken</a> um die Änderungen zu sehen, oder nochmals <strong>Commit drücken</strong> um die Änderungen zu überschreiben.
editor.file_already_exists=Eine Datei mit dem Namen '%s' existiert bereits in diesem Repository.
editor.no_changes_to_show=Keine Änderungen vorhanden.
editor.fail_to_update_file=Fehler beim Ändern/Erstellen der Datei '%s'. Fehler: %v
@@ -690,7 +691,7 @@ settings.search_user_placeholder=Benutzer suchen...
settings.org_not_allowed_to_be_collaborator=Eine Organisation kann nicht als Mitarbeiter hinzugefügt werden.
settings.user_is_org_member=Benutzer ist ein Organisationsmitglied und kann nicht als Mitarbeiter hinzugefügt werden.
settings.add_webhook=Webhook hinzufügen
settings.hooks_desc=Webhooks erlauben es Ihnen, externe Dienste zu informieren, wenn etwas Bestimmtes in Ihrem Repository passiert. Gitea sendet dann einen POST-Request an alle angegebenen URLs. Erfahren Sie mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
settings.hooks_desc=Webhooks erlauben es Ihnen, externe Dienste zu informieren, wenn etwas Bestimmtes in Ihrem Repository passiert. Gitea sendet dann einen POST-Request an alle angegebenen URLs. Erfahren Sie mehr in unserem <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.webhook_deletion=Webhook entfernen
settings.webhook_deletion_desc=Das Löschen dieses Webhooks wird alle zugehörigen Informationen und den Übertragungsverlauf entfernen. Wirklich fortfahren?
settings.webhook_deletion_success=Webhook wurde erfolgreich entfernt!
@@ -707,7 +708,7 @@ settings.githook_edit_desc=Wenn ein Hook inaktiv ist, wird der Standardinhalt be
settings.githook_name=Hook-Name
settings.githook_content=Hook-Inhalt
settings.update_githook=Hook aktualisieren
settings.add_webhook_desc=Gitea sendet einen <code>POST</code>-Request an die unten stehende URL mit Details aller abonnierten Ereignisse. Sie können auch angeben, welches Datenformat Sie empfangen wollen (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mehr Informationen finden Sie im <a target="_blank" href="%s">Webhooks Guide</a>.
settings.add_webhook_desc=Gitea sendet einen <code>POST</code>-Request an die unten stehende URL mit Details aller abonnierten Ereignisse. Sie können auch angeben, welches Datenformat Sie empfangen wollen (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mehr Informationen finden Sie im <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.payload_url=Payload URL
settings.content_type=Inhaltstyp
settings.secret=Secret
@@ -915,9 +916,9 @@ dashboard.current_goroutine=Aktuelle Goroutines
dashboard.current_memory_usage=Aktuelle Speichernutzung
dashboard.total_memory_allocated=Zugeteilter Gesamtspeicher
dashboard.memory_obtained=Erhaltener Speicher
dashboard.pointer_lookup_times=Zeigerlookup-Dauer
dashboard.memory_allocate_times=Speicheranforderungsdauer
dashboard.memory_free_times=Speicherfreigabedauer
dashboard.pointer_lookup_times=Anzahl Zeigerlookups
dashboard.memory_allocate_times=Anzahl Speicheranforderungen
dashboard.memory_free_times=Anzahl Speicherfreigaben
dashboard.current_heap_usage=Aktuelle Heap-Auslastung
dashboard.heap_memory_obtained=Erhaltener Heap-Memory
dashboard.heap_memory_idle=Unbenutzter Heap-Memory
@@ -938,7 +939,7 @@ dashboard.last_gc_time=Seit letztem GC-Zyklus
dashboard.total_gc_time=Gesamte GC-Pause
dashboard.total_gc_pause=Gesamte GC-Pause
dashboard.last_gc_pause=Letzte GC-Pause
dashboard.gc_times=GC-Dauer
dashboard.gc_times=Anzahl GC
users.user_manage_panel=Benutzer
users.new_account=Neues Konto erstellen

View File

@@ -13,6 +13,7 @@ version = Version
page = Page
template = Template
language = Language
notifications = Notifications
create_new = Create...
user_profile_and_more = User profile and more
signed_in_as = Signed in as
@@ -47,7 +48,7 @@ cancel = Cancel
[install]
install = Installation
title = Install Steps For First-time Run
docker_helper = If you're running Gitea inside Docker, please read <a target="_blank" href="%s">Guidelines</a> carefully before you change anything in this page!
docker_helper = If you're running Gitea inside Docker, please read <a target="_blank" rel="noopener" href="%s">Guidelines</a> carefully before you change anything in this page!
requite_db_desc = Gitea requires MySQL, PostgreSQL, SQLite3 or TiDB.
db_title = Database Settings
db_type = Database Type
@@ -139,6 +140,9 @@ repos = Repositories
users = Users
organizations = Organizations
search = Search
repo_no_results = There are no matched repositories found.
user_no_results = There are no matched users found.
org_no_results = There are no matched organizations found.
[auth]
create_new_account = Create New Account
@@ -352,7 +356,7 @@ visibility = Visibility
visiblity_helper = This repository is <span class="ui red text">Private</span>
visiblity_helper_forced = Site admin has forced all new repositories to be <span class="ui red text">Private</span>
visiblity_fork_helper = (Change of this value will affect all forks)
clone_helper = Need help cloning? Visit <a target="_blank" href="%s">Help</a>!
clone_helper = Need help cloning? Visit <a target="_blank" rel="noopener" href="%s">Help</a>!
fork_repo = Fork Repository
fork_from = Fork From
fork_visiblity_helper = You cannot alter the visibility of a forked repository.
@@ -402,6 +406,7 @@ watch = Watch
unstar = Unstar
star = Star
fork = Fork
download_archive = Download this repository
no_desc = No Description
quick_guide = Quick Guide
@@ -458,7 +463,7 @@ editor.branch_already_exists = Branch '%s' already exists in this repository.
editor.directory_is_a_file = Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory = The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists = The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing = File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing = File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists = A file with name '%s' already exists in this repository.
editor.no_changes_to_show = There are no changes to show.
editor.fail_to_update_file = Failed to update/create file '%s' with error: %v
@@ -693,7 +698,7 @@ settings.search_user_placeholder = Search user...
settings.org_not_allowed_to_be_collaborator = Organization is not allowed to be added as a collaborator.
settings.user_is_org_member = User is organization member who cannot be added as a collaborator.
settings.add_webhook = Add Webhook
settings.hooks_desc = Webhooks are much like basic HTTP POST event triggers. Whenever something occurs in Gitea, we will handle the notification to the target host you specify. Learn more in this <a target="_blank" href="%s">Webhooks Guide</a>.
settings.hooks_desc = Webhooks are much like basic HTTP POST event triggers. Whenever something occurs in Gitea, we will handle the notification to the target host you specify. Learn more in this <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.webhook_deletion = Delete Webhook
settings.webhook_deletion_desc = Delete this webhook will remove its information and all delivery history. Do you want to continue?
settings.webhook_deletion_success = Webhook has been deleted successfully!
@@ -710,7 +715,7 @@ settings.githook_edit_desc = If the hook is inactive, sample content will be pre
settings.githook_name = Hook Name
settings.githook_content = Hook Content
settings.update_githook = Update Hook
settings.add_webhook_desc = Gitea will send a <code>POST</code> request to the URL you specify, along with regarding the event that occured. You can also specify what kind of data format you'd like to get upon triggering the hook (JSON, x-www-form-urlencoded, XML, etc). More information can be found in our <a target="_blank" href="%s">Webhooks Guide</a>.
settings.add_webhook_desc = Gitea will send a <code>POST</code> request to the URL you specify, along with regarding the event that occured. You can also specify what kind of data format you'd like to get upon triggering the hook (JSON, x-www-form-urlencoded, XML, etc). More information can be found in our <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.payload_url = Payload URL
settings.content_type = Content Type
settings.secret = Secret
@@ -1203,3 +1208,10 @@ default_message = Drop files here or click to upload.
invalid_input_type = You can't upload files of this type.
file_too_big = File size ({{filesize}} MB) exceeds maximum size ({{maxFilesize}} MB).
remove_file = Remove file
[notification]
notifications = Notifications
unread = Unread
read = Read
no_unread = You have no unread notifications.
no_read = You have no read notifications.

View File

@@ -47,7 +47,7 @@ cancel=Cancelar
[install]
install=Instalación
title=Pasos de la instalación por primera vez
docker_helper=Si está ejecutando Gitea usando Docker, ¡por favor lea <a target="_blank" href="%s"> estas pautas</a> antes de cambiar nada en esta página!
docker_helper=Si está ejecutando Gitea usando Docker, ¡por favor lea <a target="_blank" rel="noopener" href="%s"> estas pautas</a> antes de cambiar nada en esta página!
requite_db_desc=Gitea requiere una base de datos MySQL, PostgreSQL, SQLite3 o TiDB.
db_title=Configuración de base de datos
db_type=Tipo de base de datos
@@ -351,7 +351,7 @@ visibility=Visibilidad
visiblity_helper=Este repositorio es <span class="ui red text">privado</span>
visiblity_helper_forced=El administrador web ha obligado a todos los repositorios nuevos a ser <span class="ui red text"> privados</span>
visiblity_fork_helper=(Este cambio afectará a todos los forks)
clone_helper=¿Necesitas ayuda con el clone? ¡Consulta la <a target="_blank" href="%s">Ayuda</a>!
clone_helper=¿Necesitas ayuda con el clone? ¡Consulta la <a target="_blank" rel="noopener" href="%s">Ayuda</a>!
fork_repo=Hacer Fork del repositorio
fork_from=Crear un Fork desde
fork_visiblity_helper=No es posible cambiar la visibilidad de un Fork
@@ -401,6 +401,7 @@ watch=Seguir
unstar=Eliminar destacado
star=Destacar
fork=Fork
download_archive=Descargar este repositorio
no_desc=Sin descripción
quick_guide=Guía Rápida
@@ -457,7 +458,7 @@ editor.branch_already_exists=La rama '%s' ya existe en este repositorio.
editor.directory_is_a_file=La entrada '%s' en el directorio padre es un archivo no un directorio en este repositorio.
editor.filename_is_a_directory=El nombre del fichero '%s' es un directorio existente en este repositorio.
editor.file_editing_no_longer_exists=El archivo '%s' que estás editando ya no existe en este repositorio.
editor.file_changed_while_editing=El contenido del archivo ha sido modificado desde que empezó a editarlo. <a target="_blank" href="%s">Clic aquí</a> para ver qué ha sido modificado o <strong>presiona confirmar de nuevo</strong> para sobrescribir estos cambios.
editor.file_changed_while_editing=El contenido del archivo ha sido modificado desde que empezó a editarlo. <a target="_blank" rel="noopener" href="%s">Clic aquí</a> para ver qué ha sido modificado o <strong>presiona confirmar de nuevo</strong> para sobrescribir estos cambios.
editor.file_already_exists=Ya existe un archivo con nombre '%s' en este repositorio.
editor.no_changes_to_show=No existen cambios para mostrar.
editor.fail_to_update_file=Error al actualizar/crear el archivo '%s', error: %v
@@ -690,7 +691,7 @@ settings.search_user_placeholder=Buscar usuario...
settings.org_not_allowed_to_be_collaborator=Las organizaciones no tiene permitido ser añadidas como colaboradores.
settings.user_is_org_member=El usuario es miembro de la organización, no puede ser añadido como colaborador.
settings.add_webhook=Añadir Webhook
settings.hooks_desc=Los Webhooks permiten a servicios externos recibir notificaciones cuando sucedan ciertos eventos en Gitea. Cuando sucedan los eventos especificados, enviaremos una petición POST a cada una de las URLs indicadas. Para obtener más información, consulta nuestra <a target="_blank" href="%s">Guía de Webhooks</a>.
settings.hooks_desc=Los Webhooks permiten a servicios externos recibir notificaciones cuando sucedan ciertos eventos en Gitea. Cuando sucedan los eventos especificados, enviaremos una petición POST a cada una de las URLs indicadas. Para obtener más información, consulta nuestra <a target="_blank" rel="noopener" href="%s">Guía de Webhooks</a>.
settings.webhook_deletion=Eliminar Webhook
settings.webhook_deletion_desc=Al borrar este webhook se eliminará su información y todo su historial. ¿Desea continuar?
settings.webhook_deletion_success=¡Webhook eliminado con éxito!
@@ -707,7 +708,7 @@ settings.githook_edit_desc=Si el hook no está activo, se mostrará contenido de
settings.githook_name=Nombre del Hook
settings.githook_content=Contenido del Hook
settings.update_githook=Actualizar Hook
settings.add_webhook_desc=Enviaremos una petición <code>POST</code> a la siguiente URL con los detalles de cualquier evento suscrito. También puedes especificar qué formato de datos te gustaría recibir (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Puedes encontrar más información en la <a target="_blank" href="%s">Guía de Webhooks</a>.
settings.add_webhook_desc=Enviaremos una petición <code>POST</code> a la siguiente URL con los detalles de cualquier evento suscrito. También puedes especificar qué formato de datos te gustaría recibir (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Puedes encontrar más información en la <a target="_blank" rel="noopener" href="%s">Guía de Webhooks</a>.
settings.payload_url=URL de Payload
settings.content_type=Tipo de contenido
settings.secret=Secreto

View File

@@ -47,7 +47,7 @@ cancel=Peruuta
[install]
install=Asennus
title=Asennusvaiheet ottaessa ensi kertaa käyttöön
docker_helper=Jos käytät Giteaia Dockerin sisällä, ole hyvä ja lue <a target="_blank" href="%s">ohjeet</a> huolellisesti ennen kuin muutat mitään tältä sivulta!
docker_helper=Jos käytät Giteaia Dockerin sisällä, ole hyvä ja lue <a target="_blank" rel="noopener" href="%s">ohjeet</a> huolellisesti ennen kuin muutat mitään tältä sivulta!
requite_db_desc=Gitea tarvitsee MySQL, PostgreSQL, SQLite3 tai TiDB.
db_title=Tietokanta asetukset
db_type=Tietokanta tyyppi
@@ -351,7 +351,7 @@ visibility=Näkyvyys
visiblity_helper=Tämä repo on <span class="ui red text">yksityinen</span>
visiblity_helper_forced=Sivuston ylläpito on pakottanut kaikkien uusien repojen olevan <span class="ui red text">yksityisiä</span>
visiblity_fork_helper=(Arvon vaihtaminen vaikuttaa kaikkiin forkkeihin)
clone_helper=Tarvitsetko apua kloonauksessa? Vieraile osoitteessa <a target="_blank" href="%s">Apua</a>!
clone_helper=Tarvitsetko apua kloonauksessa? Vieraile osoitteessa <a target="_blank" rel="noopener" href="%s">Apua</a>!
fork_repo=Forkkaa repo
fork_from=Forkkaa lähteestä
fork_visiblity_helper=Et voi muuttaa forkatun repon näkyvyyttä.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Etsi käyttäjä...
settings.org_not_allowed_to_be_collaborator=Yhteistyökumppaniksi ei voi lisätä organisaatiota.
settings.user_is_org_member=Käyttäjä on organisaation jäsen, jota ei voi lisätä yhteistyökumppaniksi.
settings.add_webhook=Lisää webkoukku
settings.hooks_desc=Webkoukut muistuttavat paljon perus HTTP POST tapahtuma laukaisimia. Aina kun jotain tapahtuu Giteaissa, käsittelemme ilmoituksen määrittäämääsi kohteeseen. Lisätietoja <a target="_blank" href="%s">webkoukku oppaassa</a>.
settings.hooks_desc=Webkoukut muistuttavat paljon perus HTTP POST tapahtuma laukaisimia. Aina kun jotain tapahtuu Giteaissa, käsittelemme ilmoituksen määrittäämääsi kohteeseen. Lisätietoja <a target="_blank" rel="noopener" href="%s">webkoukku oppaassa</a>.
settings.webhook_deletion=Poista webkoukku
settings.webhook_deletion_desc=Tämän webkoukun poistaminen poistaa sen tiedot ja kaiken toimitushistorian. Haluatko jatkaa?
settings.webhook_deletion_success=Webkoukku on poistettu onnistuneesti!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Jos koukku ei ole käytössä, esitellään esimerkki
settings.githook_name=Koukun nimi
settings.githook_content=Koukun sisältö
settings.update_githook=Päivitys koukku
settings.add_webhook_desc=Gitea lähettää <code>POST</code> requestin määrittämääsi URLiin, mukaanlukien tapahtuneen eventin. Voit myös määrittää millaisen tiedostomuodon haluat saada koukun lauettua (JSON, x-www-form-urlencoded, XML, jne). Lisätietoa löytyy meidän <a target="_blank" href="%s">koukut oppaasta</a>.
settings.add_webhook_desc=Gitea lähettää <code>POST</code> requestin määrittämääsi URLiin, mukaanlukien tapahtuneen eventin. Voit myös määrittää millaisen tiedostomuodon haluat saada koukun lauettua (JSON, x-www-form-urlencoded, XML, jne). Lisätietoa löytyy meidän <a target="_blank" rel="noopener" href="%s">koukut oppaasta</a>.
settings.payload_url=Payload URL
settings.content_type=Sisältötyyppi
settings.secret=Salaus

View File

@@ -47,7 +47,7 @@ cancel=Annuler
[install]
install=Installation
title=Instructions pour la première exécution
docker_helper=Si vous exécutez Gitea grâce à Docker, merci de lire la <a target="_blank" href="%s">procédure</a> attentivement avant de modifier quoi que ce soit sur cette page !
docker_helper=Si vous exécutez Gitea grâce à Docker, merci de lire la <a target="_blank" rel="noopener" href="%s">procédure</a> attentivement avant de modifier quoi que ce soit sur cette page !
requite_db_desc=Gitea requiert MySQL, PostgreSQL, SQLite3 ou TiDB.
db_title=Paramètres de la base de données
db_type=Type de base de données
@@ -351,7 +351,7 @@ visibility=Visibilité
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_fork_helper=(Les changement de cette valeur affecteront tous les forks)
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" rel="noopener" href="%s">l'aide</a> !
fork_repo=Créer un fork du dépôt
fork_from=Fork de
fork_visiblity_helper=La visibilité d'un fork ne peut pas être modifiée.
@@ -457,7 +457,7 @@ editor.branch_already_exists=La branche '%s' existe déjà dans ce dépôt.
editor.directory_is_a_file=L'entrée '%s' dans le chemin daccès parent est un fichier pas un répertoire dans ce dépôt.
editor.filename_is_a_directory=Le nom de fichier '%s' existe déjà dans ce dépot.
editor.file_editing_no_longer_exists=Le fichier '%s' que vous modifiez n'existe plus dans le dépôt.
editor.file_changed_while_editing=Le contenu du fichier à changé depuis que vous avez commencé à l'éditer. <a target="_blank" href="%s">Cliquez ici</a> pour voir ce qui à été modifié ou <strong>appuyez sur commit encore une fois</strong> pour remplacer ces changements.
editor.file_changed_while_editing=Le contenu du fichier à changé depuis que vous avez commencé à l'éditer. <a target="_blank" rel="noopener" href="%s">Cliquez ici</a> pour voir ce qui à été modifié ou <strong>appuyez sur commit encore une fois</strong> pour remplacer ces changements.
editor.file_already_exists=La branche '%s' existe déjà dans ce dépôt.
editor.no_changes_to_show=Il ny a aucun changement à afficher.
editor.fail_to_update_file=Échec lors de la mise à jour/création du fichier '%s' avec lerreur : %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Rechercher un utilisateur...
settings.org_not_allowed_to_be_collaborator=Une organisation n'est pas autorisée à être ajoutée en tant que collaborateur.
settings.user_is_org_member=Cet utilisateur ne peut pas être ajouté en tant que collaborateur car il fait partie d'une organisation.
settings.add_webhook=Ajouter un Webhook
settings.hooks_desc=Les Webhooks sont des déclencheurs de POST HTTP . Lorsque qu'un événement se produit dans Gitea, une notification sera envoyée vers l'hôte cible préalablement spécifié. Apprenez-en davantage dans le <a target="_blank" href="%s">Guide des Webhooks</a>.
settings.hooks_desc=Les Webhooks sont des déclencheurs de POST HTTP . Lorsque qu'un événement se produit dans Gitea, une notification sera envoyée vers l'hôte cible préalablement spécifié. Apprenez-en davantage dans le <a target="_blank" rel="noopener" href="%s">Guide des Webhooks</a>.
settings.webhook_deletion=Supprimer le Webhook
settings.webhook_deletion_desc=Supprimer ce webhook va supprimer ses informations et l'historique de livraison. Voulez-vous continuer ?
settings.webhook_deletion_success=Le webhook a été supprimé avec succès !
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Si un Hook est inactif, un exemple de contenu vous se
settings.githook_name=Nom du Hook
settings.githook_content=Contenu du Hook
settings.update_githook=Mettre le Hook à jour
settings.add_webhook_desc=Une requête <code>POST</code> sera transmise vers l'URL spécifiée selon l'événement produit. Vous pouvez également choisir le format souhaité pour la réception des données (JSON, x-www-form-urlencoded, XML etc). Pour plus d'infos, lisez le <a target="_blank" href="%s">Guide des WebHooks</a>.
settings.add_webhook_desc=Une requête <code>POST</code> sera transmise vers l'URL spécifiée selon l'événement produit. Vous pouvez également choisir le format souhaité pour la réception des données (JSON, x-www-form-urlencoded, XML etc). Pour plus d'infos, lisez le <a target="_blank" rel="noopener" href="%s">Guide des WebHooks</a>.
settings.payload_url=URL des Données Utiles
settings.content_type=Type de contenu
settings.secret=Confidentiel

View File

@@ -47,7 +47,7 @@ cancel=Annulla
[install]
install=Installazione
title=Passi d'installazione per il primo avvio
docker_helper=Se stai utilizzando Gitea su Docker, per favore leggi le <a target="_blank" href="%s">Linee guida</a> con attenzione prima di cambiare qualcosa su questa pagina!
docker_helper=Se stai utilizzando Gitea su Docker, per favore leggi le <a target="_blank" rel="noopener" href="%s">Linee guida</a> con attenzione prima di cambiare qualcosa su questa pagina!
requite_db_desc=Gitea necessita MySQL, PostgreSQL, SQLite3 o TiDB.
db_title=Impostazioni Database
db_type=Tipo di database
@@ -351,7 +351,7 @@ visibility=Visibilità
visiblity_helper=Questo repository è <span class="ui red text"> privato</span>
visiblity_helper_forced=L'amministratore del sito ha deciso che tutti i nuovi repository devono essere <span class="ui red text">privati</span>
visiblity_fork_helper=(La modifica di questo valore avrà effetto su tutti i fork)
clone_helper=Hai bisogno di aiuto per la clonazione? Visita <a target="_blank" href="%s">Aiuto</a>!
clone_helper=Hai bisogno di aiuto per la clonazione? Visita <a target="_blank" rel="noopener" href="%s">Aiuto</a>!
fork_repo=Forka Repository
fork_from=Forka da
fork_visiblity_helper=Non puoi cambiare la visibilità di un repository forkato.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Cerca utente...
settings.org_not_allowed_to_be_collaborator=Un'organizzazione non può essere aggiunta come collaboratore.
settings.user_is_org_member=L'utente è un membro dell'organizzazione che non può essere aggiunto come collaboratore.
settings.add_webhook=Aggiungi Webhook
settings.hooks_desc=I Webhooks sono molto simili a un basilare evento trigger HTTP POST. Ogni volta che qualcosa si verifica in Gitea, tratteremo la notifica all'host di destinazione specificato. Ulteriori informazioni in questa <a target="_blank" href="%s">Guida ai Webhooks</a>.
settings.hooks_desc=I Webhooks sono molto simili a un basilare evento trigger HTTP POST. Ogni volta che qualcosa si verifica in Gitea, tratteremo la notifica all'host di destinazione specificato. Ulteriori informazioni in questa <a target="_blank" rel="noopener" href="%s">Guida ai Webhooks</a>.
settings.webhook_deletion=Elimina Webhook
settings.webhook_deletion_desc=Delete this webhook will remove its information and all delivery history. Do you want to continue?
settings.webhook_deletion_success=Il Webhook è stato eliminato con successo!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Se l'hook è inattivo, sarà presentato un contenuto
settings.githook_name=Nome hook
settings.githook_content=Contenuto hook
settings.update_githook=Aggiorna Hook
settings.add_webhook_desc=Gitea manderà una richiesta <code>POST</code> all'URL specificata, insieme alle informazioni sull'evento avvenuto. Puoi anche specificare quale tipo di formato dati vorresti ottenere all'innesco dell'hook (JSON, x-www-form-urlencoded, XML, ecc). Puoi trovare più informazioni nella nostra <a target="_blank" href="%s">Guida ai Webhook</a>.
settings.add_webhook_desc=Gitea manderà una richiesta <code>POST</code> all'URL specificata, insieme alle informazioni sull'evento avvenuto. Puoi anche specificare quale tipo di formato dati vorresti ottenere all'innesco dell'hook (JSON, x-www-form-urlencoded, XML, ecc). Puoi trovare più informazioni nella nostra <a target="_blank" rel="noopener" href="%s">Guida ai Webhook</a>.
settings.payload_url=Payload URL
settings.content_type=Content Type
settings.secret=Secret

View File

@@ -47,7 +47,7 @@ cancel=キャンセル
[install]
install=インストール
title=インストールをする前に必要な準備をしましょう
docker_helper=DockerでGogsを稼動する場合は、このページに変更を加える前に、 <a target="_blank" href="%s">ガイドライン</a>をよく読んでください!
docker_helper=DockerでGogsを稼動する場合は、このページに変更を加える前に、 <a target="_blank" rel="noopener" href="%s">ガイドライン</a>をよく読んでください!
requite_db_desc=Gitea は、MySQL、PostgreSQL、SQLite3 または TiDB が必要です。
db_title=データベース設定
db_type=データベースの種類
@@ -351,7 +351,7 @@ visibility=公開/非公開
visiblity_helper=このリポジトリは<span class="ui red text">プライベート</span>です。
visiblity_helper_forced=サイト管理者は、強制的にすべての新しいリポジトリを<span class="ui red text"> プライベート</span> にしています。
visiblity_fork_helper=(この値の変更はすべてのフォークに適用されます)
clone_helper=クローンに関してお困りであれば<a target="_blank"href="%s"> ヘルプ</a> を参照しましょう。
clone_helper=クローンに関してお困りであれば<a target="_blank" rel="noopener"href="%s"> ヘルプ</a> を参照しましょう。
fork_repo=リポジトリをフォーク
fork_from=フォーク元
fork_visiblity_helper=フォークされたリポジトリの可視状態は変更できません。
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Search users
settings.org_not_allowed_to_be_collaborator=組織を共同編集者として追加することはできません。
settings.user_is_org_member=ユーザーは組織の一員なので、共同編集者として追加することはできません。
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" rel="noopener"href="%s"> Webhooks ガイド</a>をご覧ください。
settings.webhook_deletion=Webhook を削除
settings.webhook_deletion_desc=このwebhookを削除すると、すべての情報と配信履歴が削除されます。続行しますか
settings.webhook_deletion_success=Webhook が正常に削除されました。
@@ -707,7 +707,7 @@ settings.githook_edit_desc=もしフックがアクティブではない場合
settings.githook_name=フックの名前
settings.githook_content=コンテンツをフック
settings.update_githook=フックを更新
settings.add_webhook_desc=私たちは、指定されたURLに購読されたイベントの詳細を <code>POST</code>リクエストとして送信します。あなたは、異なるデータ受信モード(JSONまたは, <code>x-www-form-urlencoded</code>, <em>その他</em>) を設定することができます。詳細については、<a target="_blank" href="%s">Webhookガイド</a>を参照してください。
settings.add_webhook_desc=私たちは、指定されたURLに購読されたイベントの詳細を <code>POST</code>リクエストとして送信します。あなたは、異なるデータ受信モード(JSONまたは, <code>x-www-form-urlencoded</code>, <em>その他</em>) を設定することができます。詳細については、<a target="_blank" rel="noopener" href="%s">Webhookガイド</a>を参照してください。
settings.payload_url=ペイロードの URL
settings.content_type=コンテンツ タイプ
settings.secret=秘密

View File

@@ -47,7 +47,7 @@ cancel=Atcelt
[install]
install=Instalācija
title=Instalācijas soļi pirmo reizi palaižot
docker_helper=Ja Gitea tiek lietots zem Docker, izlasiet uzmanīgi <a target="_blank" href="%s">vadlīnijas</a>, pirms ko maināt šajā lapā!
docker_helper=Ja Gitea tiek lietots zem Docker, izlasiet uzmanīgi <a target="_blank" rel="noopener" href="%s">vadlīnijas</a>, pirms ko maināt šajā lapā!
requite_db_desc=Gitea nepieciešams MySQL, PostgreSQL, SQLite3 vai TiDB.
db_title=Datu bāzes iestatījumi
db_type=Datu bāzes veids
@@ -351,7 +351,7 @@ visibility=Redzamība
visiblity_helper=Šis repozitorijs ir <span class="ui red text">privāts</span>
visiblity_helper_forced=Lapas administrators ir noteicis, ka visiem repozitorijiem ir jābūt <span class="ui red text">privātiem</span>
visiblity_fork_helper=(Šīs vērtības maiņa ietekmēs arī visus atdalītos repozitorijus)
clone_helper=Nepieciešama palīdzība kā veikt klonēšana? Apmeklējiet <a target="_blank" href="%s">Palīdzība</a> lapu!
clone_helper=Nepieciešama palīdzība kā veikt klonēšana? Apmeklējiet <a target="_blank" rel="noopener" href="%s">Palīdzība</a> lapu!
fork_repo=Atdalīt repozitoriju
fork_from=Atdalīt no
fork_visiblity_helper=Atdalītam repozitorijam nav iespējams nomainīt tā redzamību
@@ -457,7 +457,7 @@ editor.branch_already_exists=Atzars '%s' šajā repozitorijā jau eksistē.
editor.directory_is_a_file=Ieraksts '%s' vecāka ceļā ir fails nevis direktorija šajā repozitorijā.
editor.filename_is_a_directory=Faila nosaukums '%s' sakrīt ar direktorijas nosaukumu šajā repozitorijā.
editor.file_editing_no_longer_exists=Fails '%s', ko labojat, vairs neeksistē repozitorijā.
editor.file_changed_while_editing=Faila saturs ir mainījies kopš brīža, kad sākāt to labot. <a target="_blank" href="%s">Nospiediet šeit</a>, lai redzētu kas ir mainījies vai <strong>nospiediet atkārtoti pabeigt revīziju</strong>, lai pārrakstītu izmaiņas.
editor.file_changed_while_editing=Faila saturs ir mainījies kopš brīža, kad sākāt to labot. <a target="_blank" rel="noopener" href="%s">Nospiediet šeit</a>, lai redzētu kas ir mainījies vai <strong>nospiediet atkārtoti pabeigt revīziju</strong>, lai pārrakstītu izmaiņas.
editor.file_already_exists=Fails ar nosaukumu '%s' repozitorijā jau eksistē.
editor.no_changes_to_show=Nav izmaiņu, ko rādīt.
editor.fail_to_update_file=Neizdevās izmainīt/izveidot failu '%s', kļūda: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Meklēt lietotāju...
settings.org_not_allowed_to_be_collaborator=Organizāciju nav atļauts pievienot kā līdzstrādnieku.
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.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" rel="noopener" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
settings.webhook_deletion=Dzēst tīmekļa āķi
settings.webhook_deletion_desc=Dzēšot tīmekļa āķi tiks dzēsta visa ar to saistītā informācija un izpildes vēsture. Vai vēlaties turpināt?
settings.webhook_deletion_success=Tīmekļa āķis tika veiksmīgi izdzēsts!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Ja āķis nav aktīvs, tiks attēlots piemērs kā to
settings.githook_name=Āķa nosaukums
settings.githook_content=Āķa saturs
settings.update_githook=Labot āķi
settings.add_webhook_desc=Uz norādīto URL tiks nosūtīts <code>POST</code> pieprasījums ar notikuma datiem. Jūs varat norādīt arī datu formātu, kādā datus vēlaties saņemt (JSON, <code>x-www-form-urlencoded</code> <em>utt.</em>). Detalizētāku informāciju ir iespējams uzzināt <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
settings.add_webhook_desc=Uz norādīto URL tiks nosūtīts <code>POST</code> pieprasījums ar notikuma datiem. Jūs varat norādīt arī datu formātu, kādā datus vēlaties saņemt (JSON, <code>x-www-form-urlencoded</code> <em>utt.</em>). Detalizētāku informāciju ir iespējams uzzināt <a target="_blank" rel="noopener" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
settings.payload_url=Vērtuma URL
settings.content_type=Satura tips
settings.secret=Noslēpums

View File

@@ -47,7 +47,7 @@ cancel=Annuleren
[install]
install=Installatie
title=Installatiestappen voor de eerste keer opstarten
docker_helper=Als u gebruik maakt Gitea binnen Docker, lees dan de <a target="_blank" href="%s">richtlijnen</a> voordat u iets veranderen op deze pagina!
docker_helper=Als u gebruik maakt Gitea binnen Docker, lees dan de <a target="_blank" rel="noopener" href="%s">richtlijnen</a> voordat u iets veranderen op deze pagina!
requite_db_desc=Gitea vereist MySQL, PostgreSQL, SQite3 of TiDB.
db_title=Database-instellingen
db_type=Database-type
@@ -351,7 +351,7 @@ visibility=Zichtbaarheid
visiblity_helper=Deze repositorie is <span class="ui red text">privaat</span>
visiblity_helper_forced=Sitebeheerder heeft alle nieuwe repositories gedwongen <span class="ui red text">privé</span> te zijn
visiblity_fork_helper=(Verandering van deze waarde zal van invloed zijn op alle forks)
clone_helper=De behoeftehulp van klonen? Bezoek <a target="_blank" href="%s"> helpen</a>!
clone_helper=De behoeftehulp van klonen? Bezoek <a target="_blank" rel="noopener" href="%s"> helpen</a>!
fork_repo=Repository forken
fork_from=Afsplitsing van
fork_visiblity_helper=U kunt de zichtbaarheid van een geforkte repository niet aanpassen.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Zoek gebruiker...
settings.org_not_allowed_to_be_collaborator=De organisatie kan niet toegevoegd worden als medewerker.
settings.user_is_org_member=Gebruiker is lid van de organisatie die als een medewerker kan niet worden toegevoegd.
settings.add_webhook=Webhook toevoegen
settings.hooks_desc=Webhooks dat de externe diensten om kennisgevingen te ontvangen wanneer bepaalde gebeurtenissen op Gitea plaatsvinden. Wanneer de opgegeven gebeurtenissen plaatsvinden, sturen we een POST-aanvraag naar elk van de URL's die u opgeeft. Meer informatie vindt u in onze <a target="_blank" href="%s"> Webhooks gids</a>.
settings.hooks_desc=Webhooks dat de externe diensten om kennisgevingen te ontvangen wanneer bepaalde gebeurtenissen op Gitea plaatsvinden. Wanneer de opgegeven gebeurtenissen plaatsvinden, sturen we een POST-aanvraag naar elk van de URL's die u opgeeft. Meer informatie vindt u in onze <a target="_blank" rel="noopener" href="%s"> Webhooks gids</a>.
settings.webhook_deletion=Webhook verwijderen
settings.webhook_deletion_desc=Verwijderen van deze webhook zal de informatie en alle geschiedenis verwijderen. Wilt u doorgaan?
settings.webhook_deletion_success=Webhook is succesvol verwijderd!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Als haak niet actief is, zal monster inhoud worden ge
settings.githook_name=Haak naam
settings.githook_content=Haak inhoud
settings.update_githook=Haak bijwerken
settings.add_webhook_desc=We sturen een <code>POST</code>-aanvraag naar de onderstaande URL met details voor alle geplaatste gebeurtenissen. U kunt ook opgeven welke gegevensindeling u wenst te ontvangen (JSON, <code>x-1-800-www-Dell-vorm-urlencoded</code>, <em>enz</em>.). Meer informatie kan gevonden worden in <a target="_blank" href="%s"> Webhooks gids</a>.
settings.add_webhook_desc=We sturen een <code>POST</code>-aanvraag naar de onderstaande URL met details voor alle geplaatste gebeurtenissen. U kunt ook opgeven welke gegevensindeling u wenst te ontvangen (JSON, <code>x-1-800-www-Dell-vorm-urlencoded</code>, <em>enz</em>.). Meer informatie kan gevonden worden in <a target="_blank" rel="noopener" href="%s"> Webhooks gids</a>.
settings.payload_url=Nettolading URL
settings.content_type=Content type
settings.secret=Geheim

View File

@@ -47,7 +47,7 @@ cancel=Anuluj
[install]
install=Instalacja
title=Kroki instalacyjne dla pierwszego uruchomienia
docker_helper=Jeśli używasz Gitea wewnątrz Dockera, proszę przeczytaj <a target="_blank" href="%s">wytyczne</a>, zanim zmienisz coś na tej stronie!
docker_helper=Jeśli używasz Gitea wewnątrz Dockera, proszę przeczytaj <a target="_blank" rel="noopener" href="%s">wytyczne</a>, zanim zmienisz coś na tej stronie!
requite_db_desc=Gitea wymaga MySQL, PostgreSQL, SQLite3 lub TiDB.
db_title=Ustawienia bazy danych
db_type=Typ bazy danych
@@ -351,7 +351,7 @@ visibility=Widoczność
visiblity_helper=To repozytorium jest <span class="ui red text">prywatne</span>
visiblity_helper_forced=Administrator systemu wymaga, żeby wszystkie nowe repozytoria były <span class="ui red text">Prywatne</span>
visiblity_fork_helper=(Zmiana tej wartości wpłynie na wszystkie forki)
clone_helper=Potrzebujesz pomocy z klonowaniem? Odwiedź <a target="_blank" href="%s">Pomoc</a>!
clone_helper=Potrzebujesz pomocy z klonowaniem? Odwiedź <a target="_blank" rel="noopener" href="%s">Pomoc</a>!
fork_repo=Sforkowane
fork_from=Forkuj z
fork_visiblity_helper=Fork nie może zmieniać swojej widoczności
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Szukaj użytkownika...
settings.org_not_allowed_to_be_collaborator=Organizacji nie można dodać jako współpracownika.
settings.user_is_org_member=Użytkownik jest członkiem organizacji, który nie może być dodany jako współpracownik.
settings.add_webhook=Dodaj webhooka
settings.hooks_desc=Webooki działają tak jak proste wywołania HTTP POST. Jeśli cokolwiek zdarzy się w Gitea, wyślemy powiadomienie do wybranego hosta. Więcej informacji można znaleźć w <a target="_blank" href="%s">przewodniku webhooków</a>.
settings.hooks_desc=Webooki działają tak jak proste wywołania HTTP POST. Jeśli cokolwiek zdarzy się w Gitea, wyślemy powiadomienie do wybranego hosta. Więcej informacji można znaleźć w <a target="_blank" rel="noopener" href="%s">przewodniku webhooków</a>.
settings.webhook_deletion=Usuń webhooka
settings.webhook_deletion_desc=Usunięcie tego webooka spowoduje usunięcie powiązanych informacji i wpisów w historii. Czy chcesz kontynuować?
settings.webhook_deletion_success=Webhook został pomyślnie usunięty!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Jeśli hook jest nieaktywny, zaprezentowana zostanie
settings.githook_name=Nazwa hooka
settings.githook_content=Treść hooka
settings.update_githook=Zaktualizuj hook
settings.add_webhook_desc=Wyślemy żądanie <code>POST</code> pod poniższy adres ze szczegółami zdarzeń. Możesz również ustalić format danych zapytania (JSON, x-www-form-urlencoded, XML, itp.). Więcej informacji można znaleźć w <a target="_blank" href="%s">przewodniku webhooków</a>.
settings.add_webhook_desc=Wyślemy żądanie <code>POST</code> pod poniższy adres ze szczegółami zdarzeń. Możesz również ustalić format danych zapytania (JSON, x-www-form-urlencoded, XML, itp.). Więcej informacji można znaleźć w <a target="_blank" rel="noopener" href="%s">przewodniku webhooków</a>.
settings.payload_url=URL do wywołania
settings.content_type=Typ zawartości
settings.secret=Sekret

View File

@@ -13,6 +13,7 @@ version=Versão
page=Página
template=Template
language=Idioma
notifications = Notificações
create_new=Criar...
user_profile_and_more=Perfil do usuário e configurações
signed_in_as=Logado como
@@ -47,7 +48,7 @@ cancel=Cancelar
[install]
install=Instalação
title=Etapas de instalação para primeira execução
docker_helper=Se você está rodando o Gitea dentro do Docker, por favor leia os <a target="_blank" href="%s">Guias</a> cuidadosamente antes de mudar qualquer coisa nesta página!
docker_helper=Se você está rodando o Gitea dentro do Docker, por favor leia os <a target="_blank" rel="noopener" href="%s">Guias</a> cuidadosamente antes de mudar qualquer coisa nesta página!
requite_db_desc=Gitea requer MySQL, PostgreSQL, SQLite3 ou TiDB.
db_title=Configurações de banco de dados
db_type=Tipo de banco de dados
@@ -351,7 +352,7 @@ visibility=Visibilidade
visiblity_helper=Este é um repositório <span class="ui red text"> privado</span>
visiblity_helper_forced=O adminstrador forçou todos os novos repositórios para serem <span class="ui red text">privados</span>
visiblity_fork_helper=(A alteração desse valor irá afetar todos os forks)
clone_helper=Precisa de ajuda com o clone? Visite a <a target="_blank" href="%s">Ajuda</a>!
clone_helper=Precisa de ajuda com o clone? Visite a <a target="_blank" rel="noopener" href="%s">Ajuda</a>!
fork_repo=Fork do repositório
fork_from=Fork de
fork_visiblity_helper=Não é possível alterar a visibilidade de um repositório fork.
@@ -457,7 +458,7 @@ editor.branch_already_exists=Branch '%s' já existe neste repositório.
editor.directory_is_a_file=Entrada '%s' no caminho pai é um arquivo e não uma pasta neste repositório.
editor.filename_is_a_directory=O arquivo '%s' é uma pasta existente neste repositório.
editor.file_editing_no_longer_exists=O arquivo '%s' que você está editando não existe mais neste repositório.
editor.file_changed_while_editing=O conteúdo do arquivo mudou desde que você começou a editar. <a target="_blank" href="%s">Clique aqui</a> para ver o que mudou ou <strong>pressione efetivar novamente</strong> para sobrescrever esses mudanças.
editor.file_changed_while_editing=O conteúdo do arquivo mudou desde que você começou a editar. <a target="_blank" rel="noopener" href="%s">Clique aqui</a> para ver o que mudou ou <strong>pressione efetivar novamente</strong> para sobrescrever esses mudanças.
editor.file_already_exists=Um arquivo com nome '%s' já existe neste repositório.
editor.no_changes_to_show=Nenhuma alteração a mostrar.
editor.fail_to_update_file=Houve erro ao criar ou atualizar arquivo '%s': %v
@@ -690,7 +691,7 @@ settings.search_user_placeholder=Pesquisar usuário...
settings.org_not_allowed_to_be_collaborator=Organização não tem permissão para ser adicionada 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.hooks_desc=Hooks da web ou Webhooks permitem serviços externos serem notificados quando certos eventos acontecem no Gitea. 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 Gitea. 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" rel="noopener" href="%s"> Guia de Webhooks</a>.
settings.webhook_deletion=Deletar Webhook
settings.webhook_deletion_desc=Deletar este Webhook vai remover sua informação e todo o histórico de entrega. Deseja continuar?
settings.webhook_deletion_success=Webhook deletado com sucesso!
@@ -707,7 +708,7 @@ settings.githook_edit_desc=Se o hook não estiver ativo, o conteúdo de exemplo
settings.githook_name=Nome do Hook
settings.githook_content=Conteúdo do Hook
settings.update_githook=Atualizar Hook
settings.add_webhook_desc=Enviaremos uma solicitação <code>POST</code> para o URL abaixo com detalhes de quaisquer eventos inscritos. Você pode também especificar qual formato de dados você gostaria de receber (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mais informação pode ser encontrada em <a target="_blank" href="%s">Webhooks Guide</a>.
settings.add_webhook_desc=Enviaremos uma solicitação <code>POST</code> para o URL abaixo com detalhes de quaisquer eventos inscritos. Você pode também especificar qual formato de dados você gostaria de receber (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mais informação pode ser encontrada em <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.payload_url=URL de Payload
settings.content_type=Tipo de conteúdo
settings.secret=Secreto
@@ -1198,3 +1199,9 @@ invalid_input_type=Você não pode enviar arquivos deste tipo.
file_too_big=O tamanho do arquivo ({{filesize}} MB) excede o limite máximo ({{maxFilesize}} MB).
remove_file=Remover
[notification]
notifications = Notificações
unread = Não lidas
read = Lidas
no_unread = Você não possui notificações não lidas.
no_read = Você não possui notificações lidas.

View File

@@ -47,7 +47,7 @@ cancel=Отмена
[install]
install=Установка
title=Установочные шаги для первого запуска
docker_helper=Если вы запускаете Gitea внутри Docker, пожалуйста прочтите <a target="_blank" href="%s">эти советы</a> внимательно перед тем как что-либо изменить на этой странице!
docker_helper=Если вы запускаете Gitea внутри Docker, пожалуйста прочтите <a target="_blank" rel="noopener" href="%s">эти советы</a> внимательно перед тем как что-либо изменить на этой странице!
requite_db_desc=Gitea требует MySQL, PostgreSQL, SQLite3 или TiDB.
db_title=Настройки базы данных
db_type=Тип базы данных
@@ -351,7 +351,7 @@ visibility=Видимость
visiblity_helper=<span class="ui red text">Личный</span> репозиторий
visiblity_helper_forced=Все новые репозитории являются <span class="ui red text">Личными</span> по желанию администратора сайта
visiblity_fork_helper=(Изменение этого значения затронет все ответвления)
clone_helper=Нужна помощь в клонировании? Посетите страницу <a target="_blank" href="%s">помощи</a>!
clone_helper=Нужна помощь в клонировании? Посетите страницу <a target="_blank" rel="noopener" href="%s">помощи</a>!
fork_repo=Ответвить репозиторий
fork_from=Ответвление от
fork_visiblity_helper=Ответвленному репозиторию нельзя поменять уровень видимости
@@ -457,7 +457,7 @@ editor.branch_already_exists=Ветка «%s» уже существует в э
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=Файл с именем «%s» уже существует в этом репозитории.
editor.no_changes_to_show=Нет изменений.
editor.fail_to_update_file=Не удалось обновить/создать файл «%s» из-за ошибки: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Поиск пользователя...
settings.org_not_allowed_to_be_collaborator=Организации не могут быть добавлены как соавторы.
settings.user_is_org_member=Пользователь является членом организации, члены которой не могут быть добавлены в качестве соавтора.
settings.add_webhook=Добавить Webhook
settings.hooks_desc=Webhooks позволяют внешним службам получать уведомления при возникновении определенных событий на Gitea. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" href="%s">Руководстве по Webhooks</a>.
settings.hooks_desc=Webhooks позволяют внешним службам получать уведомления при возникновении определенных событий на Gitea. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" rel="noopener" href="%s">Руководстве по Webhooks</a>.
settings.webhook_deletion=Удалить веб-хук
settings.webhook_deletion_desc=Удаление этого веб-хука приведет к удалению всей, связанной с ним, информации, включая историю. Хотите продолжить?
settings.webhook_deletion_success=Веб-хук успешно удален!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Если хук не активен, будет по
settings.githook_name=Название Hook'a
settings.githook_content=Перехватить содержание
settings.update_githook=Обновить Hook
settings.add_webhook_desc=Мы отправим запрос <code>POST</code> на указанный ниже URL с информацией о событиях. Можно также указать формат, в котором вы бы хотели получить данные (JSON, <code>x-www-form-urlencoded</code>, <em>и т.д.</em>). Дополнительную информацию можно найти в <a target="_blank" href="%s">Руководстве по Webhook</a>.
settings.add_webhook_desc=Мы отправим запрос <code>POST</code> на указанный ниже URL с информацией о событиях. Можно также указать формат, в котором вы бы хотели получить данные (JSON, <code>x-www-form-urlencoded</code>, <em>и т.д.</em>). Дополнительную информацию можно найти в <a target="_blank" rel="noopener" href="%s">Руководстве по Webhook</a>.
settings.payload_url=URL обработчика
settings.content_type=Тип содержимого
settings.secret=Secret

View File

@@ -47,7 +47,7 @@ cancel=Откажи
[install]
install=Инсталација
title=Инсталационе кораке за првог покретања
docker_helper=Ако покрећете Gitea унутар Docker, молимо прочитајте <a target="_blank" href="%s">ове савете</a> пажљиво пре него што сте било шта променили на овој страници!
docker_helper=Ако покрећете Gitea унутар Docker, молимо прочитајте <a target="_blank" rel="noopener" href="%s">ове савете</a> пажљиво пре него што сте било шта променили на овој страници!
requite_db_desc=Gogs-у је потребно MySQL, PostgreSQL, SQLite3 или TiDB.
db_title=Подешавања базе
db_type=Тип базе података
@@ -351,7 +351,7 @@ visibility=Видљивост
visiblity_helper=<span class="ui red text">Приватно</span> спремиште
visiblity_helper_forced=Сва нова спремишта су <span class="ui red text">приватна</span> по одлуци администратора.
visiblity_fork_helper=(Промена ове вредности ће утицати на све гране)
clone_helper=Потребна вам помоћ клонирањем? Посетите страницу <a target="_blank" href="%s">Помоћ</a>!
clone_helper=Потребна вам помоћ клонирањем? Посетите страницу <a target="_blank" rel="noopener" href="%s">Помоћ</a>!
fork_repo=Креирај огранак спремишта
fork_from=Огранак од
fork_visiblity_helper=Ниво видљивости не може бити промењено за огранак спремишта.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Грана '%s' већ постоји за ово
editor.directory_is_a_file='%s' је већ постојећа датотека а не директоријум у спремишту.
editor.filename_is_a_directory='%s' је постојећи директоријум у спремишту.
editor.file_editing_no_longer_exists=Датотека '%s' више не постоји у спремишту.
editor.file_changed_while_editing=Садржај датотеке је промењен од почетка уређивања. <a target="_blank" href="%s">Кликните овде</a> да видите шта је промењено или <strong>опет поднесите комит</strong> да пребришете промене.
editor.file_changed_while_editing=Садржај датотеке је промењен од почетка уређивања. <a target="_blank" rel="noopener" href="%s">Кликните овде</a> да видите шта је промењено или <strong>опет поднесите комит</strong> да пребришете промене.
editor.file_already_exists=Датотека са именом '%s' већ постоји у овом спремишту.
editor.no_changes_to_show=Нема никаквих промена.
editor.fail_to_update_file=Промена над '%s' није успело са грешком: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Претрага корисника...
settings.org_not_allowed_to_be_collaborator=Неможе се додати организација као сарадник.
settings.user_is_org_member=Корисник је члан организације и потом неможе бити додат као сарадник.
settings.add_webhook=Додај Webhook
settings.hooks_desc=Webhooks омогућавају спољашњим услугама да приме обавештења када се нешто одређено догоди на Gitea. Сазнајте више у овом <a target="_blank" href="%s">водичу за Webhooks</a>.
settings.hooks_desc=Webhooks омогућавају спољашњим услугама да приме обавештења када се нешто одређено догоди на Gitea. Сазнајте више у овом <a target="_blank" rel="noopener" href="%s">водичу за Webhooks</a>.
settings.webhook_deletion=Уклони Webhook
settings.webhook_deletion_desc=Брисање овог Webhook ће довести до уклањања сву наведену информацију, укључујући и историју. Да ли желите да наставите?
settings.webhook_deletion_success=Webhook успешно избрисан!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Aко Webhook није активан, примерн
settings.githook_name=Име Hook-а
settings.githook_content=Садржај Hook-а
settings.update_githook=Ажурирај Hook
settings.add_webhook_desc=Послаћемо захтев <code>POST</code> на наведену URL адресу са информацијама о догађајима. Такође можете да одредите формат у коме би желели да добију податке (JSON, x-www-form-urlencoded, XML, итд.). Додатне информације могу се наћи у <a target="_blank" href="%s">Упутство за Webhooks</a>.
settings.add_webhook_desc=Послаћемо захтев <code>POST</code> на наведену URL адресу са информацијама о догађајима. Такође можете да одредите формат у коме би желели да добију податке (JSON, x-www-form-urlencoded, XML, итд.). Додатне информације могу се наћи у <a target="_blank" rel="noopener" href="%s">Упутство за Webhooks</a>.
settings.payload_url=URL адреса за слање
settings.content_type=Тип садржаја
settings.secret=Тајна

View File

@@ -47,7 +47,7 @@ cancel=Avbryt
[install]
install=Installation
title=Steg för att installera för första gången
docker_helper=Om du kör Gogs inuti Docker, vänligen läs <a target="_blank" href="%s">Riktninjerna</a> nogrant innan du ändrar någonting på denna sida!
docker_helper=Om du kör Gogs inuti Docker, vänligen läs <a target="_blank" rel="noopener" href="%s">Riktninjerna</a> nogrant innan du ändrar någonting på denna sida!
requite_db_desc=Gogs kräver MySQL, PostgreSQL, SQLite3 eller TiDB.
db_title=Databasinställningar
db_type=Databastyp
@@ -351,7 +351,7 @@ visibility=Synligt för
visiblity_helper=Denna utvecklingskatalog är <span class="ui red text">Privat</span>
visiblity_helper_forced=Administratören har tvingat alla nya utvecklingskataloger att vara <span class="ui red text">Privata</span>
visiblity_fork_helper=(Ändring av detta värde kommer att påverka alla forks)
clone_helper=Behöver du hjälp med kloning? Gå till <a target="_blank" href="%s">Hjälp</a>!
clone_helper=Behöver du hjälp med kloning? Gå till <a target="_blank" rel="noopener" href="%s">Hjälp</a>!
fork_repo=Forka Repo
fork_from=Forka Från
fork_visiblity_helper=Du kan inte ändra offentligheten på ett forkat repo.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Grenen '%s' finns redan i förrådet.
editor.directory_is_a_file=Komponenten '%s' i föräldrasökvägen är en fil, inte en katalog i detta förråd.
editor.filename_is_a_directory=Filnmanet '%s' är en existerande katalog i detta förråd.
editor.file_editing_no_longer_exists=Filen '%s' som du redigerar finns inte lägre i förrådet.
editor.file_changed_while_editing=Filinnhållet har ändrats sedan du började redigera. <a target="_blank" href="%s">Klicka här</a> för att se vad som ändrats eller <strong>tryck checka in igen</strong> för att skriva över dessa ändringar.
editor.file_changed_while_editing=Filinnhållet har ändrats sedan du började redigera. <a target="_blank" rel="noopener" href="%s">Klicka här</a> för att se vad som ändrats eller <strong>tryck checka in igen</strong> för att skriva över dessa ändringar.
editor.file_already_exists=En fil med namnet '%s' finns redan i förrådet.
editor.no_changes_to_show=Det finns inga ändringar att visa.
editor.fail_to_update_file=Uppdateringen/skapandet av filen '%s' misslyckades med felet: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Sök användare...
settings.org_not_allowed_to_be_collaborator=Organisationen kan inte läggas till som en deltagare.
settings.user_is_org_member=Änvändaren är en organisationsmedlem som inte kan bli tillagd som deltagare.
settings.add_webhook=Lägg Till Webbhook
settings.hooks_desc=Webbhookar påminner mycket om vanliga HTTP POST-händelseutlösare. När något inträffar i Gogs, kommer vi att meddela måldatorn som du anger. Läs mera i <a target="_blank" href="%s">Webbhook Guide</a>.
settings.hooks_desc=Webbhookar påminner mycket om vanliga HTTP POST-händelseutlösare. När något inträffar i Gogs, kommer vi att meddela måldatorn som du anger. Läs mera i <a target="_blank" rel="noopener" href="%s">Webbhook Guide</a>.
settings.webhook_deletion=Ta Bort Webbhook
settings.webhook_deletion_desc=Borttagning av denna webbhook kommer att ta bort all dess information och all leveranshistorik. Är du säker på att du vill fortsätta?
settings.webhook_deletion_success=Webbhook har tagits bort!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=Om kroken är inaktiv visas exempelinnehåll. Inaktiv
settings.githook_name=Kroknamn
settings.githook_content=Krokinnehåll
settings.update_githook=Uppdatera krok
settings.add_webhook_desc=Gogs kommer skicka <code>POST</code>-anrop till webbadressen du anger, tillsammans med information om händelsen som inträffade. Du kan också ange vilken sorts dataformat du vill få när kroken triggas (JSON, x-www-form-urlencoded, XML et.c.). Mer information finns i vår <a target="_blank" href="%s">Webhooks Guide</a>.
settings.add_webhook_desc=Gogs kommer skicka <code>POST</code>-anrop till webbadressen du anger, tillsammans med information om händelsen som inträffade. Du kan också ange vilken sorts dataformat du vill få när kroken triggas (JSON, x-www-form-urlencoded, XML et.c.). Mer information finns i vår <a target="_blank" rel="noopener" href="%s">Webhooks Guide</a>.
settings.payload_url=Adress till innehåll
settings.content_type=Typ av innehåll
settings.secret=Hemlighet

View File

@@ -47,7 +47,7 @@ cancel=İptal
[install]
install=Kurulum
title=İlk Kez Çalıştırma İçin Kurulum Adımları
docker_helper=Gogs'u Docker içinde kullanıyorsanız bu sayfada herhangi bir değişiklik yapmadan önce lütfen <a target="_blank" href="%s">kılavuzu</a> dikkatlice okuyunuz!
docker_helper=Gogs'u Docker içinde kullanıyorsanız bu sayfada herhangi bir değişiklik yapmadan önce lütfen <a target="_blank" rel="noopener" href="%s">kılavuzu</a> dikkatlice okuyunuz!
requite_db_desc=Gitea MySQL, PostgreSQL, SQLite3 veya TiDB gerektirir.
db_title=Veritabanı Ayarları
db_type=Veritabanı Türü
@@ -351,7 +351,7 @@ visibility=Görünürlük
visiblity_helper=Bu depo <span class="ui red text">Özel</span>
visiblity_helper_forced=Site yöneticisi tüm depolara erişimleri <span class="ui red text">Özel</span> olarak ayarlamaya zorladı
visiblity_fork_helper=(Bu değerin değişmesi tüm çatallamaları etkileyecektir)
clone_helper=Klonlama konusunda yardıma mı ihtiyacınız var? <a target="_blank" href="%s">Yardım</a> bağlantısını ziyaret edin!
clone_helper=Klonlama konusunda yardıma mı ihtiyacınız var? <a target="_blank" rel="noopener" href="%s">Yardım</a> bağlantısını ziyaret edin!
fork_repo=Depoyu Çatalla
fork_from=Buradan Çatalla
fork_visiblity_helper=Çatallanmış bir deponun görünürlüğünü değiştiremezsiniz.
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=Kullanıcı ara...
settings.org_not_allowed_to_be_collaborator=Organizasyon, bir katkıcı olarak eklenemez.
settings.user_is_org_member=Kullanıcı organizasyon üyesi olduğu için katkıcı olarak eklenemez.
settings.add_webhook=Web İsteği Ekle
settings.hooks_desc=Web istekleri, HTTP POST olay tetikleyicileri gibidirler. Gitea'ta ne zaman bir şey olsa, hedef belirttiğiniz sunuculara bildirim yapabilecek duruma geliriz. Daha fazla bilgiyi <a target="_blank" href="%s">Web İstekleri Kılavuzu</a>'nda bulabilirsiniz.
settings.hooks_desc=Web istekleri, HTTP POST olay tetikleyicileri gibidirler. Gitea'ta ne zaman bir şey olsa, hedef belirttiğiniz sunuculara bildirim yapabilecek duruma geliriz. Daha fazla bilgiyi <a target="_blank" rel="noopener" href="%s">Web İstekleri Kılavuzu</a>'nda bulabilirsiniz.
settings.webhook_deletion=Web İsteğini Sil
settings.webhook_deletion_desc=Bu web isteğini silerseniz buna bağlı olan tüm bilgiler ve dağıtım geçmişi de silinecektir. Devam etmek istiyor musunuz?
settings.webhook_deletion_success=Web isteği başarıyla silindi!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=İstek aktif değilse örnek içerik sunulacaktır.
settings.githook_name=İstek İsmi
settings.githook_content=İstek İçeriği
settings.update_githook=İsteği Güncelle
settings.add_webhook_desc=Gogs, meydana gelen olay ile birlikte belirttiğiniz bağlantıya bir <code>POST</code> isteği gönderecektir. Ayrıca tetiklenen istek (JSON, x-www-form-urlencoded, XML, vb) üzerine bir veri formatı belirtebilirsiniz. Daha fazla bilgiyi <a target="_blank" href="%s">Web İstekleri Kılavuzu</a> bağlantımızda bulabilirsiniz.
settings.add_webhook_desc=Gogs, meydana gelen olay ile birlikte belirttiğiniz bağlantıya bir <code>POST</code> isteği gönderecektir. Ayrıca tetiklenen istek (JSON, x-www-form-urlencoded, XML, vb) üzerine bir veri formatı belirtebilirsiniz. Daha fazla bilgiyi <a target="_blank" rel="noopener" href="%s">Web İstekleri Kılavuzu</a> bağlantımızda bulabilirsiniz.
settings.payload_url=Yük Bağlantısı
settings.content_type=İçerik Türü
settings.secret=Gizli

View File

@@ -47,7 +47,7 @@ cancel=取消
[install]
install=安装页面
title=首次运行安装程序
docker_helper=如果您正在使用 Docker 容器运行 Gitea请务必先仔细阅读 <a target="_blank" href="%s">官方文档</a> 后再对本页面进行填写。
docker_helper=如果您正在使用 Docker 容器运行 Gitea请务必先仔细阅读 <a target="_blank" rel="noopener" href="%s">官方文档</a> 后再对本页面进行填写。
requite_db_desc=Gitea 要求安装 MySQL、PostgreSQL、SQLite3 或 TiDB。
db_title=数据库设置
db_type=数据库类型
@@ -139,6 +139,9 @@ repos=仓库
users=用户
organizations=组织
search=搜索
repo_no_results = 没有匹配的仓库。
user_no_results = 没有匹配的用户。
org_no_results = 没有匹配的组织。
[auth]
create_new_account=创建帐户
@@ -352,7 +355,7 @@ visibility=可见性
visiblity_helper=该仓库为 <span class="ui red text">私有的</span>
visiblity_helper_forced=网站管理员已强制要求所有新建仓库必须为 <span class="ui red text">私有的</span>
visiblity_fork_helper=(修改该值将会影响到所有派生仓库)
clone_helper=不知道如何操作?访问 <a target="_blank" href="%s">此处</a> 查看帮助!
clone_helper=不知道如何操作?访问 <a target="_blank" rel="noopener" href="%s">此处</a> 查看帮助!
fork_repo=派生仓库
fork_from=派生自
fork_visiblity_helper=派生仓库无法修改可见性
@@ -458,7 +461,7 @@ editor.branch_already_exists=此仓库已存在名为 '%s' 的分支。
editor.directory_is_a_file=路径 '%s' 的父路径中包含此仓库已存在的文件名。
editor.filename_is_a_directory=文件名 '%s' 是此仓库中已存在的目录名。
editor.file_editing_no_longer_exists=您编辑的文件 '%s' 已经不存在于此仓库中。
editor.file_changed_while_editing=文件内容在您进行编辑时已经发生变动。<a target="_blank" href="%s">单击此处</a> 查看变动的具体内容,或者 <strong>再次提交</strong> 覆盖已发生的变动。
editor.file_changed_while_editing=文件内容在您进行编辑时已经发生变动。<a target="_blank" rel="noopener" href="%s">单击此处</a> 查看变动的具体内容,或者 <strong>再次提交</strong> 覆盖已发生的变动。
editor.file_already_exists=此仓库已经存在名为 '%s' 的文件。
editor.no_changes_to_show=没有可以显示的变更。
editor.fail_to_update_file=更新/创建文件 '%s' 时发生错误:%v
@@ -691,7 +694,7 @@ settings.search_user_placeholder=搜索用户...
settings.org_not_allowed_to_be_collaborator=组织不允许被添加为仓库协作者!
settings.user_is_org_member=被操作的用户是组织成员,因此无法添加为协作者!
settings.add_webhook=添加 Web 钩子
settings.hooks_desc=Web 钩子允许您设定在 Gitea 上发生指定事件时对指定 URL 发送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
settings.hooks_desc=Web 钩子允许您设定在 Gitea 上发生指定事件时对指定 URL 发送 POST 通知。查看 <a target="_blank" rel="noopener" href="%s">Webhooks 文档</a> 获取更多信息。
settings.webhook_deletion=删除 Web 钩子
settings.webhook_deletion_desc=删除该 Web 钩子将会删除与其有关的信息和推送历史。是否继续?
settings.webhook_deletion_success=Web 钩子删除成功!
@@ -708,7 +711,7 @@ settings.githook_edit_desc=如果钩子未启动,则会显示样例文件中
settings.githook_name=钩子名称
settings.githook_content=钩子文本
settings.update_githook=更新钩子设置
settings.add_webhook_desc=我们会通过 <code>POST</code> 请求将订阅事件信息发送至向指定 URL 地址。您可以设置不同的数据接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 请查阅 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
settings.add_webhook_desc=我们会通过 <code>POST</code> 请求将订阅事件信息发送至向指定 URL 地址。您可以设置不同的数据接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 请查阅 <a target="_blank" rel="noopener" href="%s">Webhooks 文档</a> 获取更多信息。
settings.payload_url=推送地址
settings.content_type=数据格式
settings.secret=密钥文本

View File

@@ -47,7 +47,7 @@ cancel=取消
[install]
install=安裝頁面
title=首次安裝步驟
docker_helper=如果您正在使用 Docker 容器運行 Gitea請務必先仔細閱讀 <a target="_blank" href="%s">官方文檔</a> 後再對本頁面進行填寫。
docker_helper=如果您正在使用 Docker 容器運行 Gitea請務必先仔細閱讀 <a target="_blank" rel="noopener" href="%s">官方文檔</a> 後再對本頁面進行填寫。
requite_db_desc=Gitea 要求安裝 MySQL、PostgreSQL、SQLite3 或 TiDB。
db_title=數據庫設置
db_type=資料庫類型
@@ -351,7 +351,7 @@ visibility=可見度
visiblity_helper=該倉庫為 <span class="ui red text">私有的</span>
visiblity_helper_forced=網站管理員已強制要求所有新建倉庫必須為 <span class="ui red text">私有的</span>
visiblity_fork_helper=(修改該值將會影響到所有派生倉庫)
clone_helper=不知道如何操作?訪問 <a target="_blank"href="%s"> 帮助説明</a>
clone_helper=不知道如何操作?訪問 <a target="_blank" rel="noopener"href="%s"> 帮助説明</a>
fork_repo=派生倉庫
fork_from=派生自
fork_visiblity_helper=派生倉庫無法修改可見性。
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=There are no changes to show.
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=搜索用戶...
settings.org_not_allowed_to_be_collaborator=Organization is not allowed to be added as a collaborator.
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
settings.add_webhook=添加 Web 鉤子
settings.hooks_desc=Web 鉤子允許您設定在 Gitea 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.hooks_desc=Web 鉤子允許您設定在 Gitea 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" rel="noopener" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.webhook_deletion=刪除 Web 鉤子
settings.webhook_deletion_desc=刪除該 Web 鉤子將會刪除與其有關的信息和推送歷史。是否繼續?
settings.webhook_deletion_success=Web 鉤子刪除成功!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=如果鉤子未啟動,則會顯示樣例文件中
settings.githook_name=鉤子名稱
settings.githook_content=鉤子文本
settings.update_githook=更新鉤子設置
settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事件信息發送至向指定 URL 地址。您可以設置不同的數據接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 請查閱 <a target="_blank" href="%s">Webhooks 指南</a>.
settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事件信息發送至向指定 URL 地址。您可以設置不同的數據接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 請查閱 <a target="_blank" rel="noopener" href="%s">Webhooks 指南</a>.
settings.payload_url=推送地址
settings.content_type=數據格式
settings.secret=密鑰文本

View File

@@ -47,7 +47,7 @@ cancel=取消
[install]
install=安裝頁面
title=首次安裝步驟
docker_helper=如果您正在使用 Docker 容器運行 Gitea請務必先仔細閱讀 <a target="_blank" href="%s">官方文檔</a> 後再對本頁面進行填寫。
docker_helper=如果您正在使用 Docker 容器運行 Gitea請務必先仔細閱讀 <a target="_blank" rel="noopener" href="%s">官方文檔</a> 後再對本頁面進行填寫。
requite_db_desc=Gitea 要求安裝 MySQL、PostgreSQL、SQLite3 或 TiDB。
db_title=數據庫設置
db_type=資料庫類型
@@ -351,7 +351,7 @@ visibility=可見度
visiblity_helper=該倉庫為 <span class="ui red text">私有的</span>
visiblity_helper_forced=網站管理員已強制要求所有新建倉庫必須為 <span class="ui red text">私有的</span>
visiblity_fork_helper=(修改該值將會影響到所有派生倉庫)
clone_helper=不知道如何操作?訪問 <a target="_blank"href="%s"> 帮助説明</a>
clone_helper=不知道如何操作?訪問 <a target="_blank" rel="noopener"href="%s"> 帮助説明</a>
fork_repo=派生倉庫
fork_from=派生自
fork_visiblity_helper=派生倉庫無法修改可見性。
@@ -457,7 +457,7 @@ editor.branch_already_exists=Branch '%s' already exists in this repository.
editor.directory_is_a_file=Entry '%s' in the parent path is a file not a directory in this repository.
editor.filename_is_a_directory=The filename '%s' is an existing directory in this repository.
editor.file_editing_no_longer_exists=The file '%s' you are editing no longer exists in the repository.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_changed_while_editing=File content has been changed since you started editing. <a target="_blank" rel="noopener" href="%s">Click here</a> to see what have been changed or <strong>press commit again</strong> to overwrite those changes.
editor.file_already_exists=A file with name '%s' already exists in this repository.
editor.no_changes_to_show=沒有可以顯示的變更。
editor.fail_to_update_file=Failed to update/create file '%s' with error: %v
@@ -690,7 +690,7 @@ settings.search_user_placeholder=搜索用戶...
settings.org_not_allowed_to_be_collaborator=組織不允許被加為協同者。
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
settings.add_webhook=添加 Web 鉤子
settings.hooks_desc=Web 鉤子允許您設定在 Gitea 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.hooks_desc=Web 鉤子允許您設定在 Gitea 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" rel="noopener" href="%s">Webhooks 文檔</a> 獲取更多信息。
settings.webhook_deletion=刪除 Web 鉤子
settings.webhook_deletion_desc=刪除該 Web 鉤子將會刪除與其有關的信息和推送歷史。是否繼續?
settings.webhook_deletion_success=Web 鉤子刪除成功!
@@ -707,7 +707,7 @@ settings.githook_edit_desc=如果鉤子未啟動,則會顯示樣例文件中
settings.githook_name=鉤子名稱
settings.githook_content=鉤子文本
settings.update_githook=更新鉤子設置
settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事件信息發送至向指定 URL 地址。您可以設置不同的數據接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 請查閱 <a target="_blank" href="%s">Webhooks 指南</a>.
settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事件信息發送至向指定 URL 地址。您可以設置不同的數據接收方式JSON 或 <code>x-www-form-urlencoded</code>)。 請查閱 <a target="_blank" rel="noopener" href="%s">Webhooks 指南</a>.
settings.payload_url=推送地址
settings.content_type=數據格式
settings.secret=密鑰文本

View File

@@ -10,6 +10,8 @@ import (
"os"
"runtime"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/cmd"
"code.gitea.io/gitea/modules/setting"
"github.com/urfave/cli"
@@ -37,5 +39,9 @@ func main() {
cmd.CmdAdmin,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(4, "Fail to run app with %s: %v", os.Args, err)
}
}

View File

@@ -539,7 +539,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
}()
apiPusher := pusher.APIFormat()
apiRepo := repo.APIFormat(nil)
apiRepo := repo.APIFormat(AccessModeNone)
var shaSum string
switch opType {

View File

@@ -584,6 +584,28 @@ func (err ErrPullRequestNotExist) Error() string {
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBarcnh, err.BaseBranch)
}
// ErrPullRequestAlreadyExists represents a "PullRequestAlreadyExists"-error
type ErrPullRequestAlreadyExists struct {
ID int64
IssueID int64
HeadRepoID int64
BaseRepoID int64
HeadBranch string
BaseBranch string
}
// IsErrPullRequestAlreadyExists checks if an error is a ErrPullRequestAlreadyExists.
func IsErrPullRequestAlreadyExists(err error) bool {
_, ok := err.(ErrPullRequestAlreadyExists)
return ok
}
// Error does pretty-printing :D
func (err ErrPullRequestAlreadyExists) Error() string {
return fmt.Sprintf("pull request already exists for these targets [id: %d, issue_id: %d, head_repo_id: %d, base_repo_id: %d, head_branch: %s, base_branch: %s]",
err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBranch, err.BaseBranch)
}
// _________ __
// \_ ___ \ ____ _____ _____ ____ _____/ |_
// / \ \/ / _ \ / \ / \_/ __ \ / \ __\

View File

@@ -18,10 +18,10 @@ import (
"code.gitea.io/git"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/highlight"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template/highlight"
"github.com/Unknwon/com"
"github.com/sergi/go-diff/diffmatchpatch"
"golang.org/x/net/html/charset"

View File

@@ -170,6 +170,22 @@ func (issue *Issue) HTMLURL() string {
return fmt.Sprintf("%s/%s/%d", issue.Repo.HTMLURL(), path, issue.Index)
}
// DiffURL returns the absolute URL to this diff
func (issue *Issue) DiffURL() string {
if issue.IsPull {
return fmt.Sprintf("%s/pulls/%d.diff", issue.Repo.HTMLURL(), issue.Index)
}
return ""
}
// PatchURL returns the absolute URL to this patch
func (issue *Issue) PatchURL() string {
if issue.IsPull {
return fmt.Sprintf("%s/pulls/%d.patch", issue.Repo.HTMLURL(), issue.Index)
}
return ""
}
// State returns string representation of issue status.
func (issue *Issue) State() api.StateType {
if issue.IsClosed {
@@ -249,7 +265,7 @@ func (issue *Issue) sendLabelUpdatedWebhook(doer *User) {
Action: api.HookIssueLabelUpdated,
Index: issue.Index,
PullRequest: issue.PullRequest.APIFormat(),
Repository: issue.Repo.APIFormat(nil),
Repository: issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
})
}
@@ -355,7 +371,7 @@ func (issue *Issue) ClearLabels(doer *User) (err error) {
Action: api.HookIssueLabelCleared,
Index: issue.Index,
PullRequest: issue.PullRequest.APIFormat(),
Repository: issue.Repo.APIFormat(nil),
Repository: issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
})
}
@@ -477,7 +493,7 @@ func (issue *Issue) ChangeStatus(doer *User, repo *Repository, isClosed bool) (e
apiPullRequest := &api.PullRequestPayload{
Index: issue.Index,
PullRequest: issue.PullRequest.APIFormat(),
Repository: repo.APIFormat(nil),
Repository: repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
}
if isClosed {
@@ -515,7 +531,7 @@ func (issue *Issue) ChangeTitle(doer *User, title string) (err error) {
},
},
PullRequest: issue.PullRequest.APIFormat(),
Repository: issue.Repo.APIFormat(nil),
Repository: issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
})
}
@@ -547,7 +563,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) {
},
},
PullRequest: issue.PullRequest.APIFormat(),
Repository: issue.Repo.APIFormat(nil),
Repository: issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
})
}
@@ -580,7 +596,7 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
apiPullRequest := &api.PullRequestPayload{
Index: issue.Index,
PullRequest: issue.PullRequest.APIFormat(),
Repository: issue.Repo.APIFormat(nil),
Repository: issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
}
if isRemoveAssignee {

View File

@@ -67,7 +67,7 @@ func (label *Label) APIFormat() *api.Label {
return &api.Label{
ID: label.ID,
Name: label.Name,
Color: label.Color,
Color: strings.TrimLeft(label.Color, "#"),
}
}
@@ -102,6 +102,27 @@ func NewLabels(labels ...*Label) error {
return err
}
// getLabelInRepoByName returns a label by Name in given repository.
// If pass repoID as 0, then ORM will ignore limitation of repository
// and can return arbitrary label with any valid ID.
func getLabelInRepoByName(e Engine, repoID int64, labelName string) (*Label, error) {
if len(labelName) <= 0 {
return nil, ErrLabelNotExist{0, repoID}
}
l := &Label{
Name: labelName,
RepoID: repoID,
}
has, err := x.Get(l)
if err != nil {
return nil, err
} else if !has {
return nil, ErrLabelNotExist{0, l.RepoID}
}
return l, nil
}
// getLabelInRepoByID returns a label by ID in given repository.
// If pass repoID as 0, then ORM will ignore limitation of repository
// and can return arbitrary label with any valid ID.
@@ -128,6 +149,11 @@ func GetLabelByID(id int64) (*Label, error) {
return getLabelInRepoByID(x, 0, id)
}
// GetLabelInRepoByName returns a label by name in given repository.
func GetLabelInRepoByName(repoID int64, labelName string) (*Label, error) {
return getLabelInRepoByName(x, repoID, labelName)
}
// GetLabelInRepoByID returns a label by ID in given repository.
func GetLabelInRepoByID(repoID, labelID int64) (*Label, error) {
return getLabelInRepoByID(x, repoID, labelID)

View File

@@ -5,18 +5,18 @@
package models
import (
"bytes"
"fmt"
"html/template"
"path"
"gopkg.in/gomail.v2"
"gopkg.in/macaron.v1"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/mailer"
"code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/setting"
"gopkg.in/gomail.v2"
"gopkg.in/macaron.v1"
)
const (
@@ -31,27 +31,11 @@ const (
mailNotifyCollaborator base.TplName = "notify/collaborator"
)
type mailRenderInterface interface {
HTMLString(string, interface{}, ...macaron.HTMLOptions) (string, error)
}
var mailRender mailRenderInterface
var templates *template.Template
// InitMailRender initializes the macaron mail renderer
func InitMailRender(dir, appendDir string, funcMap []template.FuncMap) {
opt := &macaron.RenderOptions{
Directory: dir,
AppendDirectories: []string{appendDir},
Funcs: funcMap,
Extensions: []string{".tmpl", ".html"},
}
ts := macaron.NewTemplateSet()
ts.Set(macaron.DEFAULT_TPL_SET_NAME, opt)
mailRender = &macaron.TplRender{
TemplateSet: ts,
Opt: opt,
}
func InitMailRender(tmpls *template.Template) {
templates = tmpls
}
// SendTestMail sends a test mail
@@ -67,13 +51,15 @@ func SendUserMail(c *macaron.Context, u *User, tpl base.TplName, code, subject,
"ResetPwdCodeLives": setting.Service.ResetPwdCodeLives / 60,
"Code": code,
}
body, err := mailRender.HTMLString(string(tpl), data)
if err != nil {
log.Error(3, "HTMLString: %v", err)
var content bytes.Buffer
if err := templates.ExecuteTemplate(&content, string(tpl), data); err != nil {
log.Error(3, "Template: %v", err)
return
}
msg := mailer.NewMessage([]string{u.Email}, subject, body)
msg := mailer.NewMessage([]string{u.Email}, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, %s", u.ID, info)
mailer.SendAsync(msg)
@@ -97,13 +83,15 @@ func SendActivateEmailMail(c *macaron.Context, u *User, email *EmailAddress) {
"Code": u.GenerateEmailActivateCode(email.Email),
"Email": email.Email,
}
body, err := mailRender.HTMLString(string(mailAuthActivateEmail), data)
if err != nil {
log.Error(3, "HTMLString: %v", err)
var content bytes.Buffer
if err := templates.ExecuteTemplate(&content, string(mailAuthActivateEmail), data); err != nil {
log.Error(3, "Template: %v", err)
return
}
msg := mailer.NewMessage([]string{email.Email}, c.Tr("mail.activate_email"), body)
msg := mailer.NewMessage([]string{email.Email}, c.Tr("mail.activate_email"), content.String())
msg.Info = fmt.Sprintf("UID: %d, activate email", u.ID)
mailer.SendAsync(msg)
@@ -114,13 +102,15 @@ func SendRegisterNotifyMail(c *macaron.Context, u *User) {
data := map[string]interface{}{
"Username": u.DisplayName(),
}
body, err := mailRender.HTMLString(string(mailAuthRegisterNotify), data)
if err != nil {
log.Error(3, "HTMLString: %v", err)
var content bytes.Buffer
if err := templates.ExecuteTemplate(&content, string(mailAuthRegisterNotify), data); err != nil {
log.Error(3, "Template: %v", err)
return
}
msg := mailer.NewMessage([]string{u.Email}, c.Tr("mail.register_notify"), body)
msg := mailer.NewMessage([]string{u.Email}, c.Tr("mail.register_notify"), content.String())
msg.Info = fmt.Sprintf("UID: %d, registration notify", u.ID)
mailer.SendAsync(msg)
@@ -136,13 +126,15 @@ func SendCollaboratorMail(u, doer *User, repo *Repository) {
"RepoName": repoName,
"Link": repo.HTMLURL(),
}
body, err := mailRender.HTMLString(string(mailNotifyCollaborator), data)
if err != nil {
log.Error(3, "HTMLString: %v", err)
var content bytes.Buffer
if err := templates.ExecuteTemplate(&content, string(mailNotifyCollaborator), data); err != nil {
log.Error(3, "Template: %v", err)
return
}
msg := mailer.NewMessage([]string{u.Email}, subject, body)
msg := mailer.NewMessage([]string{u.Email}, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, add collaborator", u.ID)
mailer.SendAsync(msg)
@@ -161,11 +153,14 @@ func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []s
body := string(markdown.RenderSpecialLink([]byte(issue.Content), issue.Repo.HTMLURL(), issue.Repo.ComposeMetas()))
data := composeTplData(subject, body, issue.HTMLURL())
data["Doer"] = doer
content, err := mailRender.HTMLString(string(tplName), data)
if err != nil {
log.Error(3, "HTMLString (%s): %v", tplName, err)
var content bytes.Buffer
if err := templates.ExecuteTemplate(&content, string(tplName), data); err != nil {
log.Error(3, "Template: %v", err)
}
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.FromEmail), subject, content)
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.FromEmail), subject, content.String())
msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info)
return msg
}

View File

@@ -68,15 +68,40 @@ var (
func init() {
tables = append(tables,
new(User), new(PublicKey), new(AccessToken),
new(Repository), new(DeployKey), new(Collaboration), new(Access), new(Upload),
new(Watch), new(Star), new(Follow), new(Action),
new(Issue), new(PullRequest), new(Comment), new(Attachment), new(IssueUser),
new(Label), new(IssueLabel), new(Milestone),
new(Mirror), new(Release), new(LoginSource), new(Webhook),
new(UpdateTask), new(HookTask),
new(Team), new(OrgUser), new(TeamUser), new(TeamRepo),
new(Notice), new(EmailAddress))
new(User),
new(PublicKey),
new(AccessToken),
new(Repository),
new(DeployKey),
new(Collaboration),
new(Access),
new(Upload),
new(Watch),
new(Star),
new(Follow),
new(Action),
new(Issue),
new(PullRequest),
new(Comment),
new(Attachment),
new(IssueUser),
new(Label),
new(IssueLabel),
new(Milestone),
new(Mirror),
new(Release),
new(LoginSource),
new(Webhook),
new(UpdateTask),
new(HookTask),
new(Team),
new(OrgUser),
new(TeamUser),
new(TeamRepo),
new(Notice),
new(EmailAddress),
new(Notification),
)
gonicNames := []string{"SSL", "UID"}
for _, name := range gonicNames {
@@ -192,7 +217,10 @@ func SetEngine() (err error) {
// WARNING: for serv command, MUST remove the output to os.stdout,
// so use log file to instead print to stdout.
logPath := path.Join(setting.LogRootPath, "xorm.log")
os.MkdirAll(path.Dir(logPath), os.ModePerm)
if err := os.MkdirAll(path.Dir(logPath), os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", logPath, err)
}
f, err := os.Create(logPath)
if err != nil {

184
models/notification.go Normal file
View File

@@ -0,0 +1,184 @@
package models
import (
"time"
)
type (
// NotificationStatus is the status of the notification (read or unread)
NotificationStatus uint8
// NotificationSource is the source of the notification (issue, PR, commit, etc)
NotificationSource uint8
)
const (
// NotificationStatusUnread represents an unread notification
NotificationStatusUnread NotificationStatus = iota + 1
// NotificationStatusRead represents a read notification
NotificationStatusRead
)
const (
// NotificationSourceIssue is a notification of an issue
NotificationSourceIssue NotificationSource = iota + 1
// NotificationSourcePullRequest is a notification of a pull request
NotificationSourcePullRequest
// NotificationSourceCommit is a notification of a commit
NotificationSourceCommit
)
// Notification represents a notification
type Notification struct {
ID int64 `xorm:"pk autoincr"`
UserID int64 `xorm:"INDEX NOT NULL"`
RepoID int64 `xorm:"INDEX NOT NULL"`
Status NotificationStatus `xorm:"SMALLINT INDEX NOT NULL"`
Source NotificationSource `xorm:"SMALLINT INDEX NOT NULL"`
IssueID int64 `xorm:"INDEX NOT NULL"`
PullID int64 `xorm:"INDEX"`
CommitID string `xorm:"INDEX"`
Issue *Issue `xorm:"-"`
PullRequest *PullRequest `xorm:"-"`
Created time.Time `xorm:"-"`
CreatedUnix int64 `xorm:"INDEX NOT NULL"`
Updated time.Time `xorm:"-"`
UpdatedUnix int64 `xorm:"INDEX NOT NULL"`
}
// BeforeInsert runs while inserting a record
func (n *Notification) BeforeInsert() {
var (
now = time.Now()
nowUnix = now.Unix()
)
n.Created = now
n.CreatedUnix = nowUnix
n.Updated = now
n.UpdatedUnix = nowUnix
}
// BeforeUpdate runs while updateing a record
func (n *Notification) BeforeUpdate() {
var (
now = time.Now()
nowUnix = now.Unix()
)
n.Updated = now
n.UpdatedUnix = nowUnix
}
// CreateOrUpdateIssueNotifications creates an issue notification
// for each watcher, or updates it if already exists
func CreateOrUpdateIssueNotifications(issue *Issue) error {
watches, err := getWatchers(x, issue.RepoID)
if err != nil {
return err
}
sess := x.NewSession()
if err := sess.Begin(); err != nil {
return err
}
defer sess.Close()
for _, watch := range watches {
exists, err := issueNotificationExists(sess, watch.UserID, issue.ID)
if err != nil {
return err
}
if exists {
err = updateIssueNotification(sess, watch.UserID, issue.ID)
} else {
err = createIssueNotification(sess, watch.UserID, issue)
}
if err != nil {
return err
}
}
return sess.Commit()
}
func issueNotificationExists(e Engine, userID, issueID int64) (bool, error) {
count, err := e.
Where("user_id = ?", userID).
And("issue_id = ?", issueID).
Count(Notification{})
return count > 0, err
}
func createIssueNotification(e Engine, userID int64, issue *Issue) error {
notification := &Notification{
UserID: userID,
RepoID: issue.RepoID,
Status: NotificationStatusUnread,
IssueID: issue.ID,
}
if issue.IsPull {
notification.Source = NotificationSourcePullRequest
} else {
notification.Source = NotificationSourceIssue
}
_, err := e.Insert(notification)
return err
}
func updateIssueNotification(e Engine, userID, issueID int64) error {
notification, err := getIssueNotification(e, userID, issueID)
if err != nil {
return err
}
notification.Status = NotificationStatusUnread
_, err = e.Id(notification.ID).Update(notification)
return err
}
func getIssueNotification(e Engine, userID, issueID int64) (*Notification, error) {
notification := new(Notification)
_, err := e.
Where("user_id = ?", userID).
And("issue_id = ?", issueID).
Get(notification)
return notification, err
}
// NotificationsForUser returns notifications for a given user and status
func NotificationsForUser(user *User, status NotificationStatus) ([]*Notification, error) {
return notificationsForUser(x, user, status)
}
func notificationsForUser(e Engine, user *User, status NotificationStatus) (notifications []*Notification, err error) {
err = e.
Where("user_id = ?", user.ID).
And("status = ?", status).
OrderBy("updated_unix DESC").
Find(&notifications)
return
}
// GetRepo returns the repo of the notification
func (n *Notification) GetRepo() (repo *Repository, err error) {
repo = new(Repository)
_, err = x.
Where("id = ?", n.RepoID).
Get(repo)
return
}
// GetIssue returns the issue of the notification
func (n *Notification) GetIssue() (issue *Issue, err error) {
issue = new(Issue)
_, err = x.
Where("id = ?", n.IssueID).
Get(issue)
return
}

View File

@@ -121,7 +121,54 @@ func (pr *PullRequest) LoadIssue() (err error) {
// Required - Issue
// Optional - Merger
func (pr *PullRequest) APIFormat() *api.PullRequest {
var (
baseBranch *Branch
headBranch *Branch
baseCommit *git.Commit
headCommit *git.Commit
err error
)
apiIssue := pr.Issue.APIFormat()
if pr.BaseRepo == nil {
pr.BaseRepo, err = GetRepositoryByID(pr.BaseRepoID)
if err != nil {
log.Error(log.ERROR, "GetRepositoryById[%d]: %v", pr.ID, err)
return nil
}
}
if pr.HeadRepo == nil {
pr.HeadRepo, err = GetRepositoryByID(pr.HeadRepoID)
if err != nil {
log.Error(log.ERROR, "GetRepositoryById[%d]: %v", pr.ID, err)
return nil
}
}
if baseBranch, err = pr.BaseRepo.GetBranch(pr.BaseBranch); err != nil {
return nil
}
if baseCommit, err = baseBranch.GetCommit(); err != nil {
return nil
}
if headBranch, err = pr.HeadRepo.GetBranch(pr.HeadBranch); err != nil {
return nil
}
if headCommit, err = headBranch.GetCommit(); err != nil {
return nil
}
apiBaseBranchInfo := &api.PRBranchInfo{
Name: pr.BaseBranch,
Ref: pr.BaseBranch,
Sha: baseCommit.ID.String(),
RepoID: pr.BaseRepoID,
Repository: pr.BaseRepo.APIFormat(AccessModeNone),
}
apiHeadBranchInfo := &api.PRBranchInfo{
Name: pr.HeadBranch,
Ref: pr.HeadBranch,
Sha: headCommit.ID.String(),
RepoID: pr.HeadRepoID,
Repository: pr.HeadRepo.APIFormat(AccessModeNone),
}
apiPullRequest := &api.PullRequest{
ID: pr.ID,
Index: pr.Index,
@@ -134,7 +181,12 @@ func (pr *PullRequest) APIFormat() *api.PullRequest {
State: apiIssue.State,
Comments: apiIssue.Comments,
HTMLURL: pr.Issue.HTMLURL(),
DiffURL: pr.Issue.DiffURL(),
PatchURL: pr.Issue.PatchURL(),
HasMerged: pr.HasMerged,
Base: apiBaseBranchInfo,
Head: apiHeadBranchInfo,
MergeBase: pr.MergeBase,
}
if pr.Status != PullRequestStatusChecking {
@@ -218,7 +270,11 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
// Clone base repo.
tmpBasePath := path.Join(setting.AppDataPath, "tmp/repos", com.ToStr(time.Now().Nanosecond())+".git")
os.MkdirAll(path.Dir(tmpBasePath), os.ModePerm)
if err := os.MkdirAll(path.Dir(tmpBasePath), os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", tmpBasePath, err)
}
defer os.RemoveAll(path.Dir(tmpBasePath))
var stderr string
@@ -299,7 +355,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
Action: api.HookIssueClosed,
Index: pr.Index,
PullRequest: pr.APIFormat(),
Repository: pr.Issue.Repo.APIFormat(nil),
Repository: pr.Issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks: %v", err)
@@ -329,7 +385,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
After: pr.MergedCommitID,
CompareURL: setting.AppURL + pr.BaseRepo.ComposeCompareURL(pr.MergeBase, pr.MergedCommitID),
Commits: ListToPushCommits(l).ToAPIPayloadCommits(pr.BaseRepo.HTMLURL()),
Repo: pr.BaseRepo.APIFormat(nil),
Repo: pr.BaseRepo.APIFormat(AccessModeNone),
Pusher: pr.HeadRepo.MustOwner().APIFormat(),
Sender: doer.APIFormat(),
}
@@ -339,7 +395,7 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
return nil
}
// patchConflicts is a list of conflit description from Git.
// patchConflicts is a list of conflict description from Git.
var patchConflicts = []string{
"patch does not apply",
"already exists in working directory",
@@ -347,7 +403,7 @@ var patchConflicts = []string{
"error:",
}
// testPatch checks if patch can be merged to base repository without conflit.
// testPatch checks if patch can be merged to base repository without conflict.
// FIXME: make a mechanism to clean up stable local copies.
func (pr *PullRequest) testPatch() (err error) {
if pr.BaseRepo == nil {
@@ -373,6 +429,9 @@ func (pr *PullRequest) testPatch() (err error) {
log.Trace("PullRequest[%d].testPatch (patchPath): %s", pr.ID, patchPath)
// Delete old temp local copy before we create a new temp local copy
RemoveAllWithNotice("Deleting old local copy", pr.BaseRepo.LocalCopyPath())
if err := pr.BaseRepo.UpdateLocalCopyBranch(pr.BaseBranch); err != nil {
return fmt.Errorf("UpdateLocalCopy: %v", err)
}
@@ -384,7 +443,7 @@ func (pr *PullRequest) testPatch() (err error) {
if err != nil {
for i := range patchConflicts {
if strings.Contains(stderr, patchConflicts[i]) {
log.Trace("PullRequest[%d].testPatch (apply): has conflit", pr.ID)
log.Trace("PullRequest[%d].testPatch (apply): has conflict", pr.ID)
fmt.Println(stderr)
pr.Status = PullRequestStatusConflict
return nil
@@ -458,7 +517,7 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
Action: api.HookIssueOpened,
Index: pull.Index,
PullRequest: pr.APIFormat(),
Repository: repo.APIFormat(nil),
Repository: repo.APIFormat(AccessModeNone),
Sender: pull.Poster.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks: %v", err)
@@ -468,6 +527,46 @@ func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []str
return nil
}
// PullRequestsOptions holds the options for PRs
type PullRequestsOptions struct {
Page int
State string
SortType string
Labels []string
MilestoneID int64
}
func listPullRequestStatement(baseRepoID int64, opts *PullRequestsOptions) *xorm.Session {
sess := x.Where("pull_request.base_repo_id=?", baseRepoID)
sess.Join("INNER", "issue", "pull_request.issue_id = issue.id")
switch opts.State {
case "closed", "open":
sess.And("issue.is_closed=?", opts.State == "closed")
}
return sess
}
// PullRequests returns all pull requests for a base Repo by the given conditions
func PullRequests(baseRepoID int64, opts *PullRequestsOptions) ([]*PullRequest, int64, error) {
if opts.Page <= 0 {
opts.Page = 1
}
countSession := listPullRequestStatement(baseRepoID, opts)
maxResults, err := countSession.Count(new(PullRequest))
if err != nil {
log.Error(4, "Count PRs", err)
return nil, maxResults, err
}
prs := make([]*PullRequest, 0, ItemsPerPage)
findSession := listPullRequestStatement(baseRepoID, opts)
findSession.Limit(ItemsPerPage, (opts.Page-1)*ItemsPerPage)
return prs, maxResults, findSession.Find(&prs)
}
// GetUnmergedPullRequest returnss a pull request that is open and has not been merged
// by given head/base and repo/branch.
func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string) (*PullRequest, error) {
@@ -508,6 +607,30 @@ func GetUnmergedPullRequestsByBaseInfo(repoID int64, branch string) ([]*PullRequ
Find(&prs)
}
// GetPullRequestByIndex returns a pull request by the given index
func GetPullRequestByIndex(repoID int64, index int64) (*PullRequest, error) {
pr := &PullRequest{
BaseRepoID: repoID,
Index: index,
}
has, err := x.Get(pr)
if err != nil {
return nil, err
} else if !has {
return nil, ErrPullRequestNotExist{0, repoID, index, 0, "", ""}
}
if err = pr.LoadAttributes(); err != nil {
return nil, err
}
if err = pr.LoadIssue(); err != nil {
return nil, err
}
return pr, nil
}
func getPullRequestByID(e Engine, id int64) (*PullRequest, error) {
pr := new(PullRequest)
has, err := e.Id(id).Get(pr)
@@ -622,7 +745,9 @@ func (pr *PullRequest) PushToBaseRepo() (err error) {
headFile := fmt.Sprintf("refs/pull/%d/head", pr.Index)
// Remove head in case there is a conflict.
os.Remove(path.Join(pr.BaseRepo.RepoPath(), headFile))
file := path.Join(pr.BaseRepo.RepoPath(), headFile)
_ = os.Remove(file)
if err = git.Push(headRepoPath, tmpRemoteName, fmt.Sprintf("%s:%s", pr.HeadBranch, headFile)); err != nil {
return fmt.Errorf("Push: %v", err)
@@ -718,7 +843,7 @@ func AddTestPullRequestTask(doer *User, repoID int64, branch string, isSync bool
Action: api.HookIssueSynchronized,
Index: pr.Issue.Index,
PullRequest: pr.Issue.PullRequest.APIFormat(),
Repository: pr.Issue.Repo.APIFormat(nil),
Repository: pr.Issue.Repo.APIFormat(AccessModeNone),
Sender: doer.APIFormat(),
}); err != nil {
log.Error(4, "PrepareWebhooks [pull_id: %v]: %v", pr.ID, err)

View File

@@ -276,9 +276,13 @@ func (repo *Repository) HTMLURL() string {
}
// APIFormat converts a Repository to api.Repository
// Arguments that are allowed to be nil: permission
func (repo *Repository) APIFormat(permission *api.Permission) *api.Repository {
func (repo *Repository) APIFormat(mode AccessMode) *api.Repository {
cloneLink := repo.CloneLink()
permission := &api.Permission{
Admin: mode >= AccessModeAdmin,
Push: mode >= AccessModeWrite,
Pull: mode >= AccessModeRead,
}
return &api.Repository{
ID: repo.ID,
Owner: repo.Owner.APIFormat(),
@@ -499,7 +503,7 @@ var (
// DescriptionHTML does special handles to description and return HTML string.
func (repo *Repository) DescriptionHTML() template.HTML {
sanitize := func(s string) string {
return fmt.Sprintf(`<a href="%[1]s" target="_blank">%[1]s</a>`, s)
return fmt.Sprintf(`<a href="%[1]s" target="_blank" rel="noopener">%[1]s</a>`, s)
}
return template.HTML(descPattern.ReplaceAllStringFunc(markdown.Sanitizer.Sanitize(repo.Description), sanitize))
}
@@ -558,8 +562,12 @@ func (repo *Repository) SavePatch(index int64, patch []byte) error {
if err != nil {
return fmt.Errorf("PatchPath: %v", err)
}
dir := filepath.Dir(patchPath)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", dir, err)
}
os.MkdirAll(filepath.Dir(patchPath), os.ModePerm)
if err = ioutil.WriteFile(patchPath, patch, 0644); err != nil {
return fmt.Errorf("WriteFile: %v", err)
}
@@ -669,7 +677,10 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
migrateTimeout := time.Duration(setting.Git.Timeout.Migrate) * time.Second
os.RemoveAll(repoPath)
if err := os.RemoveAll(repoPath); err != nil {
return repo, fmt.Errorf("Fail to remove %s: %v", repoPath, err)
}
if err = git.Clone(opts.RemoteAddr, repoPath, git.CloneRepoOptions{
Mirror: true,
Quiet: true,
@@ -680,7 +691,11 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
if len(wikiRemotePath) > 0 {
os.RemoveAll(wikiPath)
if err := os.RemoveAll(wikiPath); err != nil {
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
}
if err = git.Clone(wikiRemotePath, wikiPath, git.CloneRepoOptions{
Mirror: true,
Quiet: true,
@@ -902,7 +917,11 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, opts C
// Initialize repository according to user's choice.
if opts.AutoInit {
os.MkdirAll(tmpDir, os.ModePerm)
if err := os.MkdirAll(tmpDir, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", tmpDir, err)
}
defer os.RemoveAll(tmpDir)
if err = prepareRepoCommit(repo, tmpDir, repoPath, opts); err != nil {
@@ -1198,7 +1217,12 @@ func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error
}
// Rename remote repository to new path and delete local copy.
os.MkdirAll(UserPath(newOwner.Name), os.ModePerm)
dir := UserPath(newOwner.Name)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", dir, err)
}
if err = os.Rename(RepoPath(owner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil {
return fmt.Errorf("rename repository directory: %v", err)
}

View File

@@ -104,7 +104,11 @@ func (repo *Repository) UpdateRepoFile(doer *User, opts UpdateRepoFileOptions) (
localPath := repo.LocalCopyPath()
oldFilePath := path.Join(localPath, opts.OldTreeName)
filePath := path.Join(localPath, opts.NewTreeName)
os.MkdirAll(path.Dir(filePath), os.ModePerm)
dir := path.Dir(filePath)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", dir, err)
}
// If it's meant to be a new file, make sure it doesn't exist.
if opts.IsNewFile {
@@ -185,7 +189,12 @@ func (repo *Repository) GetDiffPreview(branch, treePath, content string) (diff *
localPath := repo.LocalCopyPath()
filePath := path.Join(localPath, treePath)
os.MkdirAll(filepath.Dir(filePath), os.ModePerm)
dir := filepath.Dir(filePath)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return nil, fmt.Errorf("Fail to create dir %s: %v", dir, err)
}
if err = ioutil.WriteFile(filePath, []byte(content), 0666); err != nil {
return nil, fmt.Errorf("WriteFile: %v", err)
}
@@ -475,7 +484,10 @@ func (repo *Repository) UploadRepoFiles(doer *User, opts UploadRepoFileOptions)
localPath := repo.LocalCopyPath()
dirPath := path.Join(localPath, opts.TreePath)
os.MkdirAll(dirPath, os.ModePerm)
if err := os.MkdirAll(dirPath, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", dirPath, err)
}
// Copy uploaded files into repository.
for _, upload := range uploads {

View File

@@ -373,7 +373,12 @@ func addKey(e Engine, key *PublicKey) (err error) {
// Calculate fingerprint.
tmpPath := strings.Replace(path.Join(os.TempDir(), fmt.Sprintf("%d", time.Now().Nanosecond()),
"id_rsa.pub"), "\\", "/", -1)
os.MkdirAll(path.Dir(tmpPath), os.ModePerm)
dir := path.Dir(tmpPath)
if err := os.MkdirAll(dir, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", dir, err)
}
if err = ioutil.WriteFile(tmpPath, []byte(key.Content), 0644); err != nil {
return err
}

View File

@@ -8,6 +8,7 @@ import (
"bytes"
"container/list"
"crypto/sha256"
"crypto/subtle"
"encoding/hex"
"errors"
"fmt"
@@ -368,7 +369,7 @@ func (u *User) EncodePasswd() {
func (u *User) ValidatePassword(passwd string) bool {
newUser := &User{Passwd: passwd, Salt: u.Salt}
newUser.EncodePasswd()
return u.Passwd == newUser.Passwd
return subtle.ConstantTimeCompare([]byte(u.Passwd), []byte(newUser.Passwd)) == 1
}
// UploadAvatar saves custom avatar for user.
@@ -392,7 +393,10 @@ func (u *User) UploadAvatar(data []byte) error {
return fmt.Errorf("updateUser: %v", err)
}
os.MkdirAll(setting.AvatarUploadPath, os.ModePerm)
if err := os.MkdirAll(setting.AvatarUploadPath, os.ModePerm); err != nil {
return fmt.Errorf("Fail to create dir %s: %v", setting.AvatarUploadPath, err)
}
fw, err := os.Create(u.CustomAvatarPath())
if err != nil {
return fmt.Errorf("Create: %v", err)
@@ -409,7 +413,10 @@ func (u *User) UploadAvatar(data []byte) error {
// DeleteAvatar deletes the user's custom avatar.
func (u *User) DeleteAvatar() error {
log.Trace("DeleteAvatar[%d]: %s", u.ID, u.CustomAvatarPath())
os.Remove(u.CustomAvatarPath())
if err := os.Remove(u.CustomAvatarPath()); err != nil {
return fmt.Errorf("Fail to remove %s: %v", u.CustomAvatarPath(), err)
}
u.UseCustomAvatar = false
if err := UpdateUser(u); err != nil {
@@ -866,9 +873,16 @@ func deleteUser(e *xorm.Session, u *User) error {
// FIXME: system notice
// Note: There are something just cannot be roll back,
// so just keep error logs of those operations.
path := UserPath(u.Name)
os.RemoveAll(UserPath(u.Name))
os.Remove(u.CustomAvatarPath())
if err := os.RemoveAll(path); err != nil {
return fmt.Errorf("Fail to RemoveAll %s: %v", path, err)
}
avatarPath := u.CustomAvatarPath()
if err := os.Remove(avatarPath); err != nil {
return fmt.Errorf("Fail to remove %s: %v", avatarPath, err)
}
return nil
}

View File

@@ -112,7 +112,11 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
return ErrWikiAlreadyExist{filename}
}
} else {
os.Remove(path.Join(localPath, oldTitle+".md"))
file := path.Join(localPath, oldTitle+".md")
if err := os.Remove(file); err != nil {
return fmt.Errorf("Fail to remove %s: %v", file, err)
}
}
// SECURITY: if new file is a symlink to non-exist critical file,
@@ -120,7 +124,8 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
// as a new page operation.
// So we want to make sure the symlink is removed before write anything.
// The new file we created will be in normal text format.
os.Remove(filename)
_ = os.Remove(filename)
if err = ioutil.WriteFile(filename, []byte(content), 0666); err != nil {
return fmt.Errorf("WriteFile: %v", err)
@@ -168,7 +173,10 @@ func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) {
title = ToWikiPageName(title)
filename := path.Join(localPath, title+".md")
os.Remove(filename)
if err := os.Remove(filename); err != nil {
return fmt.Errorf("Fail to remove %s: %v", filename, err)
}
message := "Delete page '" + title + "'"

View File

@@ -35,6 +35,9 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 {
// Check access token.
if IsAPIPath(ctx.Req.URL.Path) {
tokenSHA := ctx.Query("token")
if len(tokenSHA) <= 0 {
tokenSHA = ctx.Query("access_token")
}
if len(tokenSHA) == 0 {
// Well, check with header again.
auHead := ctx.Req.Header.Get("Authorization")

File diff suppressed because one or more lines are too long

View File

@@ -8,6 +8,7 @@ import (
"fmt"
"strings"
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
@@ -103,3 +104,24 @@ func ExtractOwnerAndRepo() macaron.Handler {
ctx.Data["Repository"] = repo
}
}
// ReferencesGitRepo injects the GitRepo into the Context
func ReferencesGitRepo() macaron.Handler {
return func(ctx *APIContext) {
// Empty repository does not have reference information.
if ctx.Repo.Repository.IsBare {
return
}
// For API calls.
if ctx.Repo.GitRepo == nil {
repoPath := models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name)
gitRepo, err := git.OpenRepository(repoPath)
if err != nil {
ctx.Error(500, "RepoRef Invalid repo "+repoPath, err)
return
}
ctx.Repo.GitRepo = gitRepo
}
}
}

View File

@@ -6,6 +6,7 @@ package context
import (
"fmt"
"html"
"html/template"
"io"
"net/http"
@@ -186,8 +187,10 @@ func Contexter() macaron.Handler {
}
}
ctx.Data["CsrfToken"] = x.GetToken()
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`)
ctx.Data["CsrfToken"] = html.EscapeString(x.GetToken())
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + ctx.Data["CsrfToken"].(string) + `">`)
log.Debug("Session ID: %s", sess.ID())
log.Debug("CSRF Token: %v", ctx.Data["CsrfToken"])

View File

@@ -219,7 +219,10 @@ func (w *FileLogWriter) deleteOldLog() {
if !info.IsDir() && info.ModTime().Unix() < (time.Now().Unix()-60*60*24*w.Maxdays) {
if strings.HasPrefix(filepath.Base(path), filepath.Base(w.Filename)) {
os.Remove(path)
if err := os.Remove(path); err != nil {
returnErr = fmt.Errorf("Fail to remove %s: %v", path, err)
}
}
}
return returnErr

View File

@@ -42,7 +42,12 @@ func NewLogger(bufLen int64, mode, config string) {
// NewGitLogger create a logger for git
// FIXME: use same log level as other loggers.
func NewGitLogger(logPath string) {
os.MkdirAll(path.Dir(logPath), os.ModePerm)
path := path.Dir(logPath)
if err := os.MkdirAll(path, os.ModePerm); err != nil {
Fatal(4, "Fail to create dir %s: %v", path, err)
}
GitLogger = newLogger(0)
GitLogger.SetLogger("file", fmt.Sprintf(`{"level":0,"filename":"%s","rotate":false}`, logPath))
}

View File

@@ -0,0 +1,36 @@
package notification
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
)
type notificationService struct {
issueQueue chan *models.Issue
}
var (
// Service is the notification service
Service = &notificationService{
issueQueue: make(chan *models.Issue),
}
)
func init() {
go Service.Run()
}
func (ns *notificationService) Run() {
for {
select {
case issue := <-ns.issueQueue:
if err := models.CreateOrUpdateIssueNotifications(issue); err != nil {
log.Error(4, "Was unable to create issue notification: %v", err)
}
}
}
}
func (ns *notificationService) NotifyIssue(issue *models.Issue) {
ns.issueQueue <- issue
}

View File

@@ -6,6 +6,8 @@ package public
//go:generate go-bindata -tags "bindata" -ignore "\\.go|\\.less" -pkg "public" -o "bindata.go" ../../public/...
//go:generate go fmt bindata.go
//go:generate sed -i.bak s/..\/..\/public\/// bindata.go
//go:generate rm -f bindata.go.bak
// Options represents the available options to configure the macaron handler.
type Options struct {

View File

@@ -22,7 +22,7 @@ func Static(opts *Options) macaron.Handler {
AssetDir: AssetDir,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
Prefix: "../../public",
Prefix: "",
}),
},
)

View File

@@ -1,15 +0,0 @@
// +build miniwinsvc
// 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 setting
import (
_ "github.com/kardianos/minwinsvc"
)
func init() {
SupportMiniWinService = true
}

View File

@@ -22,6 +22,7 @@ import (
_ "github.com/go-macaron/cache/redis"
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis" // redis plugin for store session
_ "github.com/kardianos/minwinsvc" // import minwinsvc for windows services
"gopkg.in/ini.v1"
"strk.kbt.io/projects/go/libravatar"
@@ -259,7 +260,6 @@ var (
ShowFooterBranding bool
ShowFooterVersion bool
ShowFooterTemplateLoadTime bool
SupportMiniWinService bool
// Global setting objects
Cfg *ini.File
@@ -393,7 +393,7 @@ please consider changing to GITEA_CUSTOM`)
forcePathSeparator(LogRootPath)
sec := Cfg.Section("server")
AppName = Cfg.Section("").Key("APP_NAME").MustString("Gogs: Go Git Service")
AppName = Cfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea")
AppURL = sec.Key("ROOT_URL").MustString("http://localhost:3000/")
if AppURL[len(AppURL)-1] != '/' {
AppURL += "/"

View File

@@ -162,7 +162,12 @@ func Listen(port int) {
keyPath := filepath.Join(setting.AppDataPath, "ssh/gogs.rsa")
if !com.IsExist(keyPath) {
os.MkdirAll(filepath.Dir(keyPath), os.ModePerm)
filePath := filepath.Dir(keyPath)
if err := os.MkdirAll(filePath, os.ModePerm); err != nil {
log.Error(4, "Fail to create dir %s: %v", filePath, err)
}
_, stderr, err := com.ExecCmd("ssh-keygen", "-f", keyPath, "-t", "rsa", "-N", "")
if err != nil {
panic(fmt.Sprintf("Fail to generate private key: %v - %s", err, stderr))

View File

@@ -0,0 +1,103 @@
// +build !bindata
// Copyright 2016 The Gitea 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 templates
import (
"html/template"
"io/ioutil"
"path"
"strings"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
"gopkg.in/macaron.v1"
)
var (
templates = template.New("")
)
// Renderer implements the macaron handler for serving the templates.
func Renderer() macaron.Handler {
return macaron.Renderer(macaron.RenderOptions{
Funcs: NewFuncMap(),
Directory: path.Join(setting.StaticRootPath, "templates"),
AppendDirectories: []string{
path.Join(setting.CustomPath, "templates"),
},
})
}
// Mailer provides the templates required for sending notification mails.
func Mailer() *template.Template {
for _, funcs := range NewFuncMap() {
templates.Funcs(funcs)
}
staticDir := path.Join(setting.StaticRootPath, "templates", "mail")
if com.IsDir(staticDir) {
files, err := com.StatDir(staticDir)
if err != nil {
log.Warn("Failed to read %s templates dir. %v", staticDir, err)
} else {
for _, filePath := range files {
if !strings.HasSuffix(filePath, ".tmpl") {
continue
}
content, err := ioutil.ReadFile(path.Join(staticDir, filePath))
if err != nil {
log.Warn("Failed to read static %s template. %v", filePath, err)
continue
}
templates.New(
strings.TrimSuffix(
filePath,
".tmpl",
),
).Parse(string(content))
}
}
}
customDir := path.Join(setting.CustomPath, "templates", "mail")
if com.IsDir(customDir) {
files, err := com.StatDir(customDir)
if err != nil {
log.Warn("Failed to read %s templates dir. %v", customDir, err)
} else {
for _, filePath := range files {
if !strings.HasSuffix(filePath, ".tmpl") {
continue
}
content, err := ioutil.ReadFile(path.Join(customDir, filePath))
if err != nil {
log.Warn("Failed to read custom %s template. %v", filePath, err)
continue
}
templates.New(
strings.TrimSuffix(
filePath,
".tmpl",
),
).Parse(string(content))
}
}
}
return templates
}

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package template
package templates
import (
"container/list"

109
modules/templates/static.go Normal file
View File

@@ -0,0 +1,109 @@
// +build bindata
// Copyright 2016 The Gitea 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 templates
import (
"html/template"
"io/ioutil"
"path"
"strings"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
"github.com/go-macaron/bindata"
"gopkg.in/macaron.v1"
)
var (
templates = template.New("")
)
// Renderer implements the macaron handler for serving the templates.
func Renderer() macaron.Handler {
return macaron.Renderer(macaron.RenderOptions{
Funcs: NewFuncMap(),
AppendDirectories: []string{
path.Join(setting.CustomPath, "templates"),
},
TemplateFileSystem: bindata.Templates(
bindata.Options{
Asset: Asset,
AssetDir: AssetDir,
AssetInfo: AssetInfo,
AssetNames: AssetNames,
Prefix: "",
},
),
})
}
// Mailer provides the templates required for sending notification mails.
func Mailer() *template.Template {
for _, funcs := range NewFuncMap() {
templates.Funcs(funcs)
}
for _, assetPath := range AssetNames() {
if !strings.HasPrefix(assetPath, "mail/") {
continue
}
if !strings.HasSuffix(assetPath, ".tmpl") {
continue
}
content, err := Asset(assetPath)
if err != nil {
log.Warn("Failed to read embedded %s template. %v", assetPath, err)
continue
}
templates.New(
strings.TrimPrefix(
strings.TrimSuffix(
assetPath,
".tmpl",
),
"mail/",
),
).Parse(string(content))
}
customDir := path.Join(setting.CustomPath, "templates", "mail")
if com.IsDir(customDir) {
files, err := com.StatDir(customDir)
if err != nil {
log.Warn("Failed to read %s templates dir. %v", customDir, err)
} else {
for _, filePath := range files {
if !strings.HasSuffix(filePath, ".tmpl") {
continue
}
content, err := ioutil.ReadFile(path.Join(customDir, filePath))
if err != nil {
log.Warn("Failed to read custom %s template. %v", filePath, err)
continue
}
templates.New(
strings.TrimSuffix(
filePath,
".tmpl",
),
).Parse(string(content))
}
}
}
return templates
}

View File

@@ -0,0 +1,10 @@
// Copyright 2016 The Gitea 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 templates
//go:generate go-bindata -tags "bindata" -ignore "\\.go" -pkg "templates" -o "bindata.go" ../../templates/...
//go:generate go fmt bindata.go
//go:generate sed -i.bak s/..\/..\/templates\/// bindata.go
//go:generate rm -f bindata.go.bak

View File

@@ -2691,6 +2691,24 @@ footer .ui.language .menu {
.user.followers .follow .ui.button {
padding: 8px 15px;
}
.user.notification .octicon {
float: left;
font-size: 2em;
}
.user.notification .content {
float: left;
margin-left: 7px;
}
.user.notification .octicon-issue-opened,
.user.notification .octicon-git-pull-request {
color: green;
}
.user.notification .octicon-issue-closed {
color: red;
}
.user.notification .octicon-git-merge {
color: purple;
}
.dashboard {
padding-top: 15px;
padding-bottom: 80px;

View File

@@ -1089,7 +1089,7 @@ function searchUsers() {
if (response.ok && response.data.length) {
var html = '';
$.each(response.data, function (i, item) {
html += '<div class="item"><img class="ui avatar image" src="' + item.avatar_url + '"><span class="username">' + item.username + '</span>';
html += '<div class="item"><img class="ui avatar image" src="' + item.avatar_url + '"><span class="username">' + item.login + '</span>';
if (notEmpty(item.full_name)) {
html += ' (' + item.full_name + ')';
}

View File

@@ -74,4 +74,25 @@
}
}
}
&.notification {
.octicon {
float: left;
font-size: 2em;
}
.content {
float: left;
margin-left: 7px;
}
.octicon-issue-opened, .octicon-git-pull-request {
color: green;
}
.octicon-issue-closed {
color: red;
}
.octicon-git-merge {
color: purple;
}
}
}

View File

@@ -167,6 +167,13 @@ func mustEnableIssues(ctx *context.APIContext) {
}
}
func mustAllowPulls(ctx *context.Context) {
if !ctx.Repo.Repository.AllowsPulls() {
ctx.Status(404)
return
}
}
// RegisterRoutes registers all v1 APIs routes to web application.
// FIXME: custom form error response
func RegisterRoutes(m *macaron.Macaron) {
@@ -243,6 +250,8 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Get("/search", repo.Search)
})
m.Combo("/repositories/:id", reqToken()).Get(repo.GetByID)
m.Group("/repos", func() {
m.Post("/migrate", bind(auth.MigrateRepoForm{}), repo.Migrate)
m.Combo("/:username/:reponame", context.ExtractOwnerAndRepo()).
@@ -303,6 +312,14 @@ func RegisterRoutes(m *macaron.Macaron) {
Delete(reqRepoWriter(), repo.DeleteMilestone)
})
m.Get("/editorconfig/:filename", context.RepoRef(), repo.GetEditorconfig)
m.Group("/pulls", func() {
m.Combo("").Get(bind(api.ListPullRequestsOptions{}), repo.ListPullRequests).Post(reqRepoWriter(), bind(api.CreatePullRequestOption{}), repo.CreatePullRequest)
m.Group("/:index", func() {
m.Combo("").Get(repo.GetPullRequest).Patch(reqRepoWriter(), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
m.Combo("/merge").Get(repo.IsPullRequestMerged).Post(reqRepoWriter(), repo.MergePullRequest)
})
}, mustAllowPulls, context.ReferencesGitRepo())
}, repoAssignment())
}, reqToken())

View File

@@ -102,7 +102,8 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
// EditHook modify a hook of a repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#edit-a-hook
func EditHook(ctx *context.APIContext, form api.EditHookOption) {
w, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
hookID := ctx.ParamsInt64(":id")
w, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, hookID)
if err != nil {
if models.IsErrWebhookNotExist(err) {
ctx.Status(404)
@@ -165,7 +166,12 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
return
}
ctx.JSON(200, convert.ToHook(ctx.Repo.RepoLink, w))
updated, err := models.GetWebhookByRepoID(ctx.Repo.Repository.ID, hookID)
if err != nil {
ctx.Error(500, "GetWebhookByRepoID", err)
return
}
ctx.JSON(200, convert.ToHook(ctx.Repo.RepoLink, updated))
}
// DeleteHook delete a hook of a repository

View File

@@ -17,14 +17,26 @@ import (
// ListIssues list the issues of a repository
func ListIssues(ctx *context.APIContext) {
issues, err := models.Issues(&models.IssuesOptions{
RepoID: ctx.Repo.Repository.ID,
Page: ctx.QueryInt("page"),
})
issueOpts := models.IssuesOptions{
RepoID: ctx.Repo.Repository.ID,
Page: ctx.QueryInt("page"),
IsClosed: ctx.Query("state") == "closed",
}
issues, err := models.Issues(&issueOpts)
if err != nil {
ctx.Error(500, "Issues", err)
return
}
if ctx.Query("state") == "all" {
issueOpts.IsClosed = !issueOpts.IsClosed
tempIssues, err := models.Issues(&issueOpts)
if err != nil {
ctx.Error(500, "Issues", err)
return
}
issues = append(issues, tempIssues...)
}
// FIXME: use IssueList to improve performance.
apiIssues := make([]*api.Issue, len(issues))

View File

@@ -5,6 +5,8 @@
package repo
import (
"strconv"
api "code.gitea.io/sdk/gitea"
"code.gitea.io/gitea/models"
@@ -28,7 +30,16 @@ func ListLabels(ctx *context.APIContext) {
// GetLabel get label by repository and label id
func GetLabel(ctx *context.APIContext) {
label, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
var (
label *models.Label
err error
)
strID := ctx.Params(":id")
if intID, err2 := strconv.ParseInt(strID, 10, 64); err2 != nil {
label, err = models.GetLabelInRepoByName(ctx.Repo.Repository.ID, strID)
} else {
label, err = models.GetLabelInRepoByID(ctx.Repo.Repository.ID, intID)
}
if err != nil {
if models.IsErrLabelNotExist(err) {
ctx.Status(404)

433
routers/api/v1/repo/pull.go Normal file
View File

@@ -0,0 +1,433 @@
// Copyright 2016 The Gitea 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 (
"fmt"
"strings"
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
api "code.gitea.io/sdk/gitea"
)
// ListPullRequests returns a list of all PRs
func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) {
prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
Page: ctx.QueryInt("page"),
State: ctx.QueryTrim("state"),
SortType: ctx.QueryTrim("sort"),
Labels: ctx.QueryStrings("labels"),
MilestoneID: ctx.QueryInt64("milestone"),
})
/*prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{
Page: form.Page,
State: form.State,
})*/
if err != nil {
ctx.Error(500, "PullRequests", err)
return
}
apiPrs := make([]*api.PullRequest, len(prs))
for i := range prs {
prs[i].LoadIssue()
prs[i].LoadAttributes()
prs[i].GetBaseRepo()
prs[i].GetHeadRepo()
apiPrs[i] = prs[i].APIFormat()
}
ctx.SetLinkHeader(int(maxResults), models.ItemsPerPage)
ctx.JSON(200, &apiPrs)
}
// GetPullRequest returns a single PR based on index
func GetPullRequest(ctx *context.APIContext) {
pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrPullRequestNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetPullRequestByIndex", err)
}
return
}
pr.GetBaseRepo()
pr.GetHeadRepo()
ctx.JSON(200, pr.APIFormat())
}
// CreatePullRequest does what it says
func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption) {
var (
repo = ctx.Repo.Repository
labelIDs []int64
assigneeID int64
milestoneID int64
)
// Get repo/branch information
headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := parseCompareInfo(ctx, form)
if ctx.Written() {
return
}
// Check if another PR exists with the same targets
existingPr, err := models.GetUnmergedPullRequest(headRepo.ID, ctx.Repo.Repository.ID, headBranch, baseBranch)
if err != nil {
if !models.IsErrPullRequestNotExist(err) {
ctx.Error(500, "GetUnmergedPullRequest", err)
return
}
} else {
err = models.ErrPullRequestAlreadyExists{
ID: existingPr.ID,
IssueID: existingPr.Index,
HeadRepoID: existingPr.HeadRepoID,
BaseRepoID: existingPr.BaseRepoID,
HeadBranch: existingPr.HeadBranch,
BaseBranch: existingPr.BaseBranch,
}
ctx.Error(409, "GetUnmergedPullRequest", err)
return
}
if len(form.Labels) > 0 {
labels, err := models.GetLabelsInRepoByIDs(ctx.Repo.Repository.ID, form.Labels)
if err != nil {
ctx.Error(500, "GetLabelsInRepoByIDs", err)
return
}
labelIDs = make([]int64, len(labels))
for i := range labels {
labelIDs[i] = labels[i].ID
}
}
if form.Milestone > 0 {
milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, milestoneID)
if err != nil {
if models.IsErrMilestoneNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetMilestoneByRepoID", err)
}
return
}
milestoneID = milestone.ID
}
if len(form.Assignee) > 0 {
assigneeUser, err := models.GetUserByName(form.Assignee)
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Error(422, "", fmt.Sprintf("assignee does not exist: [name: %s]", form.Assignee))
} else {
ctx.Error(500, "GetUserByName", err)
}
return
}
assignee, err := repo.GetAssigneeByID(assigneeUser.ID)
if err != nil {
ctx.Error(500, "GetAssigneeByID", err)
return
}
assigneeID = assignee.ID
}
patch, err := headGitRepo.GetPatch(prInfo.MergeBase, headBranch)
if err != nil {
ctx.Error(500, "GetPatch", err)
return
}
prIssue := &models.Issue{
RepoID: repo.ID,
Index: repo.NextIssueIndex(),
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
MilestoneID: milestoneID,
AssigneeID: assigneeID,
IsPull: true,
Content: form.Body,
}
pr := &models.PullRequest{
HeadRepoID: headRepo.ID,
BaseRepoID: repo.ID,
HeadUserName: headUser.Name,
HeadBranch: headBranch,
BaseBranch: baseBranch,
HeadRepo: headRepo,
BaseRepo: repo,
MergeBase: prInfo.MergeBase,
Type: models.PullRequestGitea,
}
if err := models.NewPullRequest(repo, prIssue, labelIDs, []string{}, pr, patch); err != nil {
ctx.Error(500, "NewPullRequest", err)
return
} else if err := pr.PushToBaseRepo(); err != nil {
ctx.Error(500, "PushToBaseRepo", err)
return
}
log.Trace("Pull request created: %d/%d", repo.ID, prIssue.ID)
ctx.JSON(201, pr.APIFormat())
}
// EditPullRequest does what it says
func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) {
pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrPullRequestNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetPullRequestByIndex", err)
}
return
}
pr.LoadIssue()
issue := pr.Issue
if !issue.IsPoster(ctx.User.ID) && !ctx.Repo.IsWriter() {
ctx.Status(403)
return
}
if len(form.Title) > 0 {
issue.Title = form.Title
}
if len(form.Body) > 0 {
issue.Content = form.Body
}
if ctx.Repo.IsWriter() && len(form.Assignee) > 0 &&
(issue.Assignee == nil || issue.Assignee.LowerName != strings.ToLower(form.Assignee)) {
if len(form.Assignee) == 0 {
issue.AssigneeID = 0
} else {
assignee, err := models.GetUserByName(form.Assignee)
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Error(422, "", fmt.Sprintf("assignee does not exist: [name: %s]", form.Assignee))
} else {
ctx.Error(500, "GetUserByName", err)
}
return
}
issue.AssigneeID = assignee.ID
}
if err = models.UpdateIssueUserByAssignee(issue); err != nil {
ctx.Error(500, "UpdateIssueUserByAssignee", err)
return
}
}
if ctx.Repo.IsWriter() && form.Milestone != 0 &&
issue.MilestoneID != form.Milestone {
oldMilestoneID := issue.MilestoneID
issue.MilestoneID = form.Milestone
if err = models.ChangeMilestoneAssign(issue, oldMilestoneID); err != nil {
ctx.Error(500, "ChangeMilestoneAssign", err)
return
}
}
if err = models.UpdateIssue(issue); err != nil {
ctx.Error(500, "UpdateIssue", err)
return
}
if form.State != nil {
if err = issue.ChangeStatus(ctx.User, ctx.Repo.Repository, api.StateClosed == api.StateType(*form.State)); err != nil {
ctx.Error(500, "ChangeStatus", err)
return
}
}
// Refetch from database
pr, err = models.GetPullRequestByIndex(ctx.Repo.Repository.ID, pr.Index)
if err != nil {
if models.IsErrPullRequestNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetPullRequestByIndex", err)
}
return
}
ctx.JSON(201, pr.APIFormat())
}
// IsPullRequestMerged checks if a PR exists given an index
// - Returns 204 if it exists
// Otherwise 404
func IsPullRequestMerged(ctx *context.APIContext) {
pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrPullRequestNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetPullRequestByIndex", err)
}
return
}
if pr.HasMerged {
ctx.Status(204)
}
ctx.Status(404)
}
// MergePullRequest merges a PR given an index
func MergePullRequest(ctx *context.APIContext) {
pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index"))
if err != nil {
if models.IsErrPullRequestNotExist(err) {
ctx.Handle(404, "GetPullRequestByIndex", err)
} else {
ctx.Error(500, "GetPullRequestByIndex", err)
}
return
}
if err = pr.GetHeadRepo(); err != nil {
ctx.Handle(500, "GetHeadRepo", err)
return
}
pr.LoadIssue()
pr.Issue.Repo = ctx.Repo.Repository
if ctx.IsSigned {
// Update issue-user.
if err = pr.Issue.ReadBy(ctx.User.ID); err != nil {
ctx.Error(500, "ReadBy", err)
return
}
}
if pr.Issue.IsClosed {
ctx.Status(404)
return
}
if !pr.CanAutoMerge() || pr.HasMerged {
ctx.Status(405)
return
}
if err := pr.Merge(ctx.User, ctx.Repo.GitRepo); err != nil {
ctx.Error(500, "Merge", err)
return
}
log.Trace("Pull request merged: %d", pr.ID)
ctx.Status(200)
}
func parseCompareInfo(ctx *context.APIContext, form api.CreatePullRequestOption) (*models.User, *models.Repository, *git.Repository, *git.PullRequestInfo, string, string) {
baseRepo := ctx.Repo.Repository
// Get compared branches information
// format: <base branch>...[<head repo>:]<head branch>
// base<-head: master...head:feature
// same repo: master...feature
// TODO: Validate form first?
baseBranch := form.Base
var (
headUser *models.User
headBranch string
isSameRepo bool
err error
)
// If there is no head repository, it means pull request between same repository.
headInfos := strings.Split(form.Head, ":")
if len(headInfos) == 1 {
isSameRepo = true
headUser = ctx.Repo.Owner
headBranch = headInfos[0]
} else if len(headInfos) == 2 {
headUser, err = models.GetUserByName(headInfos[0])
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Handle(404, "GetUserByName", nil)
} else {
ctx.Handle(500, "GetUserByName", err)
}
return nil, nil, nil, nil, "", ""
}
headBranch = headInfos[1]
} else {
ctx.Status(404)
return nil, nil, nil, nil, "", ""
}
ctx.Repo.PullRequest.SameRepo = isSameRepo
log.Info("Base branch: %s", baseBranch)
log.Info("Repo path: %s", ctx.Repo.GitRepo.Path)
// Check if base branch is valid.
if !ctx.Repo.GitRepo.IsBranchExist(baseBranch) {
ctx.Status(404)
return nil, nil, nil, nil, "", ""
}
// Check if current user has fork of repository or in the same repository.
headRepo, has := models.HasForkedRepo(headUser.ID, baseRepo.ID)
if !has && !isSameRepo {
log.Trace("parseCompareInfo[%d]: does not have fork or in same repository", baseRepo.ID)
ctx.Status(404)
return nil, nil, nil, nil, "", ""
}
var headGitRepo *git.Repository
if isSameRepo {
headRepo = ctx.Repo.Repository
headGitRepo = ctx.Repo.GitRepo
} else {
headGitRepo, err = git.OpenRepository(models.RepoPath(headUser.Name, headRepo.Name))
if err != nil {
ctx.Error(500, "OpenRepository", err)
return nil, nil, nil, nil, "", ""
}
}
if !ctx.User.IsWriterOfRepo(headRepo) && !ctx.User.IsAdmin {
log.Trace("ParseCompareInfo[%d]: does not have write access or site admin", baseRepo.ID)
ctx.Status(404)
return nil, nil, nil, nil, "", ""
}
// Check if head branch is valid.
if !headGitRepo.IsBranchExist(headBranch) {
ctx.Status(404)
return nil, nil, nil, nil, "", ""
}
prInfo, err := headGitRepo.GetPullRequestInfo(models.RepoPath(baseRepo.Owner.Name, baseRepo.Name), baseBranch, headBranch)
if err != nil {
ctx.Error(500, "GetPullRequestInfo", err)
return nil, nil, nil, nil, "", ""
}
return headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch
}

View File

@@ -95,16 +95,12 @@ func ListMyRepos(ctx *context.APIContext) {
repos := make([]*api.Repository, numOwnRepos+len(accessibleRepos))
for i := range ownRepos {
repos[i] = ownRepos[i].APIFormat(&api.Permission{true, true, true})
repos[i] = ownRepos[i].APIFormat(models.AccessModeOwner)
}
i := numOwnRepos
for repo, access := range accessibleRepos {
repos[i] = repo.APIFormat(&api.Permission{
Admin: access >= models.AccessModeAdmin,
Push: access >= models.AccessModeWrite,
Pull: true,
})
repos[i] = repo.APIFormat(access)
i++
}
@@ -138,10 +134,10 @@ func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateR
return
}
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
ctx.JSON(201, repo.APIFormat(models.AccessModeOwner))
}
// Create create one repository of mine
// Create one repository of mine
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#create
func Create(ctx *context.APIContext, opt api.CreateRepoOption) {
// Shouldn't reach this condition, but just in case.
@@ -241,17 +237,42 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
}
log.Trace("Repository migrated: %s/%s", ctxUser.Name, form.RepoName)
ctx.JSON(201, repo.APIFormat(&api.Permission{true, true, true}))
ctx.JSON(201, repo.APIFormat(models.AccessModeAdmin))
}
// Get get one repository
// Get one repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#get
func Get(ctx *context.APIContext) {
repo := ctx.Repo.Repository
ctx.JSON(200, repo.APIFormat(&api.Permission{true, true, true}))
access, err := models.AccessLevel(ctx.User, repo)
if err != nil {
ctx.Error(500, "GetRepository", err)
return
}
ctx.JSON(200, repo.APIFormat(access))
}
// Delete delete one repository
// GetByID returns a single Repository
func GetByID(ctx *context.APIContext) {
repo, err := models.GetRepositoryByID(ctx.ParamsInt64(":id"))
if err != nil {
if models.IsErrRepoNotExist(err) {
ctx.Status(404)
} else {
ctx.Error(500, "GetRepositoryByID", err)
}
return
}
access, err := models.AccessLevel(ctx.User, repo)
if err != nil {
ctx.Error(500, "GetRepositoryByID", err)
return
}
ctx.JSON(200, repo.APIFormat(access))
}
// Delete one repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#delete
func Delete(ctx *context.APIContext) {
owner := ctx.Repo.Owner

View File

@@ -18,9 +18,17 @@ func getStarredRepos(userID int64, private bool) ([]*api.Repository, error) {
if err != nil {
return nil, err
}
user, err := models.GetUserByID(userID)
if err != nil {
return nil, err
}
repos := make([]*api.Repository, len(starredRepos))
for i, starred := range starredRepos {
repos[i] = starred.APIFormat(&api.Permission{true, true, true})
access, err := models.AccessLevel(user, starred)
if err != nil {
return nil, err
}
repos[i] = starred.APIFormat(access)
}
return repos, nil
}

View File

@@ -9,6 +9,8 @@ import (
"github.com/Unknwon/paginater"
"bytes"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
@@ -60,6 +62,14 @@ type RepoSearchOptions struct {
TplName base.TplName
}
var (
nullByte = []byte{0x00}
)
func isKeywordValid(keyword string) bool {
return !bytes.Contains([]byte(keyword), nullByte)
}
// RenderRepoSearch render repositories search page
func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
page := ctx.QueryInt("page")
@@ -82,16 +92,18 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
}
count = opts.Counter(opts.Private)
} else {
repos, count, err = models.SearchRepositoryByName(&models.SearchRepoOptions{
Keyword: keyword,
OrderBy: opts.OrderBy,
Private: opts.Private,
Page: page,
PageSize: opts.PageSize,
})
if err != nil {
ctx.Handle(500, "SearchRepositoryByName", err)
return
if isKeywordValid(keyword) {
repos, count, err = models.SearchRepositoryByName(&models.SearchRepoOptions{
Keyword: keyword,
OrderBy: opts.OrderBy,
Private: opts.Private,
Page: page,
PageSize: opts.PageSize,
})
if err != nil {
ctx.Handle(500, "SearchRepositoryByName", err)
return
}
}
}
ctx.Data["Keyword"] = keyword
@@ -156,16 +168,18 @@ func RenderUserSearch(ctx *context.Context, opts *UserSearchOptions) {
}
count = opts.Counter()
} else {
users, count, err = models.SearchUserByName(&models.SearchUserOptions{
Keyword: keyword,
Type: opts.Type,
OrderBy: opts.OrderBy,
Page: page,
PageSize: opts.PageSize,
})
if err != nil {
ctx.Handle(500, "SearchUserByName", err)
return
if isKeywordValid(keyword) {
users, count, err = models.SearchUserByName(&models.SearchUserOptions{
Keyword: keyword,
Type: opts.Type,
OrderBy: opts.OrderBy,
Page: page,
PageSize: opts.PageSize,
})
if err != nil {
ctx.Handle(500, "SearchUserByName", err)
return
}
}
}
ctx.Data["Keyword"] = keyword

View File

@@ -11,12 +11,12 @@ import (
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/cron"
"code.gitea.io/gitea/modules/highlight"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/mailer"
"code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/ssh"
"code.gitea.io/gitea/modules/template/highlight"
macaron "gopkg.in/macaron.v1"
)
@@ -70,9 +70,6 @@ func GlobalInit() {
if models.EnableTiDB {
log.Info("TiDB Supported")
}
if setting.SupportMiniWinService {
log.Info("Builtin Windows Service Supported")
}
checkRunMode()
if setting.InstallLock && setting.SSH.StartBuiltinServer {

View File

@@ -164,7 +164,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
if err := models.NewTestEngine(x); err != nil {
if strings.Contains(err.Error(), `Unknown database type: sqlite3`) {
ctx.Data["Err_DbType"] = true
ctx.RenderWithErr(ctx.Tr("install.sqlite3_not_available", "https://gogs.io/docs/installation/install_from_binary.html"), tplInstall, &form)
ctx.RenderWithErr(ctx.Tr("install.sqlite3_not_available", "https://docs.gitea.io/installation/install_from_binary.html"), tplInstall, &form)
} else {
ctx.Data["Err_DbSetting"] = true
ctx.RenderWithErr(ctx.Tr("install.invalid_db_setting", err), tplInstall, &form)

View File

@@ -18,7 +18,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template"
"code.gitea.io/gitea/modules/templates"
)
const (
@@ -74,7 +74,7 @@ func editFile(ctx *context.Context, isNewFile bool) {
d, _ := ioutil.ReadAll(dataRc)
buf = append(buf, d...)
if content, err := template.ToUTF8WithErr(buf); err != nil {
if content, err := templates.ToUTF8WithErr(buf); err != nil {
if err != nil {
log.Error(4, "ToUTF8WithErr: %v", err)
}

View File

@@ -23,6 +23,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
)
@@ -453,6 +454,8 @@ func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) {
return
}
notification.Service.NotifyIssue(issue)
log.Trace("Issue created: %d/%d", repo.ID, issue.ID)
ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index))
}
@@ -898,6 +901,8 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
return
}
notification.Service.NotifyIssue(issue)
log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID)
}

View File

@@ -62,6 +62,7 @@ func getForkRepository(ctx *context.Context) *models.Repository {
return nil
}
ctx.Data["ForkFrom"] = forkRepo.Owner.Name + "/" + forkRepo.Name
ctx.Data["ForkFromOwnerID"] = forkRepo.Owner.ID
if err := ctx.User.GetOrganizations(true); err != nil {
ctx.Handle(500, "GetOrganizations", err)

View File

@@ -16,11 +16,11 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/highlight"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markdown"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/template"
"code.gitea.io/gitea/modules/template/highlight"
"code.gitea.io/gitea/modules/templates"
"github.com/Unknwon/paginater"
)
@@ -164,7 +164,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
} else {
// Building code view blocks with line number on server side.
var fileContent string
if content, err := template.ToUTF8WithErr(buf); err != nil {
if content, err := templates.ToUTF8WithErr(buf); err != nil {
if err != nil {
log.Error(4, "ToUTF8WithErr: %s", err)
}

View File

@@ -388,7 +388,7 @@ func TestWebhook(ctx *context.Context) {
},
},
},
Repo: ctx.Repo.Repository.APIFormat(nil),
Repo: ctx.Repo.Repository.APIFormat(models.AccessModeNone),
Pusher: apiUser,
Sender: apiUser,
}

View File

@@ -0,0 +1,39 @@
package user
import (
"fmt"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
)
const (
tplNotification base.TplName = "user/notification/notification"
)
// Notifications is the notifications page
func Notifications(c *context.Context) {
var status models.NotificationStatus
switch c.Query("status") {
case "read":
status = models.NotificationStatusRead
default:
status = models.NotificationStatusUnread
}
notifications, err := models.NotificationsForUser(c.User, status)
if err != nil {
c.Handle(500, "ErrNotificationsForUser", err)
return
}
title := "Notifications"
if count := len(notifications); count > 0 {
title = fmt.Sprintf("(%d) %s", count, title)
}
c.Data["Title"] = title
c.Data["Status"] = status
c.Data["Notifications"] = notifications
c.HTML(200, tplNotification)
}

View File

@@ -29,7 +29,6 @@ const (
tplSettingsSocial base.TplName = "user/settings/social"
tplSettingsApplications base.TplName = "user/settings/applications"
tplSettingsDelete base.TplName = "user/settings/delete"
tplNotification base.TplName = "user/notification"
tplSecurity base.TplName = "user/security"
)

View File

@@ -2,10 +2,10 @@
#
# /etc/rc.d/init.d/gitea
#
# Runs the Gogs Go Git Service.
#
# Runs the Gitea Git with a cup of tea.
#
# chkconfig: - 85 15
#
# chkconfig: - 85 15
#
### BEGIN INIT INFO
@@ -27,7 +27,7 @@ NAME=gitea
GITEA_HOME=/home/git/gitea
GITEA_PATH=${GITEA_HOME}/$NAME
GITEA_USER=git
SERVICENAME="Gogs Go Git Service"
SERVICENAME="Gitea - Git with a cup of tea"
LOCKFILE=/var/lock/subsys/gitea
LOGPATH=${GITEA_HOME}/log
LOGFILE=${LOGPATH}/gitea.log

View File

@@ -2,7 +2,7 @@
#
# /etc/init.d/gitea
#
# Runs the Gogs Go Git Service.
# Runs the Gitea Git with a cup of tea.
#
### BEGIN INIT INFO
@@ -21,7 +21,7 @@ NAME=gitea
GITEA_HOME=/home/git/gitea
GITEA_PATH=${GITEA_HOME}/$NAME
GITEA_USER=git
SERVICENAME="Go Git Service"
SERVICENAME="Git - with a cup of tea"
LOCKFILE=/var/lock/subsys/gitea
LOGPATH=${GITEA_HOME}/log
LOGFILE=${LOGPATH}/error.log

View File

@@ -4,7 +4,7 @@
<dict>
<key>Label</key>
<string>io.gitea.web</string>
<!-- assumes Gogs is running under 'git' account -->
<!-- assumes Gitea is running under 'git' account -->
<!-- modify below to reflect your settings -->
<key>UserName</key>
<string>git</string>
@@ -12,7 +12,7 @@
<string>git</string>
<key>ProgramArguments</key>
<array>
<!-- assumes Gogs is installed in /Users/git/gitea -->
<!-- assumes Gitea is installed in /Users/git/gitea -->
<!-- modify below to reflect your settings -->
<string>/Users/git/gitea/gitea</string>
<string>web</string>
@@ -21,7 +21,7 @@
<true/>
<key>KeepAlive</key>
<true/>
<!-- assumes Gogs is installed in /Users/git/gitea -->
<!-- assumes Gitea is installed in /Users/git/gitea -->
<!-- modify below to reflect your settings -->
<key>WorkingDirectory</key>
<string>/Users/git/gitea/</string>
@@ -29,7 +29,7 @@
<string>/Users/git/gitea/log/stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/git/gitea/log/stderr.log</string>
<!-- default 256 is too low for Gogs needs using parallel pipes -->
<!-- default 256 is too low for Gitea needs using parallel pipes -->
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>

View File

@@ -1,5 +1,5 @@
[Unit]
Description=Gogs (Go Git Service)
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
#After=mysqld.service

View File

@@ -6,19 +6,19 @@
:: https://nssm.cc/download
:: This script itself should run in the gogs path, too.
:: In case of startup failure, please read carefully the log file.
:: Make sure Gogs work running manually with "gogs web" before running
:: Make sure Gitea work running manually with "gitea web" before running
:: this script.
:: And, please, read carefully the installation docs first:
:: https://gogs.io/docs/installation
:: To unistall the service, run "nssm remove gogs" and restart Windows.
:: Set the folder where you extracted Gogs. Omit the last slash.
:: Set the folder where you extracted Gitea. Omit the last slash.
SET gogspath=C:\gogs
nssm install gogs "%gogspath%\gogs.exe"
nssm set gogs AppParameters "web"
nssm set gogs Description "A painless self-hosted Git service."
nssm set gogs DisplayName "Gogs - Go Git Service"
nssm set gogs DisplayName "Gitea - Git with a cup of tea"
nssm set gogs Start SERVICE_DELAYED_AUTO_START
nssm set gogs AppStdout "%gogspath%\gogs.log"
nssm start gogs

View File

@@ -1 +0,0 @@
0.9.99.0915

View File

@@ -11,9 +11,7 @@
</div>
<div class="ui right links">
{{if .ShowFooterBranding}}
<a target="_blank" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
<a target="_blank" href="https://twitter.com/gogitservice"><i class="fa fa-twitter"></i><span class="sr-only">Twitter</span></a>
<a target="_blank" href="http://weibo.com/gogschina"><i class="fa fa-weibo"></i><span class="sr-only">Sina Weibo</span></a>
<a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
{{end}}
<div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i>
@@ -24,7 +22,7 @@
{{end}}
</div>
</div>
<a target="_blank" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
<a target="_blank" rel="noopener" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
</div>
</div>

View File

@@ -3,8 +3,8 @@
<head data-suburl="{{AppSubUrl}}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}Gogs - Go Git Service{{end}}" />
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}Gogs (Go Git Service) is a painless self-hosted Git service written in Go{{end}}" />
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}Gitea - Git with a cup of tea{{end}}" />
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go{{end}}" />
<meta name="keywords" content="go, git, self-hosted, gogs">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" />
@@ -75,6 +75,12 @@
{{if .IsSigned}}
<div class="right menu">
<a href="/notifications" class="ui head link jump item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<i class="octicon octicon-inbox"><span class="sr-only">{{.i18n.Tr "notifications"}}</span></i>
</span>
</a>
<div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<i class="octicon octicon-plus"><span class="sr-only">{{.i18n.Tr "create_new"}}</span></i>
@@ -113,7 +119,7 @@
<i class="octicon octicon-settings"></i>
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" href="https://gogs.io/docs" rel="noreferrer">
<a class="item" target="_blank" rel="noopener" href="https://docs.gitea.io" rel="noreferrer">
<i class="octicon octicon-question"></i>
{{.i18n.Tr "help"}}<!-- Help -->
</a>
@@ -137,7 +143,7 @@
{{else}}
<a class="item" target="_blank" href="https://gogs.io/docs" rel="noreferrer">{{.i18n.Tr "help"}}</a>
<a class="item" target="_blank" rel="noopener" href="https://docs.gitea.io" rel="noreferrer">{{.i18n.Tr "help"}}</a>
<div class="right menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">

View File

@@ -24,6 +24,8 @@
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.org_no_results"}}</div>
{{end}}
</div>

View File

@@ -19,5 +19,9 @@
{{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
</div>
{{else}}
<div>
{{$.i18n.Tr "explore.repo_no_results"}}
</div>
{{end}}
</div>

View File

@@ -24,6 +24,8 @@
</div>
</div>
</div>
{{else}}
<div>{{$.i18n.Tr "explore.user_no_results"}}</div>
{{end}}
</div>

View File

@@ -20,7 +20,7 @@
<i class="octicon octicon-flame"></i> Einfach zu installieren
</h1>
<p class="large">
Starte einfach <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gitea gibt es auch für <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a>, <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.
Starte einfach <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gitea gibt es auch für <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a>, <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">Installationspaket</a>.
</p>
</div>
<div class="eight wide center column">
@@ -28,7 +28,7 @@
<i class="octicon octicon-device-desktop"></i> Plattformübergreifend
</h1>
<p class="large">
Gitea läuft überall. <a target="_blank" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
Gitea läuft überall. <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
</p>
</div>
</div>
@@ -46,7 +46,7 @@
<i class="octicon octicon-code"></i> Quelloffen
</h1>
<p class="large">
Der komplette Code befindet sich auf <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a>! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich!
Der komplette Code befindet sich auf <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a>! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich!
</p>
</div>
</div>
@@ -57,7 +57,7 @@
<i class="octicon octicon-flame"></i> 易安装
</h1>
<p class="large">
您除了可以根据操作系统平台通过 <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> 或 <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">包管理</a> 安装。
您除了可以根据操作系统平台通过 <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> 或 <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">包管理</a> 安装。
</p>
</div>
<div class="eight wide center column">
@@ -65,7 +65,7 @@
<i class="octicon octicon-device-desktop"></i> 跨平台
</h1>
<p class="large">
任何 <a target="_blank" href="http://golang.org/">Go 语言</a> 支持的平台都可以运行 Gitea包括 Windows、Mac、Linux 以及 ARM。挑一个您喜欢的就行
任何 <a target="_blank" rel="noopener" href="http://golang.org/">Go 语言</a> 支持的平台都可以运行 Gitea包括 Windows、Mac、Linux 以及 ARM。挑一个您喜欢的就行
</p>
</div>
</div>
@@ -83,7 +83,7 @@
<i class="octicon octicon-code"></i> 开源化
</h1>
<p class="large">
所有的代码都开源在 <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a> 上,赶快加入我们来共同发展这个伟大的项目!还等什么?成为贡献者吧!
所有的代码都开源在 <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a> 上,赶快加入我们来共同发展这个伟大的项目!还等什么?成为贡献者吧!
</p>
</div>
</div>
@@ -94,10 +94,10 @@
<i class="octicon octicon-flame"></i> Facile à installer
</h1>
<p class="large">
Il suffit de <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">lancer l'exécutable</a> correspondant à votre système.
Ou d'utiliser Gitea avec <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou
<a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>
ou en l'installant depuis un <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">package</a>.
Il suffit de <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">lancer l'exécutable</a> correspondant à votre système.
Ou d'utiliser Gitea avec <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou
<a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>
ou en l'installant depuis un <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">package</a>.
</p>
</div>
<div class="eight wide center column">
@@ -105,7 +105,7 @@
<i class="octicon octicon-device-desktop"></i> Multi-plateforme
</h1>
<p class="large">
Gitea tourne partout où <a target="_blank" href="http://golang.org/">Go</a> peut être compilé : Windows, Mac OS X, Linux, ARM, etc. Choisissez votre préféré !
Gitea tourne partout où <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> peut être compilé : Windows, Mac OS X, Linux, ARM, etc. Choisissez votre préféré !
</p>
</div>
</div>
@@ -123,7 +123,7 @@
<i class="octicon octicon-code"></i> Open Source
</h1>
<p class="large">
Toutes les sources sont sur <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a> ! Rejoignez-nous et contribuez à rendre ce projet encore meilleur.
Toutes les sources sont sur <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a> ! Rejoignez-nous et contribuez à rendre ce projet encore meilleur.
</p>
</div>
</div>
@@ -134,7 +134,7 @@
<i class="octicon octicon-flame"></i> Fácil de instalar
</h1>
<p class="large">
Simplemente <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">arranca el binario</a> para tu plataforma. O usa Gitea con <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> o <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, o utilice el <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">paquete</a>.
Simplemente <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">arranca el binario</a> para tu plataforma. O usa Gitea con <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> o <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, o utilice el <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">paquete</a>.
</p>
</div>
<div class="eight wide center column">
@@ -142,7 +142,7 @@
<i class="octicon octicon-device-desktop"></i> Multiplatforma
</h1>
<p class="large">
Gitea funciona en cualquier parte, <a target="_blank" href="http://golang.org/">Go</a> puede compilarse en: Windows, Mac OS X, Linux, ARM, etc. !Elige tu favorita!
Gitea funciona en cualquier parte, <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> puede compilarse en: Windows, Mac OS X, Linux, ARM, etc. !Elige tu favorita!
</p>
</div>
</div>
@@ -160,7 +160,7 @@
<i class="octicon octicon-code"></i> Open Source
</h1>
<p class="large">
¡Está todo en <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a>! Uniros contribuyendo a hacer este proyecto todavía mejor. ¡No seas tímido y colabora!
¡Está todo en <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a>! Uniros contribuyendo a hacer este proyecto todavía mejor. ¡No seas tímido y colabora!
</p>
</div>
</div>
@@ -171,7 +171,7 @@
<i class="octicon octicon-flame"></i> Fácil de instalar
</h1>
<p class="large">
Simplesmente <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">rode o executável</a> para o seu sistema operacional. Ou obtenha o Gitea com o <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, ou baixe o <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">pacote</a>.
Simplesmente <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">rode o executável</a> para o seu sistema operacional. Ou obtenha o Gitea com o <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> ou <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, ou baixe o <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">pacote</a>.
</p>
</div>
<div class="eight wide center column">
@@ -179,7 +179,7 @@
<i class="octicon octicon-device-desktop"></i> Multi-plataforma
</h1>
<p class="large">
Gitea roda em qualquer sistema operacional em que <a target="_blank" href="http://golang.org/">Go</a> consegue compilar: Windows, Mac OS X, Linux, ARM, etc. Escolha qual você gosta mais!
Gitea roda em qualquer sistema operacional em que <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> consegue compilar: Windows, Mac OS X, Linux, ARM, etc. Escolha qual você gosta mais!
</p>
</div>
</div>
@@ -197,7 +197,7 @@
<i class="octicon octicon-code"></i> Código aberto
</h1>
<p class="large">
Está tudo no <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a>! Contribua e torne este projeto ainda melhor. Não tenha vergonha de contribuir!
Está tudo no <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a>! Contribua e torne este projeto ainda melhor. Não tenha vergonha de contribuir!
</p>
</div>
</div>
@@ -208,7 +208,7 @@
<i class="octicon octicon-flame"></i> Простой в установке
</h1>
<p class="large">
Просто <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">запустите исполняемый файл</a> для вашей платформы. Изпользуйте Gitea с <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> или <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, или загрузите <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">пакет</a>.
Просто <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">запустите исполняемый файл</a> для вашей платформы. Изпользуйте Gitea с <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> или <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, или загрузите <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">пакет</a>.
</p>
</div>
<div class="eight wide center column">
@@ -216,7 +216,7 @@
<i class="octicon octicon-device-desktop"></i> Кроссплатформенный
</h1>
<p class="large">
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" href="http://golang.org/">Go</a>: Windows, Mac OS X, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener" href="http://golang.org/">Go</a>: Windows, Mac OS X, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
</p>
</div>
</div>
@@ -234,7 +234,7 @@
<i class="octicon octicon-code"></i> Открытый исходный код
</h1>
<p class="large">
Всё это на <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a>! Присоединяйтесь к нам, внося вклад, чтобы сделать этот проект еще лучше. Не бойтесь помогать!
Всё это на <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a>! Присоединяйтесь к нам, внося вклад, чтобы сделать этот проект еще лучше. Не бойтесь помогать!
</p>
</div>
</div>
@@ -245,7 +245,7 @@
<i class="octicon octicon-flame"></i> Easy to install
</h1>
<p class="large">
Simply <a target="_blank" href="https://gogs.io/docs/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gitea with <a target="_blank" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> or <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" href="https://gogs.io/docs/installation/install_from_packages.html">packaged</a>.
Simply <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gitea with <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/tree/master/docker">Docker</a> or <a target="_blank" rel="noopener" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" rel="noopener" href="https://docs.gitea.io/installation/install_from_packages.html">packaged</a>.
</p>
</div>
<div class="eight wide center column">
@@ -253,7 +253,7 @@
<i class="octicon octicon-device-desktop"></i> Cross-platform
</h1>
<p class="large">
Gitea runs anywhere <a target="_blank" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
Gitea runs anywhere <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
</p>
</div>
</div>
@@ -271,7 +271,7 @@
<i class="octicon octicon-code"></i> Open Source
</h1>
<p class="large">
It's all on <a target="_blank" href="https://github.com/go-gitea/gitea/">GitHub</a>! Join us by contributing to make this project even better. Don't be shy to be a contributor!
It's all on <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea/">GitHub</a>! Join us by contributing to make this project even better. Don't be shy to be a contributor!
</p>
</div>
</div>

View File

@@ -10,6 +10,6 @@
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
<p><a href="{{AppUrl}}user/activate?code={{.Code}}">{{AppUrl}}user/activate?code={{.Code}}</a></p>
<p>Not working? Try copying and pasting it to your browser.</p>
<p>© 2016 <a target="_blank" href="{{AppUrl}}">{{AppName}}</a></p>
<p>© 2016 <a target="_blank" rel="noopener" href="{{AppUrl}}">{{AppName}}</a></p>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More