Merge branch 'master' into recaptcha
This commit is contained in:
commit
59cba2c4a9
15
CHANGELOG.md
15
CHANGELOG.md
|
|
@ -4,6 +4,21 @@ This changelog goes through all the changes that have been made in each release
|
|||
without substantial changes to our git log; to see the highlights of what has
|
||||
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||
|
||||
## [1.4.2](https://github.com/go-gitea/gitea/releases/tag/v1.4.2) - 2018-06-04
|
||||
* BUGFIXES
|
||||
* Adjust z-index for floating labels (#3939) (#3950)
|
||||
* Add missing token validation on application settings page (#3976) #3978
|
||||
* Webhook and hook_task clean up (#4006)
|
||||
* Fix webhook bug of response info is not displayed in UI (#4023)
|
||||
* Fix writer cannot read bare repo guide (#4033) (#4039)
|
||||
* Don't force due date to current time (#3830) (#4057)
|
||||
* Fix wiki redirects (#3919) (#4065)
|
||||
* Fix attachment ENABLED (#4064) (#4066)
|
||||
* Added deletion of an empty line at the end of file (#4054) (#4074)
|
||||
* Use ResolveReference instead of path.Join (#4073)
|
||||
* Fix #4081 Check for leading / in base before removing it (#4083)
|
||||
* Respository's home page not updated after first push (#4075)
|
||||
|
||||
## [1.4.1](https://github.com/go-gitea/gitea/releases/tag/v1.4.1) - 2018-05-03
|
||||
* BREAKING
|
||||
* Add "error" as reserved username (#3882) (#3886)
|
||||
|
|
|
|||
|
|
@ -69,9 +69,9 @@ and keep the compatibility on upgrade. To make sure you are
|
|||
running the test suite exactly like we do, you should install
|
||||
the CLI for [Drone CI](https://github.com/drone/drone), as
|
||||
we are using the server for continous testing, following [these
|
||||
instructions](http://readme.drone.io/usage/getting-started-cli). After that,
|
||||
you can simply call `drone exec` within your working directory and it will try
|
||||
to run the test suite locally.
|
||||
instructions](http://docs.drone.io/cli-installation/). After that,
|
||||
you can simply call `drone exec --local --build-event "pull_request"` within
|
||||
your working directory and it will try to run the test suite locally.
|
||||
|
||||
## Vendoring
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ pull request workflow to do that. And, we also use [LGTM](http://lgtm.co)
|
|||
to ensure every PR is reviewed by at least 2 maintainers.
|
||||
|
||||
Please try to make your pull request easy to review for us. And, please read
|
||||
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#best-practices-for-faster-reviews)* guide;
|
||||
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews)* guide;
|
||||
it has lots of useful tips for any project you may want to contribute.
|
||||
Some of the key points:
|
||||
|
||||
|
|
|
|||
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
|
@ -5,7 +5,7 @@
|
|||
branch = "master"
|
||||
name = "code.gitea.io/git"
|
||||
packages = ["."]
|
||||
revision = "0077debc17a58c821f4e62e815a54c1ab52da157"
|
||||
revision = "31f4b8e8c805438ac6d8914b38accb1d8aaf695e"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -100,6 +100,13 @@ swagger-check: generate-swagger
|
|||
exit 1; \
|
||||
fi;
|
||||
|
||||
.PHONY: swagger-validate
|
||||
swagger-validate:
|
||||
@hash swagger > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u github.com/go-swagger/go-swagger/cmd/swagger; \
|
||||
fi
|
||||
swagger validate ./public/swagger.v1.json
|
||||
|
||||
.PHONY: errcheck
|
||||
errcheck:
|
||||
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
|
|
|
|||
|
|
@ -91,6 +91,12 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|||
<a href="https://opencollective.com/gitea/sponsor/8/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/gitea/sponsor/9/website" target="_blank"><img src="https://opencollective.com/gitea/sponsor/9/avatar.svg"></a>
|
||||
|
||||
## FAQ
|
||||
|
||||
**How do you pronounce Gitea?**
|
||||
|
||||
Gitea is pronounced [/ɡɪ’ti:/](https://youtu.be/EM71-2uDAoY) as in "gi-tea" with a hard g.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License.
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ func runServ(c *cli.Context) error {
|
|||
claims := jwt.MapClaims{
|
||||
"repo": repo.ID,
|
||||
"op": lfsVerb,
|
||||
"exp": now.Add(5 * time.Minute).Unix(),
|
||||
"exp": now.Add(setting.LFS.HTTPAuthExpiry).Unix(),
|
||||
"nbf": now.Unix(),
|
||||
}
|
||||
if user != nil {
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
# Default values
|
||||
|
||||
NAME=gitea
|
||||
GITEA_HOME=/home/git/gitea
|
||||
GITEA_PATH=${GITEA_HOME}/$NAME
|
||||
GITEA_HOME=/var/lib/${NAME}
|
||||
GITEA_PATH=/usr/local/bin/${NAME}
|
||||
GITEA_USER=git
|
||||
SERVICENAME="Gitea - Git with a cup of tea"
|
||||
LOCKFILE=/var/lock/subsys/gitea
|
||||
|
|
@ -49,11 +49,11 @@ DAEMON_OPTS="--check $NAME"
|
|||
start() {
|
||||
cd ${GITEA_HOME}
|
||||
echo -n "Starting ${SERVICENAME}: "
|
||||
daemon $DAEMON_OPTS "${GITEA_PATH} web > ${LOGFILE} 2>&1 &"
|
||||
daemon $DAEMON_OPTS "${GITEA_PATH} web -c /etc/${NAME}/app.ini > ${LOGFILE} 2>&1 &"
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL = 0 ] && touch ${LOCKFILE}
|
||||
|
||||
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ stop() {
|
|||
killproc ${NAME}
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f ${LOCKFILE}
|
||||
[ $RETVAL = 0 ] && rm -f ${LOCKFILE}
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
|
|
|||
|
|
@ -14,17 +14,20 @@
|
|||
# Do NOT "set -e"
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC="Git with a cup of tea"
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
|
||||
DESC="Gitea - Git with a cup of tea"
|
||||
NAME=gitea
|
||||
SERVICEVERBOSE=yes
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
WORKINGDIR=/home/git/gitea
|
||||
DAEMON=$WORKINGDIR/$NAME
|
||||
DAEMON_ARGS="web"
|
||||
WORKINGDIR=/var/lib/$NAME
|
||||
DAEMON=/usr/local/bin/$NAME
|
||||
DAEMON_ARGS="web -c /etc/$NAME/app.ini"
|
||||
USER=git
|
||||
USERBIND="setcap cap_net_bind_service=+ep"
|
||||
USERBIND=""
|
||||
# If you want to bind Gitea to a port below 1024 uncomment
|
||||
# the line below
|
||||
#USERBIND="setcap cap_net_bind_service=+ep"
|
||||
STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}"
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
|
|
@ -36,7 +39,7 @@ STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}"
|
|||
do_start()
|
||||
{
|
||||
$USERBIND $DAEMON
|
||||
sh -c "USER=$USER start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
|
||||
sh -c "USER=$USER HOME=/home/$USER GITEA_WORK_DIR=$WORKINGDIR start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
|
||||
--background --chdir $WORKINGDIR --chuid $USER \\
|
||||
--exec $DAEMON -- $DAEMON_ARGS"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ load_rc_config $name
|
|||
|
||||
: ${gitea_user:="git"}
|
||||
: ${gitea_enable:="NO"}
|
||||
: ${gitea_directory:="/home/git"}
|
||||
: ${gitea_directory:="/var/lib/gitea"}
|
||||
|
||||
command="${gitea_directory}/gitea web"
|
||||
command="/usr/local/bin/gitea web -c /etc/gitea/app.ini"
|
||||
procname="$(echo $command |cut -d' ' -f1)"
|
||||
|
||||
pidfile="${gitea_directory}/${name}.pid"
|
||||
|
|
@ -33,6 +33,7 @@ gitea_start() {
|
|||
cd ${gitea_directory}
|
||||
export USER=${gitea_user}
|
||||
export HOME=/usr/home/${gitea_user}
|
||||
export GITEA_WORK_DIR=${gitea_directory}
|
||||
/usr/sbin/daemon -f -u ${gitea_user} -p ${pidfile} $command
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
DIR=/home/git/gitea
|
||||
DIR=/var/lib/gitea
|
||||
USER=git
|
||||
|
||||
start_stop_daemon_args="--user ${USER} --chdir ${DIR}"
|
||||
command="${DIR}/gitea"
|
||||
command_args="web"
|
||||
command="/usr/local/bin/gitea"
|
||||
command_args="web -c /etc/gitea/app.ini"
|
||||
command_background=yes
|
||||
pidfile=/var/run/gitea.pid
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
#
|
||||
# $OpenBSD$
|
||||
|
||||
daemon="/home/git/gitea/gitea"
|
||||
daemon="/usr/local/bin/gitea"
|
||||
daemon_user="git"
|
||||
daemon_flags="web"
|
||||
daemon_flags="web -c /etc/gitea/app.ini"
|
||||
|
||||
gitea_directory="/home/git/gitea"
|
||||
gitea_directory="/var/lib/gitea"
|
||||
|
||||
rc_bg=YES
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
# Default values
|
||||
|
||||
NAME=gitea
|
||||
GITEA_HOME=/home/git/gitea
|
||||
GITEA_PATH=${GITEA_HOME}/$NAME
|
||||
GITEA_HOME=/var/lib/$NAME
|
||||
GITEA_PATH=/usr/local/bin/$NAME
|
||||
GITEA_USER=git
|
||||
SERVICENAME="Git - with a cup of tea"
|
||||
SERVICENAME="Gitea - Git with a cup of tea"
|
||||
LOCKFILE=/var/lock/subsys/gitea
|
||||
LOGPATH=${GITEA_HOME}/log
|
||||
LOGFILE=${LOGPATH}/error.log
|
||||
|
|
@ -58,7 +58,7 @@ case "$1" in
|
|||
# return skipped as service is already running
|
||||
(exit 5)
|
||||
else
|
||||
su - ${GITEA_USER} -c "USER=${GITEA_USER} ${GITEA_PATH} web 2>&1 >>${LOGFILE} &"
|
||||
su - ${GITEA_USER} -c "USER=${GITEA_USER} GITEA_WORK_DIR=${GITEA_HOME} ${GITEA_PATH} web -c /etc/${NAME}/app.ini 2>&1 >>${LOGFILE} &"
|
||||
fi
|
||||
|
||||
# Remember status and be verbose
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ RestartSec=2s
|
|||
Type=simple
|
||||
User=git
|
||||
Group=git
|
||||
WorkingDirectory=/home/git/gitea
|
||||
ExecStart=/home/git/gitea/gitea web
|
||||
WorkingDirectory=/var/lib/gitea/
|
||||
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
|
||||
Restart=always
|
||||
Environment=USER=git HOME=/home/git
|
||||
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
|
||||
# If you want to bind Gitea to a port below 1024 uncomment
|
||||
# the two values below
|
||||
###
|
||||
|
|
|
|||
|
|
@ -189,6 +189,8 @@ LFS_START_SERVER = false
|
|||
LFS_CONTENT_PATH = data/lfs
|
||||
; LFS authentication secret, change this yourself
|
||||
LFS_JWT_SECRET =
|
||||
; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail.
|
||||
LFS_HTTP_AUTH_EXPIRY = 20m
|
||||
|
||||
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
|
||||
[ssh.minimum_key_sizes]
|
||||
|
|
@ -417,7 +419,7 @@ ENABLE_FEDERATED_AVATAR = false
|
|||
|
||||
[attachment]
|
||||
; Whether attachments are enabled. Defaults to `true`
|
||||
ENABLE = true
|
||||
ENABLED = true
|
||||
; Path for attachments. Defaults to `data/attachments`
|
||||
PATH = data/attachments
|
||||
; One or more allowed types, e.g. image/jpeg|image/png
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
|
||||
- `LFS_CONTENT_PATH`: **./data/lfs**: Where to store LFS files.
|
||||
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.
|
||||
- `LFS_HTTP_AUTH_EXPIRY`: **20m**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail.
|
||||
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, redirects http requests
|
||||
on another (https) port.
|
||||
- `PORT_TO_REDIRECT`: **80**: Port used when `REDIRECT_OTHER_PORT` is true.
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ _Symbols used in table:_
|
|||
<td>GitLab CE</td>
|
||||
<td>GitLab EE</td>
|
||||
<td>BitBucket</td>
|
||||
<td>RhodeCode CE</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -48,6 +49,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Issue tracker</td>
|
||||
|
|
@ -57,6 +59,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pull/Merge requests</td>
|
||||
|
|
@ -66,6 +69,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Squash merging</td>
|
||||
|
|
@ -75,6 +79,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rebase merging</td>
|
||||
|
|
@ -84,6 +89,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>⁄</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pull/Merge request inline comments</td>
|
||||
|
|
@ -93,6 +99,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Pull/Merge request approval</td>
|
||||
|
|
@ -102,6 +109,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Merge conflict resolution</td>
|
||||
|
|
@ -111,6 +119,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Restrict push and merge access to certain users</td>
|
||||
|
|
@ -120,6 +129,7 @@ _Symbols used in table:_
|
|||
<td>⁄</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Markdown support</td>
|
||||
|
|
@ -129,6 +139,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Issues and pull/merge requests templates</td>
|
||||
|
|
@ -138,6 +149,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Revert specific commits or a merge request</td>
|
||||
|
|
@ -147,6 +159,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Labels</td>
|
||||
|
|
@ -156,6 +169,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Time tracking</td>
|
||||
|
|
@ -165,6 +179,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple assignees for issues</td>
|
||||
|
|
@ -174,6 +189,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Related issues</td>
|
||||
|
|
@ -183,6 +199,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Confidential issues</td>
|
||||
|
|
@ -192,6 +209,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Comment reactions</td>
|
||||
|
|
@ -201,6 +219,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lock Discussion</td>
|
||||
|
|
@ -210,6 +229,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Batch issue handling</td>
|
||||
|
|
@ -219,6 +239,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Issue Boards</td>
|
||||
|
|
@ -228,6 +249,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create new branches from issues</td>
|
||||
|
|
@ -237,6 +259,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Commit graph</td>
|
||||
|
|
@ -246,6 +269,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Web code editor</td>
|
||||
|
|
@ -255,6 +279,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Branch manager</td>
|
||||
|
|
@ -264,6 +289,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Create new branches</td>
|
||||
|
|
@ -273,6 +299,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repository topics</td>
|
||||
|
|
@ -282,6 +309,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repository code search</td>
|
||||
|
|
@ -291,6 +319,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Global code search</td>
|
||||
|
|
@ -300,6 +329,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Issue search</td>
|
||||
|
|
@ -309,6 +339,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Global issue search</td>
|
||||
|
|
@ -318,6 +349,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Git LFS 2.0</td>
|
||||
|
|
@ -327,6 +359,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>⁄</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Integrated Git-powered wiki</td>
|
||||
|
|
@ -336,6 +369,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Static Git-powered pages</td>
|
||||
|
|
@ -345,6 +379,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Group Milestones</td>
|
||||
|
|
@ -354,6 +389,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Granular user roles (Code, Issues, Wiki etc)</td>
|
||||
|
|
@ -363,6 +399,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cherry-picking changes</td>
|
||||
|
|
@ -372,6 +409,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPG Signed Commits</td>
|
||||
|
|
@ -381,6 +419,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Reject unsigned commits</td>
|
||||
|
|
@ -390,6 +429,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Verified Committer</td>
|
||||
|
|
@ -399,6 +439,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subgroups: groups within groups</td>
|
||||
|
|
@ -408,6 +449,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Custom Git Hooks</td>
|
||||
|
|
@ -417,6 +459,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repository Activity page</td>
|
||||
|
|
@ -426,6 +469,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Deploy Tokens</td>
|
||||
|
|
@ -435,6 +479,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repository Tokens with write rights</td>
|
||||
|
|
@ -444,6 +489,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Easy upgrade process</td>
|
||||
|
|
@ -453,6 +499,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Built-in Container Registry</td>
|
||||
|
|
@ -462,6 +509,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>External git mirroring</td>
|
||||
|
|
@ -471,6 +519,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AD / LDAP integration</td>
|
||||
|
|
@ -480,6 +529,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple LDAP / AD server support</td>
|
||||
|
|
@ -489,6 +539,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LDAP user synchronization</td>
|
||||
|
|
@ -498,6 +549,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OpenId Connect support</td>
|
||||
|
|
@ -507,6 +559,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>?</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OAuth 2.0 integration (external authorization)</td>
|
||||
|
|
@ -516,6 +569,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>?</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Act as OAuth 2.0 provider</td>
|
||||
|
|
@ -525,6 +579,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Two factor authentication (2FA)</td>
|
||||
|
|
@ -534,6 +589,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>FIDO U2F (2FA)</td>
|
||||
|
|
@ -543,6 +599,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Webhook support</td>
|
||||
|
|
@ -552,6 +609,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mattermost/Slack integration</td>
|
||||
|
|
@ -561,6 +619,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>⁄</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Discord integration</td>
|
||||
|
|
@ -570,6 +629,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Built-in CI/CD</td>
|
||||
|
|
@ -579,6 +639,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>External CI/CD status display</td>
|
||||
|
|
@ -588,6 +649,7 @@ _Symbols used in table:_
|
|||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple database support</td>
|
||||
|
|
@ -597,6 +659,7 @@ _Symbols used in table:_
|
|||
<td>⁄</td>
|
||||
<td>⁄</td>
|
||||
<td>✓</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple OS support</td>
|
||||
|
|
@ -606,6 +669,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✓</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Low resource usage (RAM/CPU)</td>
|
||||
|
|
@ -615,6 +679,7 @@ _Symbols used in table:_
|
|||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
<td>✘</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ embedded assets. This can be different for older releases. Choose the file match
|
|||
the destination platform from the [downloads page](https://dl.gitea.io/gitea), copy
|
||||
the URL and replace the URL within the commands below:
|
||||
|
||||
```
|
||||
wget -O gitea https://dl.gitea.io/gitea/1.3.2/gitea-1.3.2-linux-amd64
|
||||
```sh
|
||||
wget -O gitea https://dl.gitea.io/gitea/1.4.2/gitea-1.4.2-linux-amd64
|
||||
chmod +x gitea
|
||||
```
|
||||
|
||||
|
|
@ -34,6 +34,54 @@ location. When launched manually, Gitea can be killed using `Ctrl+C`.
|
|||
./gitea web
|
||||
```
|
||||
|
||||
## Recommended server configuration
|
||||
|
||||
### Prepare environment
|
||||
|
||||
Check that git is installed on the server, if it is not install it first.
|
||||
```sh
|
||||
git --version
|
||||
```
|
||||
|
||||
Create user to run gitea (ex. `git`)
|
||||
```sh
|
||||
adduser \
|
||||
--system \
|
||||
--shell /bin/bash \
|
||||
--gecos 'Git Version Control' \
|
||||
--group \
|
||||
--disabled-password \
|
||||
--home /home/git \
|
||||
git
|
||||
```
|
||||
|
||||
### Create required directory structure
|
||||
|
||||
```sh
|
||||
mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
|
||||
chown git:git /var/lib/gitea/{data,indexers,log}
|
||||
chmod 750 /var/lib/gitea/{data,indexers,log}
|
||||
mkdir /etc/gitea
|
||||
chown root:git /etc/gitea
|
||||
chmod 770 /etc/gitea
|
||||
```
|
||||
|
||||
**NOTE:** `/etc/gitea` is temporary set with write rights for user `git` so that Web installer could write configuration file. After installation is done it is recommended to set rights to read-only using:
|
||||
```
|
||||
chmod 750 /etc/gitea
|
||||
chmod 644 /etc/gitea/app.ini
|
||||
```
|
||||
|
||||
### Copy gitea binary to global location
|
||||
|
||||
```
|
||||
cp gitea /usr/local/bin/gitea
|
||||
```
|
||||
|
||||
### Create service file to start gitea automatically
|
||||
|
||||
See how to create [Linux service]({{< relref "run-as-service-in-ubuntu.en-us.md" >}})
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Old glibc versions
|
||||
|
|
|
|||
|
|
@ -17,16 +17,13 @@ menu:
|
|||
|
||||
## Debian
|
||||
|
||||
The only distribution that has any "official" package of Gitea is Debian. This is currently
|
||||
in Debian's [contrib](https://wiki.debian.org/SourcesList). This is (currently) only available
|
||||
in Debian testing and unstable (but should be installable/functional on stable).
|
||||
Although there is a package of Gitea in Debian's [contrib](https://wiki.debian.org/SourcesList),
|
||||
it is not supported directly by us.
|
||||
|
||||
- Edit /etc/apt/sourced.list
|
||||
- Add "contrib" to "deb http://deb.debian.org/debian unstable main contrib"
|
||||
- apt-get update
|
||||
- apt-get install gitea
|
||||
Unfortunately the package is not maintained anymore and broken because of missing sources.
|
||||
Please follow the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide instead.
|
||||
|
||||
For other distributions, see the [deployment from binary]({{< relref "from-binary.en-us.md" >}}) guide.
|
||||
Should the packages get updated and fixed, we will provide up-to-date installation instructions here.
|
||||
|
||||
## Windows
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ You can configure some of Gitea's settings via environment variables:
|
|||
|
||||
* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title.
|
||||
* `RUN_MODE`: **dev**: For performance and other purposes, change this to `prod` when deployed to a production environment.
|
||||
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for displayed clone UR in Gitea's UI.
|
||||
* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI.
|
||||
* `SSH_PORT`: **22**: SSH port displayed in clone URL.
|
||||
* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available.
|
||||
* `HTTP_PORT`: **3000**: HTTP listen port.
|
||||
|
|
|
|||
46
docs/content/doc/usage/https-support.md
Normal file
46
docs/content/doc/usage/https-support.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
date: "2018-06-02T11:00:00+02:00"
|
||||
title: "Usage: HTTPS setup"
|
||||
slug: "https-setup"
|
||||
weight: 12
|
||||
toc: true
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "HTTPS setup"
|
||||
weight: 12
|
||||
identifier: "https-setup"
|
||||
---
|
||||
|
||||
# HTTPS setup to encrypt connections to Gitea
|
||||
|
||||
## Using built-in server
|
||||
|
||||
Before you enable HTTPS make sure that you have valid SSL/TLS certificates.
|
||||
You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate.
|
||||
|
||||
To use Gitea's built-in HTTPS support you must change your `app.ini` file:
|
||||
|
||||
```ini
|
||||
[server]
|
||||
PROTOCOL=https
|
||||
ROOT_URL = `https://git.example.com:3000/`
|
||||
HTTP_PORT = 3000
|
||||
CERT_FILE = cert.pem
|
||||
KEY_FILE = key.pem
|
||||
```
|
||||
To learn more about the config values, please checkout the [Config Cheat Sheet](../config-cheat-sheet#server).
|
||||
|
||||
## Using reverse proxy
|
||||
|
||||
Setup up your reverse proxy like shown in the [reverse proxy guide](../reverse-proxies).
|
||||
|
||||
After that, enable HTTPS by following one of these guides:
|
||||
|
||||
* [nginx](https://nginx.org/en/docs/http/configuring_https_servers.html)
|
||||
* [apache2/httpd](https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html)
|
||||
* [caddy](https://caddyserver.com/docs/tls)
|
||||
|
||||
Note: You connection between your reverse proxy and gitea might be unencrypted. To encrypt it too follow the [built-in server guide](#using-built-in-server) and change
|
||||
the proxy url to `https://[URL]`.
|
||||
|
|
@ -371,7 +371,7 @@ func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Error
|
|||
|
||||
// NewReleaseForm form for creating release
|
||||
type NewReleaseForm struct {
|
||||
TagName string `binding:"Required"`
|
||||
TagName string `binding:"Required;GitRefName"`
|
||||
Target string `form:"tag_target" binding:"Required"`
|
||||
Title string `binding:"Required"`
|
||||
Content string
|
||||
|
|
|
|||
|
|
@ -136,10 +136,11 @@ var (
|
|||
}
|
||||
|
||||
LFS struct {
|
||||
StartServer bool `ini:"LFS_START_SERVER"`
|
||||
ContentPath string `ini:"LFS_CONTENT_PATH"`
|
||||
JWTSecretBase64 string `ini:"LFS_JWT_SECRET"`
|
||||
JWTSecretBytes []byte `ini:"-"`
|
||||
StartServer bool `ini:"LFS_START_SERVER"`
|
||||
ContentPath string `ini:"LFS_CONTENT_PATH"`
|
||||
JWTSecretBase64 string `ini:"LFS_JWT_SECRET"`
|
||||
JWTSecretBytes []byte `ini:"-"`
|
||||
HTTPAuthExpiry time.Duration `ini:"LFS_HTTP_AUTH_EXPIRY"`
|
||||
}
|
||||
|
||||
// Security settings
|
||||
|
|
@ -828,6 +829,8 @@ func NewContext() {
|
|||
LFS.ContentPath = filepath.Join(AppWorkPath, LFS.ContentPath)
|
||||
}
|
||||
|
||||
LFS.HTTPAuthExpiry = sec.Key("LFS_HTTP_AUTH_EXPIRY").MustDuration(20 * time.Minute)
|
||||
|
||||
if LFS.StartServer {
|
||||
|
||||
if err := os.MkdirAll(LFS.ContentPath, 0700); err != nil {
|
||||
|
|
@ -947,7 +950,7 @@ func NewContext() {
|
|||
AttachmentAllowedTypes = strings.Replace(sec.Key("ALLOWED_TYPES").MustString("image/jpeg,image/png,application/zip,application/gzip"), "|", ",", -1)
|
||||
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(4)
|
||||
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(5)
|
||||
AttachmentEnabled = sec.Key("ENABLE").MustBool(true)
|
||||
AttachmentEnabled = sec.Key("ENABLED").MustBool(true)
|
||||
|
||||
TimeFormatKey := Cfg.Section("time").Key("FORMAT").MustString("RFC1123")
|
||||
TimeFormat = map[string]string{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package util
|
|||
import (
|
||||
"net/url"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
|
@ -56,16 +57,25 @@ func Max(a, b int) int {
|
|||
|
||||
// URLJoin joins url components, like path.Join, but preserving contents
|
||||
func URLJoin(base string, elems ...string) string {
|
||||
u, err := url.Parse(base)
|
||||
if !strings.HasSuffix(base, "/") {
|
||||
base += "/"
|
||||
}
|
||||
baseURL, err := url.Parse(base)
|
||||
if err != nil {
|
||||
log.Error(4, "URLJoin: Invalid base URL %s", base)
|
||||
return ""
|
||||
}
|
||||
joinArgs := make([]string, 0, len(elems)+1)
|
||||
joinArgs = append(joinArgs, u.Path)
|
||||
joinArgs = append(joinArgs, elems...)
|
||||
u.Path = path.Join(joinArgs...)
|
||||
return u.String()
|
||||
joinedPath := path.Join(elems...)
|
||||
argURL, err := url.Parse(joinedPath)
|
||||
if err != nil {
|
||||
log.Error(4, "URLJoin: Invalid arg %s", joinedPath)
|
||||
return ""
|
||||
}
|
||||
joinedURL := baseURL.ResolveReference(argURL).String()
|
||||
if !baseURL.IsAbs() && !strings.HasPrefix(base, "/") {
|
||||
return joinedURL[1:] // Removing leading '/' if needed
|
||||
}
|
||||
return joinedURL
|
||||
}
|
||||
|
||||
// Min min of two ints
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@ func TestURLJoin(t *testing.T) {
|
|||
"a", "b/c/"),
|
||||
newTest("a/b/d",
|
||||
"a/", "b/c/", "/../d/"),
|
||||
newTest("https://try.gitea.io/a/b/c#d",
|
||||
"https://try.gitea.io", "a/b", "c#d"),
|
||||
newTest("/a/b/d",
|
||||
"/a/", "b/c/", "/../d/"),
|
||||
newTest("/a/b/c",
|
||||
"/a", "b/c/"),
|
||||
newTest("/a/b/c#hash",
|
||||
"/a", "b/c#hash"),
|
||||
} {
|
||||
assert.Equal(t, test.Expected, URLJoin(test.Base, test.Elements...))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
// GitRefNamePattern is regular expression wirh unallowed characters in git reference name
|
||||
// GitRefNamePattern is regular expression with unallowed characters in git reference name
|
||||
GitRefNamePattern = regexp.MustCompile("[^\\d\\w-_\\./]")
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ no_reply_address_helper=Domain-Namen für Benutzer mit einer versteckten Emailad
|
|||
uname_holder=E-Mail-Adresse oder Benutzername
|
||||
password_holder=Passwort
|
||||
switch_dashboard_context=Kontext der Übersichtsseite wechseln
|
||||
my_repos=Repositories
|
||||
show_more_repos=Zeige mehr Repositories…
|
||||
collaborative_repos=Gemeinschaftliche Repositories
|
||||
my_orgs=Meine Organisationen
|
||||
|
|
@ -462,6 +463,7 @@ then_enter_passcode=Und gebe dann die angezeigte PIN der Anwendung ein:
|
|||
passcode_invalid=Die PIN ist falsch. Probiere es erneut.
|
||||
twofa_enrolled=Die Zwei-Faktor-Authentifizierung wurde für dein Konto aktiviert. Bewahre dein Einmalpasswort (%s) an einem sicheren Ort auf, da es nicht wieder angezeigt werden wird.
|
||||
|
||||
u2f_desc=Hardware-Sicherheitsschlüssel sind Geräte, die kryptografische Schlüssel beinhalten. Diese können für die Zwei-Faktor-Authentifizierung verwendet werden. Der Sicherheitsschlüssel muss den <a href="https://fidoalliance.org/">FIDO U2F</a>-Standard unterstützen.
|
||||
u2f_require_twofa=Du musst die Zwei-Faktor-Authentifizierung aktivieren, um Hardware-Sicherheitsschlüssel nutzen zu können.
|
||||
u2f_register_key=Sicherheitsschlüssel hinzufügen
|
||||
u2f_nickname=Nickname
|
||||
|
|
@ -691,6 +693,8 @@ issues.filter_sort.recentupdate=Kürzlich aktualisiert
|
|||
issues.filter_sort.leastupdate=Am Längsten nicht aktualisiert
|
||||
issues.filter_sort.mostcomment=Am meisten kommentiert
|
||||
issues.filter_sort.leastcomment=Am wenigsten kommentiert
|
||||
issues.filter_sort.mostforks=Meiste Forks
|
||||
issues.filter_sort.fewestforks=Wenigste Forks
|
||||
issues.action_open=Öffnen
|
||||
issues.action_close=Schließen
|
||||
issues.action_label=Label
|
||||
|
|
@ -1357,6 +1361,7 @@ repos.name=Name
|
|||
repos.private=Privat
|
||||
repos.watches=Beobachtungen
|
||||
repos.stars=Favoriten
|
||||
repos.forks=Forks
|
||||
repos.issues=Issues
|
||||
repos.size=Größe
|
||||
|
||||
|
|
|
|||
|
|
@ -1475,9 +1475,7 @@ config.db_host = Host
|
|||
config.db_name = Name
|
||||
config.db_user = Username
|
||||
config.db_ssl_mode = SSL
|
||||
config.db_ssl_mode_helper = (for "postgres" only)
|
||||
config.db_path = Path
|
||||
config.db_path_helper = (for "sqlite3" and "tidb")
|
||||
|
||||
config.service_config = Service Configuration
|
||||
config.register_email_confirm = Require Email Confirmation to Register
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -31,6 +31,7 @@ twofa=Двофакторна авторизація
|
|||
twofa_scratch=Двофакторний одноразовий пароль
|
||||
passcode=Код доступу
|
||||
|
||||
u2f_insert_key=Вставте ключ безпеки
|
||||
u2f_reload=Оновити
|
||||
|
||||
repository=Репозиторій
|
||||
|
|
@ -146,7 +147,7 @@ no_reply_address=Прихований поштовий домен
|
|||
[home]
|
||||
uname_holder=Ім'я користувача або Ел. пошта
|
||||
password_holder=Пароль
|
||||
switch_dashboard_context=Змінити дошку
|
||||
switch_dashboard_context=Переключити контекст панелі управління
|
||||
my_repos=Репозиторії
|
||||
show_more_repos=Показати більше репозиторіїв…
|
||||
collaborative_repos=Спільні репозиторії
|
||||
|
|
@ -292,6 +293,7 @@ twofa=Двофакторна авторизація
|
|||
account_link=Прив'язані облікові записи
|
||||
organization=Організації
|
||||
uid=Ідентифікатор Uid
|
||||
u2f=Ключі безпеки
|
||||
|
||||
public_profile=Загальнодоступний профіль
|
||||
profile_desc=Ваша адреса електронної пошти використовуватиметься для сповіщення та інших операцій.
|
||||
|
|
@ -305,6 +307,7 @@ continue=Продовжити
|
|||
cancel=Відміна
|
||||
language=Мова
|
||||
|
||||
lookup_avatar_by_mail=Знайти Аватар за адресою електронної пошти
|
||||
federated_avatar_lookup=Знайти зовнішній аватар
|
||||
enable_custom_avatar=Увімкнути користувацькі аватари
|
||||
choose_new_avatar=Оберіть новий аватар
|
||||
|
|
@ -345,6 +348,7 @@ subkeys=Підключі
|
|||
key_id=ID ключа
|
||||
key_name=Ім'я ключа
|
||||
key_content=Зміст
|
||||
add_key_success=SSH ключ '%s' додано.
|
||||
delete_key=Видалити
|
||||
ssh_key_deletion=Видалити SSH ключ
|
||||
gpg_key_deletion=Видалити GPG ключ
|
||||
|
|
@ -423,7 +427,7 @@ form.reach_limit_of_creation=Ви досягли максимальної кіл
|
|||
need_auth=Клонувати з авторизацією
|
||||
migrate_type=Тип міграції
|
||||
migrate_type_helper=Даний репозиторій буде <span class="text blue">дзеркалом</span>
|
||||
migrate_repo=Перенесення репозиторія
|
||||
migrate_repo=Перенести репозиторій
|
||||
migrate.clone_address=Міграція / клонувати з URL-адреси
|
||||
migrate.clone_address_desc=URL-адреса HTTP(S) або Git "clone" існуючого репозиторія
|
||||
migrate.clone_local_path=або шлях до локального серверу
|
||||
|
|
@ -462,7 +466,7 @@ pulls=Запити на злиття
|
|||
labels=Мітки
|
||||
milestones=Етап
|
||||
commits=Коміти
|
||||
commit=Змина
|
||||
commit=Коміт
|
||||
releases=Релізи
|
||||
file_raw=Неформатований
|
||||
file_history=Історія
|
||||
|
|
@ -480,6 +484,7 @@ editor.must_be_on_a_branch=Ви повинні бути у гілці щоб з
|
|||
editor.fork_before_edit=Необхідно зробити форк цього репозиторій, щоб внести або запропонувати зміни в цей файл.
|
||||
editor.delete_this_file=Видалити файл
|
||||
editor.must_have_write_access=Ви повинні мати доступ на запис щоб запропонувати зміни до цього файлу.
|
||||
editor.file_delete_success=Файл '%s' видалено.
|
||||
editor.name_your_file=Дайте назву файлу…
|
||||
editor.or=або
|
||||
editor.cancel_lower=Скасувати
|
||||
|
|
@ -559,6 +564,7 @@ issues.filter_sort.recentupdate=Нещодавно оновлено
|
|||
issues.filter_sort.leastupdate=Найдавніше оновлені
|
||||
issues.filter_sort.mostcomment=Найбільш коментовані
|
||||
issues.filter_sort.leastcomment=Найменш коментовані
|
||||
issues.filter_sort.mostforks=Найбільше форків
|
||||
issues.action_open=Відкрити
|
||||
issues.action_close=Закрити
|
||||
issues.action_label=Мітка
|
||||
|
|
@ -652,7 +658,9 @@ pulls.merged=Злито
|
|||
pulls.has_merged=Запит на злиття було об'єднано.
|
||||
pulls.can_auto_merge_desc=Цей запит можна об'єднати автоматично.
|
||||
pulls.cannot_auto_merge_desc=Цей запит на злиття не може бути злитий автоматично через конфлікти.
|
||||
pulls.cannot_auto_merge_helper=Злити вручну для вирішення конфліктів.
|
||||
pulls.cannot_auto_merge_helper=Злийте вручну для вирішення конфліктів.
|
||||
pulls.no_merge_desc=Цей запити на злиття неможливо злити, оскільки всі параметри об'єднання репозиторія вимкнено.
|
||||
pulls.no_merge_helper=Увімкніть параметри злиття в налаштуваннях репозиторія або злийте запити на злиття вручну.
|
||||
pulls.merge_pull_request=Об'єднати запит на злиття
|
||||
pulls.rebase_merge_pull_request=Зробити Rebase і злити
|
||||
pulls.squash_merge_pull_request=Об'єднати (Squash) і злити
|
||||
|
|
@ -755,6 +763,7 @@ settings.use_internal_wiki=Використовувати вбудовані В
|
|||
settings.use_external_wiki=Використовувати зовнішні Вікі
|
||||
settings.external_wiki_url=URL зовнішньої вікі
|
||||
settings.issues_desc=Увімкнути відстеження проблем в репозиторію
|
||||
settings.use_internal_issue_tracker=Використовувати вбудовану систему відстеження проблем
|
||||
settings.external_tracker_url=URL зовнішньої системи відстеження проблем
|
||||
settings.tracker_url_format=Формат URL зовнішнього трекера задач
|
||||
settings.tracker_issue_style.numeric=Цифровий
|
||||
|
|
@ -783,6 +792,7 @@ settings.transfer_owner=Новий власник
|
|||
settings.make_transfer=Здіснити перенесення
|
||||
settings.confirm_delete=Видалити репозиторій
|
||||
settings.add_collaborator=Додати співавтора
|
||||
settings.add_collaborator_success=Додано співавтора.
|
||||
settings.delete_collaborator=Видалити
|
||||
settings.collaborator_deletion=Видалити співавтора
|
||||
settings.search_user_placeholder=Пошук користувача…
|
||||
|
|
@ -985,12 +995,14 @@ last_page=Остання
|
|||
total=Разом: %d
|
||||
|
||||
dashboard.statistic=Підсумок
|
||||
dashboard.operations=Технічне обслуговування
|
||||
dashboard.system_status=Статус системи
|
||||
dashboard.operation_name=Назва операції
|
||||
dashboard.operation_switch=Перемкнути
|
||||
dashboard.operation_run=Запустити
|
||||
dashboard.delete_inactivate_accounts=Видалити всі неактивні облікові записи
|
||||
dashboard.delete_inactivate_accounts_success=Усі неактивні облікові записи успішно видалено.
|
||||
dashboard.delete_repo_archives=Видалити всі архіви репозиторіїв
|
||||
dashboard.git_gc_repos_success=Всі репозиторії завершили збирання сміття.
|
||||
dashboard.server_uptime=Uptime серверу
|
||||
dashboard.current_memory_usage=Поточне використання пам'яті
|
||||
|
|
@ -1047,7 +1059,7 @@ orgs.teams=Команди
|
|||
orgs.members=Учасники
|
||||
orgs.new_orga=Нова організація
|
||||
|
||||
repos.repo_manage_panel=Керування організаціями
|
||||
repos.repo_manage_panel=Керування репозиторіями
|
||||
repos.owner=Власник
|
||||
repos.name=Назва
|
||||
repos.private=Приватний
|
||||
|
|
@ -1108,6 +1120,7 @@ config.app_ver=Версія Gitea
|
|||
config.app_url=Базова URL-адреса Gitea
|
||||
config.custom_conf=Шлях до файлу конфігурації
|
||||
config.domain=Домен SSH сервера
|
||||
config.offline_mode=Локальний режим
|
||||
config.disable_router_log=Вимкнути логування роутеру
|
||||
config.run_user=Запуск від імені Користувача
|
||||
config.run_mode=Режим виконання
|
||||
|
|
@ -1228,6 +1241,7 @@ notices.type=Тип
|
|||
notices.type_1=Репозиторій
|
||||
notices.desc=Опис
|
||||
notices.op=Оп.
|
||||
notices.delete_success=Сповіщення системи були видалені.
|
||||
|
||||
[action]
|
||||
create_repo=створив(ла) репозиторій <a href="%s">%s</a>
|
||||
|
|
|
|||
59
public/swagger.v1.json
vendored
59
public/swagger.v1.json
vendored
|
|
@ -1028,7 +1028,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1338,7 +1340,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -3261,7 +3265,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -4999,7 +5005,8 @@
|
|||
"type": "string",
|
||||
"description": "username of user",
|
||||
"name": "username",
|
||||
"in": "path"
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -5273,7 +5280,8 @@
|
|||
"type": "string",
|
||||
"description": "username of the user",
|
||||
"name": "username",
|
||||
"in": "path"
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -7376,11 +7384,13 @@
|
|||
"description": "AccessTokenList represents a list of API access token."
|
||||
},
|
||||
"Attachment": {
|
||||
"description": "Attachment",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Attachment"
|
||||
}
|
||||
},
|
||||
"AttachmentList": {
|
||||
"description": "AttachmentList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7389,11 +7399,13 @@
|
|||
}
|
||||
},
|
||||
"Branch": {
|
||||
"description": "Branch",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Branch"
|
||||
}
|
||||
},
|
||||
"BranchList": {
|
||||
"description": "BranchList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7402,11 +7414,13 @@
|
|||
}
|
||||
},
|
||||
"Comment": {
|
||||
"description": "Comment",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Comment"
|
||||
}
|
||||
},
|
||||
"CommentList": {
|
||||
"description": "CommentList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7415,11 +7429,13 @@
|
|||
}
|
||||
},
|
||||
"DeployKey": {
|
||||
"description": "DeployKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DeployKey"
|
||||
}
|
||||
},
|
||||
"DeployKeyList": {
|
||||
"description": "DeployKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7428,6 +7444,7 @@
|
|||
}
|
||||
},
|
||||
"EmailList": {
|
||||
"description": "EmailList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7436,11 +7453,13 @@
|
|||
}
|
||||
},
|
||||
"GPGKey": {
|
||||
"description": "GPGKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GPGKey"
|
||||
}
|
||||
},
|
||||
"GPGKeyList": {
|
||||
"description": "GPGKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7449,6 +7468,7 @@
|
|||
}
|
||||
},
|
||||
"Hook": {
|
||||
"description": "Hook",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7457,6 +7477,7 @@
|
|||
}
|
||||
},
|
||||
"HookList": {
|
||||
"description": "HookList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7465,11 +7486,13 @@
|
|||
}
|
||||
},
|
||||
"Issue": {
|
||||
"description": "Issue",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Issue"
|
||||
}
|
||||
},
|
||||
"IssueList": {
|
||||
"description": "IssueList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7478,11 +7501,13 @@
|
|||
}
|
||||
},
|
||||
"Label": {
|
||||
"description": "Label",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Label"
|
||||
}
|
||||
},
|
||||
"LabelList": {
|
||||
"description": "LabelList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7494,11 +7519,13 @@
|
|||
"description": "MarkdownRender is a rendered markdown document"
|
||||
},
|
||||
"Milestone": {
|
||||
"description": "Milestone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Milestone"
|
||||
}
|
||||
},
|
||||
"MilestoneList": {
|
||||
"description": "MilestoneList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7507,11 +7534,13 @@
|
|||
}
|
||||
},
|
||||
"Organization": {
|
||||
"description": "Organization",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Organization"
|
||||
}
|
||||
},
|
||||
"OrganizationList": {
|
||||
"description": "OrganizationList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7520,11 +7549,13 @@
|
|||
}
|
||||
},
|
||||
"PublicKey": {
|
||||
"description": "PublicKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PublicKey"
|
||||
}
|
||||
},
|
||||
"PublicKeyList": {
|
||||
"description": "PublicKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7533,11 +7564,13 @@
|
|||
}
|
||||
},
|
||||
"PullRequest": {
|
||||
"description": "PullRequest",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PullRequest"
|
||||
}
|
||||
},
|
||||
"PullRequestList": {
|
||||
"description": "PullRequestList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7546,11 +7579,13 @@
|
|||
}
|
||||
},
|
||||
"Release": {
|
||||
"description": "Release",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Release"
|
||||
}
|
||||
},
|
||||
"ReleaseList": {
|
||||
"description": "ReleaseList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7559,11 +7594,13 @@
|
|||
}
|
||||
},
|
||||
"Repository": {
|
||||
"description": "Repository",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Repository"
|
||||
}
|
||||
},
|
||||
"RepositoryList": {
|
||||
"description": "RepositoryList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7572,6 +7609,7 @@
|
|||
}
|
||||
},
|
||||
"SearchResults": {
|
||||
"description": "SearchResults",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchResults"
|
||||
},
|
||||
|
|
@ -7580,16 +7618,19 @@
|
|||
}
|
||||
},
|
||||
"ServerVersion": {
|
||||
"description": "ServerVersion",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ServerVersion"
|
||||
}
|
||||
},
|
||||
"Status": {
|
||||
"description": "Status",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Status"
|
||||
}
|
||||
},
|
||||
"StatusList": {
|
||||
"description": "StatusList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7598,11 +7639,13 @@
|
|||
}
|
||||
},
|
||||
"Team": {
|
||||
"description": "Team",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Team"
|
||||
}
|
||||
},
|
||||
"TeamList": {
|
||||
"description": "TeamList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7611,11 +7654,13 @@
|
|||
}
|
||||
},
|
||||
"TrackedTime": {
|
||||
"description": "TrackedTime",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TrackedTime"
|
||||
}
|
||||
},
|
||||
"TrackedTimeList": {
|
||||
"description": "TrackedTimeList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7624,11 +7669,13 @@
|
|||
}
|
||||
},
|
||||
"User": {
|
||||
"description": "User",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/User"
|
||||
}
|
||||
},
|
||||
"UserList": {
|
||||
"description": "UserList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7637,6 +7684,7 @@
|
|||
}
|
||||
},
|
||||
"WatchInfo": {
|
||||
"description": "WatchInfo",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/WatchInfo"
|
||||
}
|
||||
|
|
@ -7670,6 +7718,7 @@
|
|||
"description": "APINotFound is a not found empty response"
|
||||
},
|
||||
"parameterBodies": {
|
||||
"description": "parameterBodies",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EditAttachmentOptions"
|
||||
},
|
||||
|
|
|
|||
8
public/vendor/VERSIONS
vendored
8
public/vendor/VERSIONS
vendored
|
|
@ -15,10 +15,7 @@ File(s): /vendor/plugins/clipboard/clipboard.min.js
|
|||
Version: 1.5.9
|
||||
|
||||
File(s): /vendor/plugins/gitgraph/gitgraph.js
|
||||
Version: 9b492e8bf1ddf7908a4997b8f83fa38a809a9da3
|
||||
|
||||
File(s): /vendor/plugins/autolink/autolink.js
|
||||
Version: 741f66f
|
||||
Version: 745f604212e2abfe2f0a59169ea530857b46625c
|
||||
|
||||
File(s): /vendor/plugins/vue/vue.min.js
|
||||
Version: 2.1.10
|
||||
|
|
@ -50,6 +47,9 @@ Version: 1.10.1
|
|||
File(s): /vendor/plugins/pdfjs/
|
||||
Version: 1.4.20
|
||||
|
||||
File(s): /vendor/plugins/u2f/
|
||||
Version: 1.0.8
|
||||
|
||||
File(s): /vendor/assets/font-awesome/fonts/
|
||||
Version: 4.6.0
|
||||
|
||||
|
|
|
|||
5
public/vendor/librejs.html
vendored
5
public/vendor/librejs.html
vendored
|
|
@ -45,11 +45,6 @@
|
|||
<td><a href="https://github.com/bluef/gitgraph.js/blob/master/LICENSE">BSD 3-Clause</a></td>
|
||||
<td><a href="https://github.com/bluef/gitgraph.js">gitgraph.js-latest</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/vendor/plugins/autolink/autolink.js">autolink.min.js</a></td>
|
||||
<td><a href="https://github.com/egoist/autolink.js/blob/master/LICENSE">Expat</a></td>
|
||||
<td><a href="https://github.com/egoist/autolink.js">autolink.js-latest</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/vendor/plugins/vue/vue.min.js">vue.min.js</a></td>
|
||||
<td><a href="https://github.com/vuejs/vue/blob/dev/LICENSE">Expat</a></td>
|
||||
|
|
|
|||
71
public/vendor/plugins/gitgraph/gitgraph.js
vendored
71
public/vendor/plugins/gitgraph/gitgraph.js
vendored
|
|
@ -126,7 +126,20 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
!(row[i - 2] && row[i] === "_" && row[i - 2] === "|")) {}
|
||||
|
||||
return i;
|
||||
}
|
||||
};
|
||||
|
||||
var findLineBreak = function (row) {
|
||||
if (!row) {
|
||||
return -1
|
||||
}
|
||||
|
||||
var i = row.length;
|
||||
|
||||
while (i-- &&
|
||||
!(row[i - 1] && row[i - 2] && row[i] === " " && row[i - 1] === "|" && row[i - 2] === "_")) {}
|
||||
|
||||
return i;
|
||||
};
|
||||
|
||||
var genNewFlow = function () {
|
||||
var newId;
|
||||
|
|
@ -138,21 +151,21 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
return {id:newId, color:"#" + newId};
|
||||
};
|
||||
|
||||
//draw method
|
||||
var drawLineRight = function (x, y, color) {
|
||||
//Draw methods
|
||||
var drawLine = function (moveX, moveY, lineX, lineY, color) {
|
||||
ctx.strokeStyle = color;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x, y + config.unitSize / 2);
|
||||
ctx.lineTo(x + config.unitSize, y + config.unitSize / 2);
|
||||
ctx.moveTo(moveX, moveY);
|
||||
ctx.lineTo(lineX, lineY);
|
||||
ctx.stroke();
|
||||
};
|
||||
|
||||
var drawLineRight = function (x, y, color) {
|
||||
drawLine(x, y + config.unitSize / 2, x + config.unitSize, y + config.unitSize / 2, color);
|
||||
};
|
||||
|
||||
var drawLineUp = function (x, y, color) {
|
||||
ctx.strokeStyle = color;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x, y + config.unitSize / 2);
|
||||
ctx.lineTo(x, y - config.unitSize / 2);
|
||||
ctx.stroke();
|
||||
drawLine(x, y + config.unitSize / 2, x, y - config.unitSize / 2, color);
|
||||
};
|
||||
|
||||
var drawNode = function (x, y, color) {
|
||||
|
|
@ -166,37 +179,28 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
};
|
||||
|
||||
var drawLineIn = function (x, y, color) {
|
||||
ctx.strokeStyle = color;
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + config.unitSize, y + config.unitSize / 2);
|
||||
ctx.lineTo(x, y - config.unitSize / 2);
|
||||
ctx.stroke();
|
||||
drawLine(x + config.unitSize, y + config.unitSize / 2, x, y - config.unitSize / 2, color);
|
||||
};
|
||||
|
||||
var drawLineOut = function (x, y, color) {
|
||||
ctx.strokeStyle = color;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x, y + config.unitSize / 2);
|
||||
ctx.lineTo(x + config.unitSize, y - config.unitSize / 2);
|
||||
ctx.stroke();
|
||||
drawLine(x, y + config.unitSize / 2, x + config.unitSize, y - config.unitSize / 2, color);
|
||||
};
|
||||
|
||||
var draw = function (graphList) {
|
||||
var colomn, colomnIndex, prevColomn, condenseIndex;
|
||||
var colomn, colomnIndex, prevColomn, condenseIndex, breakIndex = -1;
|
||||
var x, y;
|
||||
var color;
|
||||
var nodePos, outPos;
|
||||
var nodePos;
|
||||
var tempFlow;
|
||||
var prevRowLength = 0;
|
||||
var flowSwapPos = -1;
|
||||
var lastLinePos;
|
||||
var i, k, l;
|
||||
var i, l;
|
||||
var condenseCurrentLength, condensePrevLength = 0, condenseNextLength = 0;
|
||||
|
||||
var inlineIntersect = false;
|
||||
|
||||
//initiate for first row
|
||||
//initiate color array for first row
|
||||
for (i = 0, l = graphList[0].length; i < l; i++) {
|
||||
if (graphList[0][i] !== "_" && graphList[0][i] !== " ") {
|
||||
flows.push(genNewFlow());
|
||||
|
|
@ -275,6 +279,7 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
colomnIndex = 0; //reset index
|
||||
condenseIndex = 0;
|
||||
condensePrevLength = 0;
|
||||
breakIndex = -1; //reset break index
|
||||
while (colomnIndex < currentRow.length) {
|
||||
colomn = currentRow[colomnIndex];
|
||||
|
||||
|
|
@ -282,6 +287,18 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
++condensePrevLength;
|
||||
}
|
||||
|
||||
//check and fix line break in next row
|
||||
if (colomn === "/" && currentRow[colomnIndex - 1] && currentRow[colomnIndex - 1] === "|") {
|
||||
if ((breakIndex = findLineBreak(nextRow)) !== -1) {
|
||||
nextRow.splice(breakIndex, 1);
|
||||
}
|
||||
}
|
||||
//if line break found replace all '/' with '|' after breakIndex in previous row
|
||||
if (breakIndex !== - 1 && colomn === "/" && colomnIndex > breakIndex) {
|
||||
currentRow[colomnIndex] = "|";
|
||||
colomn = "|";
|
||||
}
|
||||
|
||||
if (colomn === " " &&
|
||||
currentRow[colomnIndex + 1] &&
|
||||
currentRow[colomnIndex + 1] === "_" &&
|
||||
|
|
@ -294,7 +311,7 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
colomn = "/";
|
||||
}
|
||||
|
||||
//create new flow only when no intersetc happened
|
||||
//create new flow only when no intersect happened
|
||||
if (flowSwapPos === -1 &&
|
||||
colomn === "/" &&
|
||||
currentRow[colomnIndex - 1] &&
|
||||
|
|
@ -415,4 +432,4 @@ var gitGraph = function (canvas, rawGraphList, config) {
|
|||
init();
|
||||
draw(graphList);
|
||||
};
|
||||
// @end-license
|
||||
// @end-license
|
||||
|
|
@ -51,6 +51,7 @@ func ListUserOrgs(ctx *context.APIContext) {
|
|||
// in: path
|
||||
// description: username of user
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/OrganizationList"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ func GetRawFile(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
if !ctx.Repo.HasAccess() {
|
||||
ctx.Status(404)
|
||||
return
|
||||
|
|
@ -85,7 +86,8 @@ func GetArchive(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
repoPath := models.RepoPath(ctx.Params(":username"), ctx.Params(":reponame"))
|
||||
gitRepo, err := git.OpenRepository(repoPath)
|
||||
if err != nil {
|
||||
|
|
@ -121,7 +123,8 @@ func GetEditorconfig(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// 200:
|
||||
// 200:
|
||||
// description: success
|
||||
ec, err := ctx.Repo.GetEditorconfig()
|
||||
if err != nil {
|
||||
if git.IsErrNotExist(err) {
|
||||
|
|
|
|||
|
|
@ -8,60 +8,70 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Issue
|
||||
// swagger:response Issue
|
||||
type swaggerResponseIssue struct {
|
||||
// in:body
|
||||
Body api.Issue `json:"body"`
|
||||
}
|
||||
|
||||
// IssueList
|
||||
// swagger:response IssueList
|
||||
type swaggerResponseIssueList struct {
|
||||
// in:body
|
||||
Body []api.Issue `json:"body"`
|
||||
}
|
||||
|
||||
// Comment
|
||||
// swagger:response Comment
|
||||
type swaggerResponseComment struct {
|
||||
// in:body
|
||||
Body api.Comment `json:"body"`
|
||||
}
|
||||
|
||||
// CommentList
|
||||
// swagger:response CommentList
|
||||
type swaggerResponseCommentList struct {
|
||||
// in:body
|
||||
Body []api.Comment `json:"body"`
|
||||
}
|
||||
|
||||
// Label
|
||||
// swagger:response Label
|
||||
type swaggerResponseLabel struct {
|
||||
// in:body
|
||||
Body api.Label `json:"body"`
|
||||
}
|
||||
|
||||
// LabelList
|
||||
// swagger:response LabelList
|
||||
type swaggerResponseLabelList struct {
|
||||
// in:body
|
||||
Body []api.Label `json:"body"`
|
||||
}
|
||||
|
||||
// Milestone
|
||||
// swagger:response Milestone
|
||||
type swaggerResponseMilestone struct {
|
||||
// in:body
|
||||
Body api.Milestone `json:"body"`
|
||||
}
|
||||
|
||||
// MilestoneList
|
||||
// swagger:response MilestoneList
|
||||
type swaggerResponseMilestoneList struct {
|
||||
// in:body
|
||||
Body []api.Milestone `json:"body"`
|
||||
}
|
||||
|
||||
// TrackedTime
|
||||
// swagger:response TrackedTime
|
||||
type swaggerResponseTrackedTime struct {
|
||||
// in:body
|
||||
Body api.TrackedTime `json:"body"`
|
||||
}
|
||||
|
||||
// TrackedTimeList
|
||||
// swagger:response TrackedTimeList
|
||||
type swaggerResponseTrackedTimeList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,36 +8,42 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// PublicKey
|
||||
// swagger:response PublicKey
|
||||
type swaggerResponsePublicKey struct {
|
||||
// in:body
|
||||
Body api.PublicKey `json:"body"`
|
||||
}
|
||||
|
||||
// PublicKeyList
|
||||
// swagger:response PublicKeyList
|
||||
type swaggerResponsePublicKeyList struct {
|
||||
// in:body
|
||||
Body []api.PublicKey `json:"body"`
|
||||
}
|
||||
|
||||
// GPGKey
|
||||
// swagger:response GPGKey
|
||||
type swaggerResponseGPGKey struct {
|
||||
// in:body
|
||||
Body api.GPGKey `json:"body"`
|
||||
}
|
||||
|
||||
// GPGKeyList
|
||||
// swagger:response GPGKeyList
|
||||
type swaggerResponseGPGKeyList struct {
|
||||
// in:body
|
||||
Body []api.GPGKey `json:"body"`
|
||||
}
|
||||
|
||||
// DeployKey
|
||||
// swagger:response DeployKey
|
||||
type swaggerResponseDeployKey struct {
|
||||
// in:body
|
||||
Body api.DeployKey `json:"body"`
|
||||
}
|
||||
|
||||
// DeployKeyList
|
||||
// swagger:response DeployKeyList
|
||||
type swaggerResponseDeployKeyList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// ServerVersion
|
||||
// swagger:response ServerVersion
|
||||
type swaggerResponseServerVersion struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import (
|
|||
// not actually a response, just a hack to get go-swagger to include definitions
|
||||
// of the various XYZOption structs
|
||||
|
||||
// parameterBodies
|
||||
// swagger:response parameterBodies
|
||||
type swaggerParameterBodies struct {
|
||||
AddCollaboratorOption api.AddCollaboratorOption
|
||||
|
|
|
|||
|
|
@ -8,24 +8,28 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Organization
|
||||
// swagger:response Organization
|
||||
type swaggerResponseOrganization struct {
|
||||
// in:body
|
||||
Body api.Organization `json:"body"`
|
||||
}
|
||||
|
||||
// OrganizationList
|
||||
// swagger:response OrganizationList
|
||||
type swaggerResponseOrganizationList struct {
|
||||
// in:body
|
||||
Body []api.Organization `json:"body"`
|
||||
}
|
||||
|
||||
// Team
|
||||
// swagger:response Team
|
||||
type swaggerResponseTeam struct {
|
||||
// in:body
|
||||
Body api.Team `json:"body"`
|
||||
}
|
||||
|
||||
// TeamList
|
||||
// swagger:response TeamList
|
||||
type swaggerResponseTeamList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -8,95 +8,111 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// Repository
|
||||
// swagger:response Repository
|
||||
type swaggerResponseRepository struct {
|
||||
// in:body
|
||||
Body api.Repository `json:"body"`
|
||||
}
|
||||
|
||||
// RepositoryList
|
||||
// swagger:response RepositoryList
|
||||
type swaggerResponseRepositoryList struct {
|
||||
// in:body
|
||||
Body []api.Repository `json:"body"`
|
||||
}
|
||||
|
||||
// Branch
|
||||
// swagger:response Branch
|
||||
type swaggerResponseBranch struct {
|
||||
// in:body
|
||||
Body api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// BranchList
|
||||
// swagger:response BranchList
|
||||
type swaggerResponseBranchList struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// Hook
|
||||
// swagger:response Hook
|
||||
type swaggerResponseHook struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// HookList
|
||||
// swagger:response HookList
|
||||
type swaggerResponseHookList struct {
|
||||
// in:body
|
||||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// Release
|
||||
// swagger:response Release
|
||||
type swaggerResponseRelease struct {
|
||||
// in:body
|
||||
Body api.Release `json:"body"`
|
||||
}
|
||||
|
||||
// ReleaseList
|
||||
// swagger:response ReleaseList
|
||||
type swaggerResponseReleaseList struct {
|
||||
// in:body
|
||||
Body []api.Release `json:"body"`
|
||||
}
|
||||
|
||||
// PullRequest
|
||||
// swagger:response PullRequest
|
||||
type swaggerResponsePullRequest struct {
|
||||
// in:body
|
||||
Body api.PullRequest `json:"body"`
|
||||
}
|
||||
|
||||
// PullRequestList
|
||||
// swagger:response PullRequestList
|
||||
type swaggerResponsePullRequestList struct {
|
||||
// in:body
|
||||
Body []api.PullRequest `json:"body"`
|
||||
}
|
||||
|
||||
// Status
|
||||
// swagger:response Status
|
||||
type swaggerResponseStatus struct {
|
||||
// in:body
|
||||
Body api.Status `json:"body"`
|
||||
}
|
||||
|
||||
// StatusList
|
||||
// swagger:response StatusList
|
||||
type swaggerResponseStatusList struct {
|
||||
// in:body
|
||||
Body []api.Status `json:"body"`
|
||||
}
|
||||
|
||||
// WatchInfo
|
||||
// swagger:response WatchInfo
|
||||
type swaggerResponseWatchInfo struct {
|
||||
// in:body
|
||||
Body api.WatchInfo `json:"body"`
|
||||
}
|
||||
|
||||
// SearchResults
|
||||
// swagger:response SearchResults
|
||||
type swaggerResponseSearchResults struct {
|
||||
Body api.SearchResults `json:"body"`
|
||||
}
|
||||
|
||||
// AttachmentList
|
||||
// swagger:response AttachmentList
|
||||
type swaggerResponseAttachmentList struct {
|
||||
//in: body
|
||||
Body []api.Attachment `json:"body"`
|
||||
}
|
||||
|
||||
// Attachment
|
||||
// swagger:response Attachment
|
||||
type swaggerResponseAttachment struct {
|
||||
//in: body
|
||||
|
|
|
|||
|
|
@ -8,18 +8,21 @@ import (
|
|||
api "code.gitea.io/sdk/gitea"
|
||||
)
|
||||
|
||||
// User
|
||||
// swagger:response User
|
||||
type swaggerResponseUser struct {
|
||||
// in:body
|
||||
Body api.User `json:"body"`
|
||||
}
|
||||
|
||||
// UserList
|
||||
// swagger:response UserList
|
||||
type swaggerResponseUserList struct {
|
||||
// in:body
|
||||
Body []api.User `json:"body"`
|
||||
}
|
||||
|
||||
// EmailList
|
||||
// swagger:response EmailList
|
||||
type swaggerResponseEmailList struct {
|
||||
// in:body
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ func GetWatchedRepos(ctx *context.APIContext) {
|
|||
// type: string
|
||||
// in: path
|
||||
// description: username of the user
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/RepositoryList"
|
||||
|
|
|
|||
|
|
@ -223,6 +223,10 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
|
|||
|
||||
var output bytes.Buffer
|
||||
lines := strings.Split(fileContent, "\n")
|
||||
//Remove blank line at the end of file
|
||||
if len(lines) > 0 && lines[len(lines)-1] == "" {
|
||||
lines = lines[:len(lines)-1]
|
||||
}
|
||||
for index, line := range lines {
|
||||
line = gotemplate.HTMLEscapeString(line)
|
||||
if index != len(lines)-1 {
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName))
|
||||
}
|
||||
|
||||
// EditWiki render wiki modify page
|
||||
|
|
@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName))
|
||||
}
|
||||
|
||||
// DeleteWikiPagePost delete wiki page
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@
|
|||
</div>
|
||||
<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
|
||||
<label for="oauth2_auth_url">{{.i18n.Tr "admin.auths.oauth2_authURL"}}</label>
|
||||
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}v{{end}}">
|
||||
<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}">
|
||||
</div>
|
||||
<div class="oauth2_use_custom_url_field oauth2_token_url required field">
|
||||
<label for="oauth2_token_url">{{.i18n.Tr "admin.auths.oauth2_tokenURL"}}</label>
|
||||
|
|
|
|||
|
|
@ -92,16 +92,22 @@
|
|||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||
<dd>{{.DbCfg.Type}}</dd>
|
||||
{{if not (or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb"))}}
|
||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
||||
{{end}}
|
||||
{{if eq .DbCfg.Type "postgres"}}
|
||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||
<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||
<dd>{{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}</dd>
|
||||
{{end}}
|
||||
{{if or (eq .DbCfg.Type "sqlite3") (eq .DbCfg.Type "tidb")}}
|
||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@
|
|||
<div class="ui top secondary stackable main menu following bar light">
|
||||
<div class="ui container" id="navbar">
|
||||
<div class="item brand" style="justify-content: space-between;">
|
||||
<a href="{{AppSubUrl}}/" href="{{AppSubUrl}}/">
|
||||
<a href="{{AppSubUrl}}/">
|
||||
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
|
||||
</a>
|
||||
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
|
||||
|
|
|
|||
12
templates/home.tmpl
vendored
12
templates/home.tmpl
vendored
|
|
@ -28,7 +28,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Plattformübergreifend
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea läuft überall. <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
Gitea läuft überall. <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> kompiliert für: Windows, macOS, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multi-plateforme
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea tourne partout où <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> peut être compilé : Windows, Mac OS X, Linux, ARM, etc. Choisissez votre préféré !
|
||||
Gitea tourne partout où <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> peut être compilé : Windows, macOS, Linux, ARM, etc. Choisissez votre préféré !
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -179,7 +179,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multiplatforma
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea funciona en cualquier parte, <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> puede compilarse en: Windows, Mac OS X, Linux, ARM, etc. !Elige tu favorita!
|
||||
Gitea funciona en cualquier parte, <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> puede compilarse en: Windows, macOS, Linux, ARM, etc. !Elige tu favorita!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Multi-plataforma
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea roda em qualquer sistema operacional em que <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> consegue compilar: Windows, Mac OS X, Linux, ARM, etc. Escolha qual você gosta mais!
|
||||
Gitea roda em qualquer sistema operacional em que <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> consegue compilar: Windows, macOS, Linux, ARM, etc. Escolha qual você gosta mais!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -253,7 +253,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Кроссплатформенный
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener" href="http://golang.org/">Go</a>: Windows, Mac OS X, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
|
||||
Gitea работает на любой операционной системе, которая может компилировать <a target="_blank" rel="noopener" href="http://golang.org/">Go</a>: Windows, macOS, Linux, ARM и т. д. Выбирайте, что вам больше нравится!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -327,7 +327,7 @@
|
|||
<i class="octicon octicon-device-desktop"></i> Cross-platform
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gitea runs anywhere <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
|
||||
Gitea runs anywhere <a target="_blank" rel="noopener" href="http://golang.org/">Go</a> can compile for: Windows, macOS, Linux, ARM, etc. Choose the one you love!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
32
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
32
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
|
|
@ -9,6 +9,8 @@ import (
|
|||
"container/list"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mcuadros/go-version"
|
||||
)
|
||||
|
||||
// GetRefCommitID returns the last commit ID string of given reference (branch or tag).
|
||||
|
|
@ -274,7 +276,7 @@ func (repo *Repository) CommitsCountBetween(start, end string) (int64, error) {
|
|||
func (repo *Repository) commitsBefore(id SHA1, limit int) (*list.List, error) {
|
||||
cmd := NewCommand("log")
|
||||
if limit > 0 {
|
||||
cmd.AddArguments("-"+ strconv.Itoa(limit), prettyLogFormat, id.String())
|
||||
cmd.AddArguments("-"+strconv.Itoa(limit), prettyLogFormat, id.String())
|
||||
} else {
|
||||
cmd.AddArguments(prettyLogFormat, id.String())
|
||||
}
|
||||
|
|
@ -316,15 +318,35 @@ func (repo *Repository) getCommitsBeforeLimit(id SHA1, num int) (*list.List, err
|
|||
}
|
||||
|
||||
func (repo *Repository) getBranches(commit *Commit, limit int) ([]string, error) {
|
||||
stdout, err := NewCommand("for-each-ref", "--count="+ strconv.Itoa(limit), "--format=%(refname)", "--contains", commit.ID.String(), BranchPrefix).RunInDir(repo.Path)
|
||||
if version.Compare(gitVersion, "2.7.0", ">=") {
|
||||
stdout, err := NewCommand("for-each-ref", "--count="+strconv.Itoa(limit), "--format=%(refname:strip=2)", "--contains", commit.ID.String(), BranchPrefix).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
branches := strings.Fields(stdout)
|
||||
return branches, nil
|
||||
}
|
||||
|
||||
stdout, err := NewCommand("branch", "--contains", commit.ID.String()).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
refs := strings.Split(stdout, "\n")
|
||||
branches := make([]string, len(refs)-1)
|
||||
for i, ref := range refs[:len(refs)-1] {
|
||||
branches[i] = strings.TrimPrefix(ref, BranchPrefix)
|
||||
|
||||
var max int
|
||||
if len(refs) > limit {
|
||||
max = limit
|
||||
} else {
|
||||
max = len(refs) - 1
|
||||
}
|
||||
|
||||
branches := make([]string, max)
|
||||
for i, ref := range refs[:max] {
|
||||
parts := strings.Fields(ref)
|
||||
|
||||
branches[i] = parts[len(parts)-1]
|
||||
}
|
||||
return branches, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user