Merge branch 'master' into branch-special-chars
This commit is contained in:
commit
06991dfb69
|
|
@ -75,6 +75,7 @@ pipeline:
|
|||
- make lint
|
||||
- make fmt-check
|
||||
- make swagger-check
|
||||
- make swagger-validate
|
||||
- make misspell-check
|
||||
- make test-vendor
|
||||
- make build
|
||||
|
|
|
|||
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,7 +69,7 @@ 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,
|
||||
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.
|
||||
|
||||
|
|
@ -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:
|
||||
|
||||
|
|
@ -201,6 +201,10 @@ an advisor has time to code review, we will gladly welcome them back
|
|||
to the maintainers team. If a maintainer is inactive for more than 3
|
||||
months and forgets to leave the maintainers team, the owners may move
|
||||
him or her from the maintainers team to the advisors team.
|
||||
For security reasons, Maintainers should use 2FA for their accounts and
|
||||
if possible provide gpg signed commits.
|
||||
https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
|
||||
https://help.github.com/articles/signing-commits-with-gpg/
|
||||
|
||||
## Owners
|
||||
|
||||
|
|
@ -211,6 +215,9 @@ be the main owner, and the other two the assistant owners. When the new
|
|||
owners have been elected, the old owners will give up ownership to the
|
||||
newly elected owners. If an owner is unable to do so, the other owners
|
||||
will assist in ceding ownership to the newly elected owners.
|
||||
For security reasons, Owners or any account with write access (like a bot)
|
||||
must use 2FA.
|
||||
https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
|
||||
|
||||
After the election, the new owners should proactively agree
|
||||
with our [CONTRIBUTING](CONTRIBUTING.md) requirements in the
|
||||
|
|
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -22,3 +22,4 @@ Peter Žeby <morlinest@gmail.com> (@morlinest)
|
|||
Matti Ranta <matti@mdranta.net> (@techknowlogick)
|
||||
Michael Lustfield <mtecknology@debian.org> (@MTecknology)
|
||||
Jonas Franz <info@jonasfranz.software> (@JonasFranzDEV)
|
||||
Flynn Lufmons <fluf@warpmail.net> (@flufmonster)
|
||||
|
|
|
|||
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 \
|
||||
|
|
|
|||
23
README.md
23
README.md
|
|
@ -12,13 +12,6 @@
|
|||
[](https://www.codetriage.com/go-gitea/gitea)
|
||||
[](https://opencollective.com/gitea)
|
||||
|
||||
| | | |
|
||||
|:---:|:---:|:---:|
|
||||
||||
|
||||
||||
|
||||
||||
|
||||
||||
|
||||
|
||||
## Purpose
|
||||
|
||||
The goal of this project is to make the easiest, fastest, and most
|
||||
|
|
@ -91,8 +84,24 @@ 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.
|
||||
See the [LICENSE](https://github.com/go-gitea/gitea/blob/master/LICENSE) file
|
||||
for the full license text.
|
||||
|
||||
## Screenshots
|
||||
Looking for an overview of the interface? Check it out!
|
||||
|
||||
| | | |
|
||||
|:---:|:---:|:---:|
|
||||
||||
|
||||
||||
|
||||
||||
|
||||
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ var (
|
|||
Value: "",
|
||||
Usage: "New password to set for user",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "config, c",
|
||||
Value: "custom/conf/app.ini",
|
||||
Usage: "Custom configuration file path",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -123,6 +128,10 @@ func runChangePassword(c *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if c.IsSet("config") {
|
||||
setting.CustomConf = c.String("config")
|
||||
}
|
||||
|
||||
if err := initDB(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
@ -412,7 +414,7 @@ ENABLE_FEDERATED_AVATAR = false
|
|||
|
||||
[attachment]
|
||||
; Whether attachments are enabled. Defaults to `true`
|
||||
ENABLE = true
|
||||
ENABLED = true
|
||||
; Path for attachments. Defaults to `data/attachments`
|
||||
PATH = data/attachments
|
||||
; One or more allowed types, e.g. image/jpeg|image/png
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `LFS_START_SERVER`: **false**: Enables git-lfs support.
|
||||
- `LFS_CONTENT_PATH`: **./data/lfs**: Where to store LFS files.
|
||||
- `LFS_JWT_SECRET`: **\<empty\>**: LFS authentication secret, change this a unique string.
|
||||
- `LFS_HTTP_AUTH_EXPIRY`: **20m**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail.
|
||||
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, redirects http requests
|
||||
on another (https) port.
|
||||
- `PORT_TO_REDIRECT`: **80**: Port used when `REDIRECT_OTHER_PORT` is true.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ file can be unpacked and used to restore an instance.
|
|||
|
||||
## Backup Command (`dump`)
|
||||
|
||||
Switch to the user running gitea: `su git`. Run `./gitea dump` in the gitea installation
|
||||
Switch to the user running gitea: `su git`. Run `./gitea dump -c /path/to/app.ini` in the gitea installation
|
||||
directory. There should be some output similar to the following:
|
||||
|
||||
```
|
||||
|
|
@ -34,7 +34,8 @@ directory. There should be some output similar to the following:
|
|||
|
||||
Inside the `gitea-dump-1482906742.zip` file, will be the following:
|
||||
|
||||
* `custom/conf/app.ini` - Server config.
|
||||
* `custom` - All config or customerize files in `custom/`.
|
||||
* `data` - Data directory in <GITEA_WORK_DIR>, except sessions if you are using file session. This directory includes `attachments`, `avatars`, `lfs`, `indexers`, sqlite file if you are using sqlite.
|
||||
* `gitea-db.sql` - SQL dump of database
|
||||
* `gitea-repo.zip` - Complete copy of the repository directory.
|
||||
* `log/` - Various logs. They are not needed for a recovery or migration.
|
||||
|
|
|
|||
60
docs/content/doc/usage/backup-and-restore.zh-cn.md
Normal file
60
docs/content/doc/usage/backup-and-restore.zh-cn.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
date: "2018-06-06T09:33:00+08:00"
|
||||
title: "使用: 备份与恢复"
|
||||
slug: "backup-and-restore"
|
||||
weight: 11
|
||||
toc: true
|
||||
draft: false
|
||||
menu:
|
||||
sidebar:
|
||||
parent: "usage"
|
||||
name: "备份与恢复"
|
||||
weight: 11
|
||||
identifier: "backup-and-restore"
|
||||
---
|
||||
|
||||
# 备份与恢复
|
||||
|
||||
Gitea 已经实现了 `dump` 命令可以用来备份所有需要的文件到一个zip压缩文件。该压缩文件可以被用来进行数据恢复。
|
||||
|
||||
## 备份命令 (`dump`)
|
||||
|
||||
先转到git用户的权限: `su git`. 再Gitea目录运行 `./gitea dump`。一般会显示类似如下的输出:
|
||||
|
||||
```
|
||||
2016/12/27 22:32:09 Creating tmp work dir: /tmp/gitea-dump-417443001
|
||||
2016/12/27 22:32:09 Dumping local repositories.../home/git/gitea-repositories
|
||||
2016/12/27 22:32:22 Dumping database...
|
||||
2016/12/27 22:32:22 Packing dump files...
|
||||
2016/12/27 22:32:34 Removing tmp work dir: /tmp/gitea-dump-417443001
|
||||
2016/12/27 22:32:34 Finish dumping in file gitea-dump-1482906742.zip
|
||||
```
|
||||
|
||||
最后生成的 `gitea-dump-1482906742.zip` 文件将会包含如下内容:
|
||||
|
||||
* `custom` - 所有保存在 `custom/` 目录下的配置和自定义的文件。
|
||||
* `data` - 数据目录下的所有内容不包含使用文件session的文件。该目录包含 `attachments`, `avatars`, `lfs`, `indexers`, 如果使用sqlite 还会包含 sqlite 数据库文件。
|
||||
* `gitea-db.sql` - 数据库dump出来的 SQL。
|
||||
* `gitea-repo.zip` - Git仓库压缩文件。
|
||||
* `log/` - Logs文件,如果用作迁移不是必须的。
|
||||
|
||||
中间备份文件将会在临时目录进行创建,如果您要重新指定临时目录,可以用 `--tempdir` 参数,或者用 `TMPDIR` 环境变量。
|
||||
|
||||
## Restore Command (`restore`)
|
||||
|
||||
当前还没有恢复命令,恢复需要人工进行。主要是把文件和数据库进行恢复。
|
||||
|
||||
例如:
|
||||
|
||||
```
|
||||
apt-get install gitea
|
||||
unzip gitea-dump-1482906742.zip
|
||||
cd gitea-dump-1482906742
|
||||
mv custom/conf/app.ini /etc/gitea/conf/app.ini
|
||||
unzip gitea-repo.zip
|
||||
mv gitea-repo/* /var/lib/gitea/repositories/
|
||||
chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea/repositories/
|
||||
mysql -u$USER -p$PASS $DATABASE <gitea-db.sql
|
||||
# or sqlite3 $DATABASE_PATH <gitea-db.sql
|
||||
service gitea restart
|
||||
```
|
||||
|
|
@ -62,6 +62,7 @@ Admin operations:
|
|||
- Options:
|
||||
- `--username value`, `-u value`: Username. Required.
|
||||
- `--password value`, `-p value`: New password. Required.
|
||||
- `--config path`: Gitea configuration file path. Optional. (default: custom/conf/app.ini).
|
||||
- Examples:
|
||||
- `gitea admin change-password --username myname --password asecurepassword`
|
||||
- `regenerate`
|
||||
|
|
|
|||
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]`.
|
||||
|
|
@ -13,7 +13,7 @@ Make sure to perform a clean build before running tests:
|
|||
|
||||
## Run all tests via local drone
|
||||
```
|
||||
drone exec --local --build.event "pull_request"
|
||||
drone exec --local --build-event "pull_request"
|
||||
```
|
||||
|
||||
## Run sqlite integrations tests
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ func IsErrEmailAlreadyUsed(err error) bool {
|
|||
}
|
||||
|
||||
func (err ErrEmailAlreadyUsed) Error() string {
|
||||
return fmt.Sprintf("e-mail has been used [email: %s]", err.Email)
|
||||
return fmt.Sprintf("e-mail already in use [email: %s]", err.Email)
|
||||
}
|
||||
|
||||
// ErrOpenIDAlreadyUsed represents a "OpenIDAlreadyUsed" kind of error.
|
||||
|
|
@ -117,7 +117,7 @@ func IsErrOpenIDAlreadyUsed(err error) bool {
|
|||
}
|
||||
|
||||
func (err ErrOpenIDAlreadyUsed) Error() string {
|
||||
return fmt.Sprintf("OpenID has been used [oid: %s]", err.OpenID)
|
||||
return fmt.Sprintf("OpenID already in use [oid: %s]", err.OpenID)
|
||||
}
|
||||
|
||||
// ErrUserOwnRepos represents a "UserOwnRepos" kind of error.
|
||||
|
|
|
|||
|
|
@ -147,6 +147,10 @@ func (c *Comment) AfterLoad(session *xorm.Session) {
|
|||
|
||||
// AfterDelete is invoked from XORM after the object is deleted.
|
||||
func (c *Comment) AfterDelete() {
|
||||
if c.ID <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
_, err := DeleteAttachmentsByComment(c.ID, true)
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -448,6 +448,11 @@ func DeleteReleaseByID(id int64, u *User, delTag bool) error {
|
|||
}
|
||||
}
|
||||
|
||||
rel.Repo = repo
|
||||
if err = rel.LoadAttributes(); err != nil {
|
||||
return fmt.Errorf("LoadAttributes: %v", err)
|
||||
}
|
||||
|
||||
mode, _ := accessLevel(x, u.ID, rel.Repo)
|
||||
if err := PrepareWebhooks(rel.Repo, HookEventRelease, &api.ReleasePayload{
|
||||
Action: api.HookReleaseDeleted,
|
||||
|
|
|
|||
|
|
@ -1848,6 +1848,9 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
|
|||
if _, err = sess.In("issue_id", issueIDs).Delete(&IssueUser{}); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = sess.In("issue_id", issueIDs).Delete(&Reaction{}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
attachments := make([]*Attachment, 0, 5)
|
||||
if err = sess.
|
||||
|
|
|
|||
|
|
@ -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-_\\./]")
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Здравейте %s, имате непотвърден а
|
|||
resend_mail=Щракнете тук, за да се изпрати ново писмо за потвърждение
|
||||
reset_password=Нулиране на паролата
|
||||
reset_password_helper=Щракнете тук, за да нулирате паролата си
|
||||
password_too_short=Размерът на паролата не може да бъде по-малък от %d знака.
|
||||
|
||||
[mail]
|
||||
activate_account=Моля активирайте Вашия профил
|
||||
|
|
@ -606,9 +605,7 @@ config.db_config=Настройки на базата данни
|
|||
config.db_type=Тип
|
||||
config.db_host=Сървър
|
||||
config.db_name=Име
|
||||
config.db_ssl_mode_helper=(само за postgres)
|
||||
config.db_path=Път
|
||||
config.db_path_helper=(за "sqlite3" и "tidb")
|
||||
|
||||
config.service_config=Настройка на услугата
|
||||
config.show_registration_button=Покажи бутон за регистрация
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Zdravím, %s, máte nepotvrzenou e-mailovou adresu (<b>%s</
|
|||
resend_mail=Klikněte zde pro odeslání aktivačního e-mailu
|
||||
reset_password=Obnova vašeho hesla
|
||||
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
||||
password_too_short=Délka hesla musí být minimálně %d znaků.
|
||||
|
||||
[mail]
|
||||
activate_account=Prosíme, aktivujte si váš účet
|
||||
|
|
@ -603,9 +602,7 @@ config.db_config=Nastavení databáze
|
|||
config.db_type=Typ
|
||||
config.db_host=Server
|
||||
config.db_name=Název
|
||||
config.db_ssl_mode_helper=(pouze pro 'postgres')
|
||||
config.db_path=Cesta
|
||||
config.db_path_helper=(pro "sqlite3" a "tidb")
|
||||
|
||||
config.service_config=Nastavení služby
|
||||
config.show_registration_button=Ukázat tlačítko registrace
|
||||
|
|
|
|||
|
|
@ -213,7 +213,6 @@ send_reset_mail=E-Mail zum Passwort-zurücksetzen erneut verschicken
|
|||
reset_password=Passwort zurücksetzen
|
||||
invalid_code=Dein Bestätigungs-Code ist ungültig oder abgelaufen.
|
||||
reset_password_helper=Passwort zurückzusetzen
|
||||
password_too_short=Das Passwort muss mindenstens %d Zeichen lang sein.
|
||||
non_local_account=Benutzer, die nicht von Gitea verwaltet werden können ihre Passwörter nicht über das Web Interface ändern.
|
||||
verify=Verifizieren
|
||||
scratch_code=Einmalpasswort
|
||||
|
|
@ -693,6 +692,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.moststars=Meiste Favoriten
|
||||
issues.filter_sort.feweststars=Wenigste Favoriten
|
||||
issues.filter_sort.mostforks=Meiste Forks
|
||||
issues.filter_sort.fewestforks=Wenigste Forks
|
||||
issues.action_open=Öffnen
|
||||
|
|
@ -1388,6 +1389,7 @@ auths.attribute_username_placeholder=Leerlassen, um den in Gitea eingegebenen Be
|
|||
auths.attribute_name=Vornamensattribut
|
||||
auths.attribute_surname=Nachnamensattribut
|
||||
auths.attribute_mail=E-Mail Attribut
|
||||
auths.attribute_ssh_public_key=Öffentliches SSH-Schlüssel Attribut
|
||||
auths.attributes_in_bind=Hole Attribute im Bind-Kontext
|
||||
auths.use_paged_search=Seitensuche verwenden
|
||||
auths.search_page_size=Seitengröße
|
||||
|
|
@ -1472,9 +1474,7 @@ config.db_host=Host
|
|||
config.db_name=Name
|
||||
config.db_user=Benutzername
|
||||
config.db_ssl_mode=SSL
|
||||
config.db_ssl_mode_helper=(nur für "postgres")
|
||||
config.db_path=Verzeichnis
|
||||
config.db_path_helper=(für "sqlite3" und "tidb")
|
||||
|
||||
config.service_config=Service-Konfiguration
|
||||
config.register_email_confirm=E-Mail-Bestätigung benötigt zum Registrieren
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ send_reset_mail = Click here to resend your password reset email
|
|||
reset_password = Reset Your Password
|
||||
invalid_code = Your confirmation code is invalid or has expired.
|
||||
reset_password_helper = Click here to reset your password
|
||||
password_too_short = Password length cannot be less then %d.
|
||||
password_too_short = Password length cannot be less than %d characters.
|
||||
non_local_account = Non-local users can not update their password through the Gitea web interface.
|
||||
verify = Verify
|
||||
scratch_code = Scratch code
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ email_not_associate=Esta dirección de correo electrónico no esta asociada a ni
|
|||
send_reset_mail=Haz clic aquí para reenviar tu email de restauración de contraseña
|
||||
reset_password=Restablecer su contraseña
|
||||
reset_password_helper=Haga Clic aquí para restablecer su contraseña
|
||||
password_too_short=La longitud de la contraseña no puede ser menor a %d.
|
||||
verify=Verificar
|
||||
twofa_scratch_used=Ya has utilizado el código. Has sido redirigido a la página de configuración de dos factores poder remover la inscripción del dispositivo o generar un nuevo código.
|
||||
twofa_scratch_token_incorrect=El código cero es incorrecto.
|
||||
|
|
@ -741,9 +740,7 @@ config.ssh_minimum_key_sizes=Tamaños de clave mínimos
|
|||
config.db_config=Configuración de la Base de Datos
|
||||
config.db_type=Tipo
|
||||
config.db_name=Nombre
|
||||
config.db_ssl_mode_helper=(sólo para "postgres")
|
||||
config.db_path=Ruta
|
||||
config.db_path_helper=(para "sqlite3" y "tidb")
|
||||
|
||||
config.service_config=Configuración del servicio
|
||||
config.show_registration_button=Mostrar Botón de Registro
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ has_unconfirmed_mail=Hei %s, sinulla on varmistamaton sähköposti osoite (<b>%s
|
|||
resend_mail=Klikkaa tästä uudelleenlähettääksesi aktivointi sähköpostisi
|
||||
reset_password=Nollaa salasanasi
|
||||
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
|
||||
password_too_short=Salasanan pituus ei voi olla vähemmän kuin %d merkkiä.
|
||||
verify=Vahvista
|
||||
|
||||
[mail]
|
||||
|
|
@ -585,9 +584,7 @@ config.db_config=Tietokannan asetukset
|
|||
config.db_type=Tyyppi
|
||||
config.db_host=Isäntä
|
||||
config.db_name=Nimi
|
||||
config.db_ssl_mode_helper=(vain "postgres")
|
||||
config.db_path=Polku
|
||||
config.db_path_helper=("sqlite3" ja "tidb")
|
||||
|
||||
config.service_config=Palvelu asetukset
|
||||
config.show_registration_button=Näytä rekisteröidy painike
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=L'adresse e-mail n'est associée à aucun compte.
|
|||
send_reset_mail=Cliquez ici pour renvoyer le mail de réinitialisation de votre mot de passe
|
||||
reset_password=Réinitialiser le mot de passe
|
||||
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
|
||||
password_too_short=Le mot de passe doit contenir %d caractères minimum.
|
||||
verify=Vérifier
|
||||
scratch_code=Code de secours
|
||||
use_scratch_code=Utiliser un code de secours
|
||||
|
|
@ -818,9 +817,7 @@ config.db_config=Configuration de la base de données
|
|||
config.db_type=Type
|
||||
config.db_host=Hôte
|
||||
config.db_name=Nom
|
||||
config.db_ssl_mode_helper=("postgres" uniquement)
|
||||
config.db_path=Emplacement
|
||||
config.db_path_helper=(pour « sqlite3 » et « TIDB »)
|
||||
|
||||
config.service_config=Configuration du service
|
||||
config.show_registration_button=Afficher le bouton d'enregistrement
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ email_not_associate=Az email cím nincsen hozzárendelve egyetlen fiókhoz sem.
|
|||
send_reset_mail=Kattints ide hogy újraküldd a jelszó visszaállító emailt
|
||||
reset_password=Jelszó visszaállítása
|
||||
reset_password_helper=Kattintson ide, hogy visszaállítsa a jelszavát
|
||||
password_too_short=A jelszó nem lehet rövidebb, mint %d karakter.
|
||||
verify=Ellenőrzés
|
||||
scratch_code=Kaparós kód
|
||||
use_scratch_code=Kaparós kód használata
|
||||
|
|
@ -835,9 +834,7 @@ config.db_config=Adatbázis Konfiguráció
|
|||
config.db_type=Típus
|
||||
config.db_host=Kiszolgáló
|
||||
config.db_name=Név
|
||||
config.db_ssl_mode_helper=(csak "postgres"-nek)
|
||||
config.db_path=Elérési út
|
||||
config.db_path_helper=("sqlite3" és "tidb"-nek)
|
||||
|
||||
config.service_config=Szolgáltatás konfiguráció
|
||||
config.show_registration_button=Regisztráció gomb megjelenítése
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=Alamat surel tidak terhubung dengan akun apapun.
|
|||
send_reset_mail=Klik di sini untuk mengirim ulang surel pengaturan ulang kata sandi
|
||||
reset_password=Atur Ulang Kata Sandi Anda
|
||||
reset_password_helper=Klik di sini untuk mengatur ulang kata sandi anda
|
||||
password_too_short=Panjang kata sandi tidak boleh kurang dari %d.
|
||||
verify=Verifikasi
|
||||
scratch_code=Kode coretan
|
||||
use_scratch_code=Gunakan kode coretan
|
||||
|
|
@ -807,9 +806,7 @@ config.ssh_minimum_key_sizes=Ukuran kunci minimum
|
|||
|
||||
config.db_config=Konfigurasi basis data
|
||||
config.db_name=Nama
|
||||
config.db_ssl_mode_helper=(untuk "postgres" saja)
|
||||
config.db_path=Jalur
|
||||
config.db_path_helper=(untuk "sqlite3 dan "tidb")
|
||||
|
||||
config.service_config=Konfigurasi layanan
|
||||
config.show_registration_button=Tampilkan tombol mendaftar
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=L'indirizzo email non è associato ad alcuna conta.
|
|||
send_reset_mail=Clicca qui per inviare nuovamente la tua email di reimpostazione della password
|
||||
reset_password=Reimposta la tua Password
|
||||
reset_password_helper=Clicca qui per reimpostare la password
|
||||
password_too_short=La lunghezza della password non può essere meno %d caratteri.
|
||||
verify=Verifica
|
||||
scratch_code=Codice Gratta e Vinci
|
||||
use_scratch_code=Utilizza un codice di zero
|
||||
|
|
@ -638,9 +637,7 @@ config.ssh_minimum_key_sizes=Dimensioni minime della chiave
|
|||
config.db_config=Configurazione Database
|
||||
config.db_type=Tipo
|
||||
config.db_name=Nome
|
||||
config.db_ssl_mode_helper=(solo per "postgres")
|
||||
config.db_path=Percorso
|
||||
config.db_path_helper=(per "sqlite3" e "tidb")
|
||||
|
||||
config.service_config=Configurazione Servizio
|
||||
config.show_registration_button=Mostra Pulsane Registrazione
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ email_not_associate=このEメールアドレスは、どのアカウントに
|
|||
send_reset_mail=パスワードリセットメールを再送するにはここをクリックしてください
|
||||
reset_password=パスワードリセット
|
||||
reset_password_helper=パスワードをリセットするにはここをクリック
|
||||
password_too_short=%d文字未満のパスワードは設定できません。
|
||||
verify=確認
|
||||
scratch_code=スクラッチコード
|
||||
use_scratch_code=スクラッチコードを使う
|
||||
|
|
@ -833,9 +832,7 @@ config.db_config=データベースの構成
|
|||
config.db_type=タイプ
|
||||
config.db_host=ホスト
|
||||
config.db_name=名前
|
||||
config.db_ssl_mode_helper=(「postgres」のみ)
|
||||
config.db_path=パス
|
||||
config.db_path_helper=("sqlite3"および"tidb"のみ)
|
||||
|
||||
config.service_config=サービスの構成
|
||||
config.show_registration_button=登録ボタンを表示します。
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=이 이메일 주소로 등록된 계정이 없습니다.
|
|||
send_reset_mail=여기를 눌러 비밀번호 초기화 메일을 재전송
|
||||
reset_password=비밀번호 초기화
|
||||
reset_password_helper=이곳을 눌러 비밀번호를 재설정
|
||||
password_too_short=비밀번호의 길이는 %d글자 미만일 수 없습니다.
|
||||
verify=확인
|
||||
scratch_code=스크래치 코드
|
||||
use_scratch_code=스크래치 코드 사용
|
||||
|
|
@ -687,9 +686,7 @@ config.db_config=데이터베이스 설정
|
|||
config.db_type=유형
|
||||
config.db_host=호스트
|
||||
config.db_name=이름
|
||||
config.db_ssl_mode_helper=("postgres" 전용)
|
||||
config.db_path=경로
|
||||
config.db_path_helper=("sqlite3" 및 "tidb"만)
|
||||
|
||||
config.service_config=서비스 설정
|
||||
config.show_registration_button=등록 버튼을 표시
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ active_your_account=Aktyvinkite savo paskyrą
|
|||
resend_mail=Spauskite čia norėdami persiųsti aktyvacijos laišką
|
||||
reset_password=Atstatyti slaptažodį
|
||||
reset_password_helper=Paspauskite čia norėdami pakeisti savo slaptažodį
|
||||
password_too_short=Slaptažodis negali būti trumpesnis nei %d simbolių.
|
||||
verify=Patikrinti
|
||||
|
||||
[mail]
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ email_not_associate=Šī e-pasta adrese nav saistīta ar nevienu kontu.
|
|||
send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu e-pastu
|
||||
reset_password=Atjaunot savu paroli
|
||||
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
||||
password_too_short=Paroles garums nedrīkst būt mazāks par %d.
|
||||
verify=Pārbaudīt
|
||||
scratch_code=Vienreizējais kods
|
||||
use_scratch_code=Izmantot vienreizējo kodu
|
||||
|
|
@ -833,9 +832,7 @@ config.db_config=Datu bāzes konfigurācija
|
|||
config.db_type=Veids
|
||||
config.db_host=Resursdators
|
||||
config.db_name=Nosaukums
|
||||
config.db_ssl_mode_helper=(tikai PostgreSQL datu bāzei)
|
||||
config.db_path=Ceļš
|
||||
config.db_path_helper=(priekš "sqlite3" and "tidb")
|
||||
|
||||
config.service_config=Pakalpojuma konfigurācija
|
||||
config.show_registration_button=Rādīt reģistrēšanās pogu
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ email_not_associate=Dit emailadres is niet gekoppeld aan een account.
|
|||
send_reset_mail=Klik hier om de wachtwoord reset mail (nogmaals) te versturen
|
||||
reset_password=Reset uw wachtwoord
|
||||
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
||||
password_too_short=De lengte van uw wachtwoord moet minimaal %d karakters zijn.
|
||||
verify=Verifiëren
|
||||
scratch_code=Eenmalige code
|
||||
use_scratch_code=Gebruik een eenmalige code
|
||||
|
|
@ -784,9 +783,7 @@ config.db_config=Databaseconfiguratie
|
|||
config.db_type=Type
|
||||
config.db_host=Host
|
||||
config.db_name=Naam
|
||||
config.db_ssl_mode_helper=(alleen voor "postgres")
|
||||
config.db_path=Pad
|
||||
config.db_path_helper=(voor "sqlite3" en "tidb")
|
||||
|
||||
config.service_config=Serviceconfiguratie
|
||||
config.show_registration_button=Registeren knop weergeven
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=Adres e-mail nie jest powiązany z żadnym kontem.
|
|||
send_reset_mail=Kliknij tutaj, aby ponownie wysłać e-mail resetowania hasła
|
||||
reset_password=Resetowanie hasła
|
||||
reset_password_helper=Kliknij tutaj, aby zresetować hasło
|
||||
password_too_short=Długość hasła nie może być mniejsza niż %d znaków.
|
||||
verify=Potwierdź
|
||||
scratch_code=Kod jednorazowy
|
||||
use_scratch_code=Użyj kodu jednorazowego
|
||||
|
|
@ -816,9 +815,7 @@ config.db_config=Konfiguracja bazy danych
|
|||
config.db_type=Typ
|
||||
config.db_host=Serwer
|
||||
config.db_name=Nazwa
|
||||
config.db_ssl_mode_helper=(tylko dla „postgres”)
|
||||
config.db_path=Ścieżka
|
||||
config.db_path_helper=(dla „sqlite3” i „tidb”)
|
||||
|
||||
config.service_config=Konfiguracja usługi
|
||||
config.show_registration_button=Pokazuj przycisk rejestracji
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ send_reset_mail=Clique aqui para re-enviar seu e-mail de redefinição de senha
|
|||
reset_password=Redefinir sua senha
|
||||
invalid_code=Seu código de confirmação é inválido ou expirou.
|
||||
reset_password_helper=Clique aqui para redefinir sua senha
|
||||
password_too_short=O comprimento da senha não pode ser menor que %d.
|
||||
password_too_short=A senha deve ter %d ou mais caracteres.
|
||||
non_local_account=Usuários não-locais não podem atualizar sua senha através da interface web do Gitea.
|
||||
verify=Verificar
|
||||
scratch_code=Código de backup
|
||||
|
|
@ -1475,9 +1475,7 @@ config.db_host=Servidor
|
|||
config.db_name=Nome
|
||||
config.db_user=Nome de usuário
|
||||
config.db_ssl_mode=SSL
|
||||
config.db_ssl_mode_helper=(apenas para "postgres")
|
||||
config.db_path=Caminho
|
||||
config.db_path_helper=(para "sqlite3" e "tidb")
|
||||
|
||||
config.service_config=Configuração do serviço
|
||||
config.register_email_confirm=Exigir confirmação de e-mail para se cadastrar
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -79,7 +79,6 @@ has_unconfirmed_mail=Здраво, %s! Имате непотврђену адр
|
|||
resend_mail=Кликните овде да поново пошаљете писмо
|
||||
reset_password=Ресет лозинке
|
||||
reset_password_helper=Кликните овде да ресетујете вашу лозинку
|
||||
password_too_short=Лозинка неможе бити краћа од %d карактера.
|
||||
|
||||
[mail]
|
||||
activate_account=Молимо вас активирајте ваш налог
|
||||
|
|
@ -601,9 +600,7 @@ config.db_config=Конфигурација базе података
|
|||
config.db_type=Тип
|
||||
config.db_host=Хост
|
||||
config.db_name=Име
|
||||
config.db_ssl_mode_helper=(само за postgres)
|
||||
config.db_path=Пут
|
||||
config.db_path_helper=(за "sqlite3" и "tidb")
|
||||
|
||||
config.service_config=Подешавања сервиса
|
||||
config.show_registration_button=Прикажи дугме за регистрацију
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=Denna e-postadress är inte knutet till något konto.
|
|||
send_reset_mail=Klicka här för att skicka e-post med lösenordsåterställning igen
|
||||
reset_password=Återställ ditt lösenord
|
||||
reset_password_helper=Klicka här för att återställa ditt lösenord
|
||||
password_too_short=Lösenordet får ej vara kortare än %d tecken.
|
||||
verify=Verifiera
|
||||
scratch_code=Skrapkod
|
||||
use_scratch_code=Använd en skrapkod
|
||||
|
|
@ -738,9 +737,7 @@ config.db_config=Databaskonfiguration
|
|||
config.db_type=Typ
|
||||
config.db_host=Värd
|
||||
config.db_name=Namn
|
||||
config.db_ssl_mode_helper=(endast för "postgres")
|
||||
config.db_path=Sökväg
|
||||
config.db_path_helper=(för "sqlite3" och "tidb")
|
||||
|
||||
config.service_config=Tjänstkonfiguration
|
||||
config.show_registration_button=Visa registreringsknapp
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=Bu e-posta adresi hiçbir hesap ile ilişkilendirilmemiştir
|
|||
send_reset_mail=Parola sıfırlama e-postasını (yeniden) göndermek için buraya tıklayın
|
||||
reset_password=Parolanızı Sıfırlayın
|
||||
reset_password_helper=Parolanızı sıfırlamak için buraya tıklayın
|
||||
password_too_short=Parola uzunluğu %d karakterden az olamaz.
|
||||
verify=Doğrula
|
||||
scratch_code=Çizgi kodu
|
||||
use_scratch_code=Bir çizgi kodu kullanınız
|
||||
|
|
@ -802,9 +801,7 @@ config.db_config=Veritabanı Yapılandırması
|
|||
config.db_type=Türü
|
||||
config.db_host=Sunucu
|
||||
config.db_name=İsim
|
||||
config.db_ssl_mode_helper=(sadece "postgres" için)
|
||||
config.db_path=Yol
|
||||
config.db_path_helper=("sqlite3" ve "tidb" için)
|
||||
|
||||
config.service_config=Servis Yapılandırması
|
||||
config.show_registration_button=Kaydolma Tuşunu Göster
|
||||
|
|
|
|||
|
|
@ -31,6 +31,14 @@ twofa=Двофакторна авторизація
|
|||
twofa_scratch=Двофакторний одноразовий пароль
|
||||
passcode=Код доступу
|
||||
|
||||
u2f_insert_key=Вставте ключ безпеки
|
||||
u2f_sign_in=Натисніть кнопку на ключі безпеки. Якщо не вдається знайти кнопки, повторно вставте ключ.
|
||||
u2f_press_button=Будь ласка, натисніть кнопку на ключі захисту...
|
||||
u2f_use_twofa=Використовуйте дво-факторний код з вашого телефону
|
||||
u2f_error=Неможливо прочитати ваш ключ безпеки!
|
||||
u2f_unsupported_browser=Ваш браузер не підтримує U2F ключі. Будь ласка, спробуйте інший браузер.
|
||||
u2f_error_1=Сталася невідома помилка. Спробуйте ще раз.
|
||||
u2f_error_3=Сервер не може обробити, ваш запит.
|
||||
u2f_reload=Оновити
|
||||
|
||||
repository=Репозиторій
|
||||
|
|
@ -131,6 +139,7 @@ confirm_password=Підтвердження пароля
|
|||
admin_email=Адреса електронної пошти
|
||||
install_btn_confirm=Встановлення Gitea
|
||||
test_git_failed=Не в змозі перевірити 'git' команду: %v
|
||||
invalid_db_setting=Налаштування бази даних є некоректними: %v
|
||||
save_config_failed=Не в змозі зберегти конфігурацію: %v
|
||||
invalid_admin_setting=Неприпустимі налаштування облікового запису адміністратора: %v
|
||||
install_success=Ласкаво просимо! Дякуємо вам за вибір Gitea. Розважайтеся, і будьте обережні!
|
||||
|
|
@ -190,7 +199,6 @@ send_reset_mail=Натисніть сюди, щоб відправити лис
|
|||
reset_password=Скинути пароль
|
||||
invalid_code=Цей код підтвердження недійсний або закінчився.
|
||||
reset_password_helper=Натисніть тут для скидання пароля
|
||||
password_too_short=Довжина пароля не може бути меншою за %d.
|
||||
non_local_account=Нелокальні акаунти не можуть змінити пароль через Gitea.
|
||||
verify=Підтвердити
|
||||
scratch_code=Одноразовий пароль
|
||||
|
|
@ -256,8 +264,14 @@ team_name_been_taken=Назва команди вже зайнято.
|
|||
email_been_used=Ця електронна адреса вже використовується.
|
||||
openid_been_used=OpenID адреса '%s' вже використовується.
|
||||
username_password_incorrect=Неправильне ім'я користувача або пароль.
|
||||
enterred_invalid_repo_name=Невірно введено ім'я репозиторію.
|
||||
enterred_invalid_owner_name=Ім'я нового власника не є дійсним.
|
||||
enterred_invalid_password=Введений вами пароль некоректний.
|
||||
user_not_exist=Даний користувач не існує.
|
||||
cannot_add_org_to_team=Організацію неможливо додати як учасника команди.
|
||||
|
||||
invalid_ssh_key=Неможливо перевірити ваш SSH ключ: %s
|
||||
invalid_gpg_key=Неможливо перевірити ваш GPG ключ: %s
|
||||
auth_failed=Помилка автентифікації: %v
|
||||
|
||||
|
||||
|
|
@ -292,6 +306,7 @@ twofa=Двофакторна авторизація
|
|||
account_link=Прив'язані облікові записи
|
||||
organization=Організації
|
||||
uid=Ідентифікатор Uid
|
||||
u2f=Ключі безпеки
|
||||
|
||||
public_profile=Загальнодоступний профіль
|
||||
profile_desc=Ваша адреса електронної пошти використовуватиметься для сповіщення та інших операцій.
|
||||
|
|
@ -305,6 +320,7 @@ continue=Продовжити
|
|||
cancel=Відміна
|
||||
language=Мова
|
||||
|
||||
lookup_avatar_by_mail=Знайти Аватар за адресою електронної пошти
|
||||
federated_avatar_lookup=Знайти зовнішній аватар
|
||||
enable_custom_avatar=Увімкнути користувацькі аватари
|
||||
choose_new_avatar=Оберіть новий аватар
|
||||
|
|
@ -328,9 +344,13 @@ primary=Основний
|
|||
primary_email=Зробити основним
|
||||
delete_email=Видалити
|
||||
email_deletion=Видалити адресу електронної пошти
|
||||
openid_deletion=Видалити адресу OpenID
|
||||
add_new_email=Додати нову адресу електронної пошти
|
||||
add_new_openid=Додати новий OpenID URI
|
||||
add_email=Додати адресу електронної пошти
|
||||
add_openid=Додати OpenID URI
|
||||
add_email_confirmation_sent=Електронний лист із підтвердженням було відправлено на '%s', будь ласка, перевірте вашу поштову скриньку протягом наступних %s, щоб підтвердити адресу.
|
||||
add_email_success=Додано нову адресу електронної пошти.
|
||||
keep_email_private=Приховати адресу електронної пошти
|
||||
keep_email_private_popup=Вашу адресу електронної пошти буде приховано від інших користувачів.
|
||||
|
||||
|
|
@ -345,6 +365,8 @@ subkeys=Підключі
|
|||
key_id=ID ключа
|
||||
key_name=Ім'я ключа
|
||||
key_content=Зміст
|
||||
add_key_success=SSH ключ '%s' додано.
|
||||
add_gpg_key_success=GPG ключ '%s' додано.
|
||||
delete_key=Видалити
|
||||
ssh_key_deletion=Видалити SSH ключ
|
||||
gpg_key_deletion=Видалити GPG ключ
|
||||
|
|
@ -378,15 +400,20 @@ access_token_deletion=Видалити токен доступу
|
|||
|
||||
twofa_disable=Вимкнути двофакторну автентифікацію
|
||||
or_enter_secret=Або введіть секрет: %s
|
||||
passcode_invalid=Некоректний пароль. Спробуй ще раз.
|
||||
|
||||
u2f_register_key=Додати ключ безпеки
|
||||
u2f_nickname=Псевдонім
|
||||
u2f_delete_key=Видалити ключ безпеки
|
||||
|
||||
manage_account_links=Керування обліковими записами
|
||||
remove_account_link=Видалити облікові записи
|
||||
|
||||
orgs_none=Ви не є учасником будь-якої організації.
|
||||
repos_none=У вас немає власних репозиторіїв
|
||||
|
||||
delete_account=Видалити ваш обліковий запис
|
||||
delete_prompt=Ця операція остаточно видалить обліковий запис користувача. Це <strong>НЕ МОЖЛИВО</strong> відмінити.
|
||||
confirm_delete_account=Підтвердження видалення
|
||||
delete_account_title=Видалити цей обліковий запис
|
||||
|
||||
|
|
@ -410,6 +437,7 @@ create_repo=Створити репозиторій
|
|||
default_branch=Головна гілка
|
||||
mirror_prune=Очистити
|
||||
mirror_interval=Інтервал дзеркалювання (доступні значення 'h', 'm', 's')
|
||||
mirror_interval_invalid=Інтервал дзеркалювання є неприпустимим.
|
||||
mirror_address=Клонування з URL-адреси
|
||||
mirror_last_synced=Остання синхронізація
|
||||
watchers=Спостерігачі
|
||||
|
|
@ -419,11 +447,12 @@ pick_reaction=Залиште свою оцінку
|
|||
reactions_more=додати %d більше
|
||||
|
||||
form.reach_limit_of_creation=Ви досягли максимальної кількості %d створених репозиторіїв.
|
||||
form.name_reserved=Назву репозиторію '%s' зарезервовано.
|
||||
|
||||
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=або шлях до локального серверу
|
||||
|
|
@ -435,6 +464,7 @@ mirror_from=дзеркало
|
|||
forked_from=форк від
|
||||
fork_from_self=Ви не можете форкнути репозиторій, так як ви його власник.
|
||||
copy_link=Копіювати
|
||||
copy_link_success=Посилання було скопійоване
|
||||
copy_link_error=Натисніть ⌘-C або Ctrl-C, щоб скопіювати
|
||||
copied=Скопійовано
|
||||
unwatch=Не стежити
|
||||
|
|
@ -462,12 +492,14 @@ pulls=Запити на злиття
|
|||
labels=Мітки
|
||||
milestones=Етап
|
||||
commits=Коміти
|
||||
commit=Змина
|
||||
commit=Коміт
|
||||
releases=Релізи
|
||||
file_raw=Неформатований
|
||||
file_history=Історія
|
||||
file_view_raw=Перегляд Raw
|
||||
file_permalink=Постійне посилання
|
||||
file_too_large=Цей файл завеликий щоб бути показаним.
|
||||
video_not_supported_in_browser=Ваш браузер не підтримує тег 'video' HTML5.
|
||||
stored_lfs=Збережено з Git LFS
|
||||
commit_graph=Графік комітів
|
||||
|
||||
|
|
@ -475,11 +507,13 @@ editor.new_file=Новий файл
|
|||
editor.upload_file=Завантажити файл
|
||||
editor.edit_file=Редагування файлу
|
||||
editor.preview_changes=Попередній перегляд змін
|
||||
editor.cannot_edit_non_text_files=Бінарні файли не можливо редагувати у веб-інтерфейсі.
|
||||
editor.edit_this_file=Редагувати файл
|
||||
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=Скасувати
|
||||
|
|
@ -493,7 +527,10 @@ editor.commit_directly_to_this_branch=Зробіть коміт прямо в г
|
|||
editor.create_new_branch=Створити <strong>нову гілку</strong> для цього коміту та відкрити запит на злиття.
|
||||
editor.new_branch_name_desc=Ім'я нової гілки…
|
||||
editor.cancel=Відміна
|
||||
editor.filename_cannot_be_empty=Ім'я файлу не може бути порожнім.
|
||||
editor.branch_already_exists=Гілка '%s' вже присутня в репозиторії.
|
||||
editor.directory_is_a_file=Ім'я каталогу "%s" уже використовується як ім'я файлу в цьому репозиторії.
|
||||
editor.file_already_exists=Файл з назвою "%s" уже існує у цьому репозиторію.
|
||||
editor.no_changes_to_show=Нема змін для показу.
|
||||
editor.fail_to_update_file=Не вдалося оновити/створити файл '%s' через помилку: %v
|
||||
editor.add_subdir=Додати каталог…
|
||||
|
|
@ -509,6 +546,7 @@ commits.message=Повідомлення
|
|||
commits.date=Дата
|
||||
commits.older=Давніше
|
||||
commits.newer=Новіше
|
||||
commits.signed_by=Підписано
|
||||
|
||||
ext_issues=Зов. Проблеми
|
||||
|
||||
|
|
@ -559,6 +597,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=Мітка
|
||||
|
|
@ -600,6 +639,7 @@ issues.label_edit=Редагувати
|
|||
issues.label_delete=Видалити
|
||||
issues.label_modify=Редагувати мітку
|
||||
issues.label_deletion=Видалити мітку
|
||||
issues.label_deletion_success=Мітку було видалено.
|
||||
issues.label.filter_sort.alphabetically=За алфавітом
|
||||
issues.label.filter_sort.reverse_alphabetically=З кінця алфавіту
|
||||
issues.label.filter_sort.by_size=Розмір
|
||||
|
|
@ -653,6 +693,8 @@ pulls.has_merged=Запит на злиття було об'єднано.
|
|||
pulls.can_auto_merge_desc=Цей запит можна об'єднати автоматично.
|
||||
pulls.cannot_auto_merge_desc=Цей запит на злиття не може бути злитий автоматично через конфлікти.
|
||||
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 +797,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 +826,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=Пошук користувача…
|
||||
|
|
@ -844,6 +888,8 @@ settings.add_deploy_key=Додати ключ для розгортування
|
|||
settings.is_writable=Увімкнути доступ для запису
|
||||
settings.title=Заголовок
|
||||
settings.deploy_key_content=Зміст
|
||||
settings.deploy_key_deletion=Видалити ключ для розгортування
|
||||
settings.deploy_key_deletion_success=Ключі розгортання було видалено.
|
||||
settings.branches=Гілки
|
||||
settings.protected_branch=Захист гілки
|
||||
settings.protected_branch_can_push=Дозволити push?
|
||||
|
|
@ -853,6 +899,7 @@ settings.protect_whitelist_search_users=Пошук користувачів…
|
|||
settings.protect_whitelist_search_teams=Пошук команд…
|
||||
settings.add_protected_branch=Увімкнути захист
|
||||
settings.delete_protected_branch=Вимкнути захист
|
||||
settings.protected_branch_deletion=Відключити захист гілки
|
||||
settings.choose_branch=Оберіть гілку…
|
||||
settings.no_protected_branch=Немає захищених гілок.
|
||||
|
||||
|
|
@ -892,6 +939,8 @@ release.save_draft=Зберегти чернетку
|
|||
release.edit_release=Оновити реліз
|
||||
release.delete_release=Видалити реліз
|
||||
release.deletion=Видалити реліз
|
||||
release.deletion_success=Реліз, було видалено.
|
||||
release.tag_name_invalid=Неприпустиме ім'я тега.
|
||||
release.downloads=Завантажити
|
||||
|
||||
branch.name=Ім'я гілки
|
||||
|
|
@ -899,9 +948,13 @@ branch.search=Пошук гілок
|
|||
branch.delete_head=Видалити
|
||||
branch.delete=Видалити гілку '%s'
|
||||
branch.delete_html=Видалити гілку
|
||||
branch.deletion_success=Гілка '%s' видалена.
|
||||
branch.deletion_failed=Не вдалося видалити гілку "%s".
|
||||
branch.create_from=з '%s'
|
||||
branch.create_success=Створено гілку "%s".
|
||||
branch.branch_already_exists=Гілка '%s' вже присутня в репозиторії.
|
||||
branch.deleted_by=Видалено %s
|
||||
branch.restore_success=Гілку "%s" відновлено.
|
||||
|
||||
topic.manage_topics=Керувати тематичними мітками
|
||||
topic.done=Готово
|
||||
|
|
@ -921,9 +974,11 @@ org_desc=Опис
|
|||
team_name=Назва команди
|
||||
team_desc=Опис
|
||||
team_name_helper=Назва команди має бути простою та зрозумілою.
|
||||
team_desc_helper=Опишіть мету або роль команди.
|
||||
team_permission_desc=Права доступу
|
||||
team_unit_desc=Дозволити доступ до розділів репозиторію
|
||||
|
||||
form.name_reserved=Назву організації '%s' зарезервовано.
|
||||
|
||||
settings=Налаштування
|
||||
settings.options=Організація
|
||||
|
|
@ -931,6 +986,9 @@ settings.full_name=Повне ім'я
|
|||
settings.website=Веб-сайт
|
||||
settings.location=Розташування
|
||||
settings.update_settings=Оновити налаштування
|
||||
settings.update_setting_success=Налаштування організації оновлені.
|
||||
settings.change_orgname_prompt=Ця зміна змінить посилання на організацію.
|
||||
settings.update_avatar_success=Аватар організації оновлений.
|
||||
settings.delete=Видалити організацію
|
||||
settings.delete_account=Видалити цю організацію
|
||||
settings.confirm_delete_account=Підтвердіть видалення
|
||||
|
|
@ -962,6 +1020,7 @@ teams.update_settings=Оновити налаштування
|
|||
teams.delete_team=Видалити команду
|
||||
teams.add_team_member=Додати учасника команди
|
||||
teams.delete_team_title=Видалити команду
|
||||
teams.delete_team_success=Команду було видалено.
|
||||
teams.read_permission_desc=Ця команда має доступ для <strong>читання</strong>: учасники можуть переглядати та клонувати репозиторії.
|
||||
teams.write_permission_desc=Ця команда надає доступ на <strong>запис</strong>: учасники можуть отримувати й виконувати push команди до репозитрію.
|
||||
teams.admin_permission_desc=Ця команда надає <strong>адміністраторський</strong> доступ: учасники можуть читати, виконувати push команди та додавати співробітників до репозиторію.
|
||||
|
|
@ -985,23 +1044,29 @@ 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_goroutine=Поточна кількість Goroutines
|
||||
dashboard.current_memory_usage=Поточне використання пам'яті
|
||||
dashboard.total_memory_allocated=Виділено пам'яті загалом
|
||||
dashboard.memory_obtained=Отримано пам'яті
|
||||
dashboard.pointer_lookup_times=Пошуків вказівника
|
||||
dashboard.memory_allocate_times=Виділення пам'яті
|
||||
dashboard.current_heap_usage=Поточне використання динамічної пам'яті
|
||||
dashboard.heap_memory_obtained=Отримано динамічної пам'яті
|
||||
dashboard.heap_memory_idle=Не використовується динамічною пам'яттю
|
||||
dashboard.heap_memory_in_use=Використовується динамічною пам'яттю
|
||||
dashboard.heap_memory_released=Звільнено динамічної пам'яті
|
||||
dashboard.heap_objects=Об'єктів динамічної пам'яті
|
||||
dashboard.bootstrap_stack_usage=Використання стеку Bootstrap
|
||||
dashboard.stack_memory_obtained=Зайнято пам'яті стеком
|
||||
dashboard.mspan_structures_usage=Використання структур MSpan
|
||||
dashboard.mspan_structures_obtained=Отримано структур MSpan
|
||||
|
|
@ -1029,6 +1094,7 @@ users.send_register_notify=Надіслати повідомлення про р
|
|||
users.edit=Редагувати
|
||||
users.auth_source=Джерело автентифікації
|
||||
users.local=Локальні
|
||||
users.update_profile_success=Обліковий запис користувача було оновлено.
|
||||
users.edit_account=Редагувати обліковий запис
|
||||
users.max_repo_creation=Максимальна кількість репозиторіїв
|
||||
users.max_repo_creation_desc=(Введіть -1, щоб використовувати глобальний ліміт за замовчуванням.)
|
||||
|
|
@ -1040,6 +1106,7 @@ users.allow_import_local=Може імпортувати локальні реп
|
|||
users.allow_create_organization=Може створювати організацій
|
||||
users.update_profile=Оновити обліковий запис
|
||||
users.delete_account=Видалити цей обліковий запис
|
||||
users.deletion_success=Обліковий запис користувача було видалено.
|
||||
|
||||
orgs.org_manage_panel=Керування організаціями
|
||||
orgs.name=Назва
|
||||
|
|
@ -1047,7 +1114,7 @@ orgs.teams=Команди
|
|||
orgs.members=Учасники
|
||||
orgs.new_orga=Нова організація
|
||||
|
||||
repos.repo_manage_panel=Керування організаціями
|
||||
repos.repo_manage_panel=Керування репозиторіями
|
||||
repos.owner=Власник
|
||||
repos.name=Назва
|
||||
repos.private=Приватний
|
||||
|
|
@ -1062,6 +1129,7 @@ auths.new=Додати джерело автентифікації
|
|||
auths.name=Ім'я
|
||||
auths.type=Тип
|
||||
auths.enabled=Увімкнено
|
||||
auths.syncenabled=Увімкнути синхронізацію користувача
|
||||
auths.updated=Оновлено
|
||||
auths.auth_type=Тип автентифікації
|
||||
auths.auth_name=Назва автентифікації
|
||||
|
|
@ -1069,8 +1137,11 @@ auths.security_protocol=Протокол безпеки
|
|||
auths.domain=Домен
|
||||
auths.host=Хост
|
||||
auths.port=Порт
|
||||
auths.bind_dn=Прив'язати DN
|
||||
auths.bind_password=Прив'язати пароль
|
||||
auths.user_base=База пошуку користувачів
|
||||
auths.user_dn=DN користувача
|
||||
auths.attribute_username=Атрибут імені користувача
|
||||
auths.search_page_size=Розмір сторінки
|
||||
auths.filter=Користувацький фільтр
|
||||
auths.admin_filter=Фільтр адміністратора
|
||||
|
|
@ -1082,6 +1153,7 @@ auths.enable_tls=Увімкнути TLS-шифрування
|
|||
auths.skip_tls_verify=Пропустити перевірку TLS
|
||||
auths.pam_service_name=Ім'я служби PAM
|
||||
auths.oauth2_provider=Постачальник OAuth2
|
||||
auths.oauth2_clientID=ID клієнта (ключ)
|
||||
auths.oauth2_clientSecret=Ключ клієнта
|
||||
auths.oauth2_tokenURL=URL токену
|
||||
auths.oauth2_authURL=URL авторизації
|
||||
|
|
@ -1121,6 +1193,7 @@ config.script_type=Тип скрипта
|
|||
|
||||
config.ssh_config=Конфігурація SSH
|
||||
config.ssh_enabled=Увімкнено
|
||||
config.ssh_start_builtin_server=Використовувати вбудований сервер
|
||||
config.ssh_domain=Домен сервера
|
||||
config.ssh_port=Порт
|
||||
config.ssh_listen_port=Порт що прослуховується
|
||||
|
|
@ -1136,9 +1209,7 @@ config.db_host=Хост
|
|||
config.db_name=Ім'я
|
||||
config.db_user=Ім'я кристувача
|
||||
config.db_ssl_mode=SSL
|
||||
config.db_ssl_mode_helper=(тільки для "postgres")
|
||||
config.db_path=Шлях
|
||||
config.db_path_helper=(для "sqlite3" і "tidb")
|
||||
|
||||
config.service_config=Конфігурація сервісу
|
||||
config.register_email_confirm=Потрібно підтвердити електронну пошту для реєстрації
|
||||
|
|
@ -1189,6 +1260,7 @@ config.session_life_time=Час життя сесії
|
|||
config.https_only=Тільки HTTPS
|
||||
config.cookie_life_time=Час життя cookie-файлу
|
||||
|
||||
config.picture_config=Налаштування фотографії або аватари
|
||||
config.picture_service=Сервіс зображень
|
||||
config.disable_gravatar=Вимкнути Gravatar
|
||||
config.enable_federated_avatar=Увімкнути зовнішні аватари
|
||||
|
|
@ -1213,12 +1285,14 @@ monitor.name=Ім'я
|
|||
monitor.schedule=Розклад
|
||||
monitor.next=Наступного разу
|
||||
monitor.previous=Попереднього разу
|
||||
monitor.execute_times=Кількість виконань
|
||||
monitor.process=Запущені процеси
|
||||
monitor.desc=Опис
|
||||
monitor.start=Час початку
|
||||
monitor.execute_time=Час виконання
|
||||
|
||||
notices.system_notice_list=Сповіщення системи
|
||||
notices.view_detail_header=Переглянути деталі повідомлення
|
||||
notices.actions=Дії
|
||||
notices.select_all=Вибрати все
|
||||
notices.deselect_all=Скасувати виділення
|
||||
|
|
@ -1273,6 +1347,7 @@ raw_minutes=хвилини
|
|||
|
||||
[dropzone]
|
||||
default_message=Перетягніть файли або натисніть тут, щоб завантажити.
|
||||
invalid_input_type=Ви не можете завантажувати файли цього типу.
|
||||
file_too_big=Розмір файлу ({{filesize}} MB), що більше ніж максимальний розмір: ({{maxFilesize}} MB).
|
||||
remove_file=Видалити файл
|
||||
|
||||
|
|
@ -1288,6 +1363,7 @@ mark_as_unread=Позначити як непрочитане
|
|||
mark_all_as_read=Позначити всі як прочитані
|
||||
|
||||
[gpg]
|
||||
error.generate_hash=Не вдалося згенерувати хеш коміту
|
||||
error.not_signed_commit=Непідписаний коміт
|
||||
|
||||
[units]
|
||||
|
|
|
|||
|
|
@ -213,7 +213,6 @@ send_reset_mail=单击此处(重新)发送您的密码重置邮件
|
|||
reset_password=重置密码
|
||||
invalid_code=此确认密钥无效或已过期。
|
||||
reset_password_helper=单击此处重置密码
|
||||
password_too_short=密码长度不能少于 %d 位!
|
||||
non_local_account=非本地帐户不能通过 Gitea 的 web 界面更改密码。
|
||||
verify=验证
|
||||
scratch_code=验证口令
|
||||
|
|
@ -1475,9 +1474,7 @@ config.db_host=主机
|
|||
config.db_name=数据库名称
|
||||
config.db_user=用户名
|
||||
config.db_ssl_mode=SSL
|
||||
config.db_ssl_mode_helper=(仅限 "postgres" 使用)
|
||||
config.db_path=数据库路径
|
||||
config.db_path_helper=(用于 "sqlite3" 和 "tidb")
|
||||
|
||||
config.service_config=服务配置
|
||||
config.register_email_confirm=需要电子邮件确认注册
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ email_not_associate=此電子郵件地址未與任何帳戶連結
|
|||
send_reset_mail=點選此處重發您的密碼重製郵件
|
||||
reset_password=重置密碼
|
||||
reset_password_helper=單擊此處重置密碼
|
||||
password_too_short=密碼長度不能少於 %d 位!
|
||||
verify=驗證
|
||||
scratch_code=備用碼
|
||||
use_scratch_code=使用備用碼
|
||||
|
|
@ -737,9 +736,7 @@ config.db_config=資料庫設定
|
|||
config.db_type=資料庫類型
|
||||
config.db_host=主機地址
|
||||
config.db_name=資料庫名稱
|
||||
config.db_ssl_mode_helper=(僅限 "postgres" 使用)
|
||||
config.db_path=資料庫路徑
|
||||
config.db_path_helper=(用於 "sqlite3" 和 "tidb")
|
||||
|
||||
config.service_config=服務設定
|
||||
config.show_registration_button=顯示註冊按鈕
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ email_not_associate=此電子郵件地址未與任何帳戶連結
|
|||
send_reset_mail=點選此處重發您的密碼重製郵件
|
||||
reset_password=重置密碼
|
||||
reset_password_helper=單擊此處重置密碼
|
||||
password_too_short=密碼長度不能少於 %d 位!
|
||||
verify=驗證
|
||||
scratch_code=備用碼
|
||||
use_scratch_code=使用備用碼
|
||||
|
|
@ -808,9 +807,7 @@ config.db_config=資料庫設定
|
|||
config.db_type=資料庫類型
|
||||
config.db_host=主機地址
|
||||
config.db_name=資料庫名稱
|
||||
config.db_ssl_mode_helper=(僅限 "postgres" 使用)
|
||||
config.db_path=資料庫路徑
|
||||
config.db_path_helper=(用於 "sqlite3" 和 "tidb")
|
||||
|
||||
config.service_config=服務設定
|
||||
config.show_registration_button=顯示註冊按鈕
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,10 @@
|
|||
line-height: 1.6 !important;
|
||||
word-wrap: break-word;
|
||||
|
||||
&.ui.segment {
|
||||
padding: 3em;
|
||||
}
|
||||
|
||||
&.file-view {
|
||||
padding: 2em 2em 2em !important;
|
||||
}
|
||||
|
|
|
|||
551
public/swagger.v1.json
vendored
551
public/swagger.v1.json
vendored
|
|
@ -321,9 +321,13 @@
|
|||
"operationId": "renderMarkdownRaw",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Request body to render",
|
||||
"name": "body",
|
||||
"in": "body"
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -448,6 +452,15 @@
|
|||
],
|
||||
"summary": "List an organization's webhooks",
|
||||
"operationId": "orgListHooks",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the organization",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/HookList"
|
||||
|
|
@ -468,6 +481,15 @@
|
|||
],
|
||||
"summary": "Create a hook",
|
||||
"operationId": "orgCreateHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the organization",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"$ref": "#/responses/Hook"
|
||||
|
|
@ -485,6 +507,22 @@
|
|||
],
|
||||
"summary": "Get a hook",
|
||||
"operationId": "orgGetHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the organization",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the hook to get",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Hook"
|
||||
|
|
@ -500,6 +538,22 @@
|
|||
],
|
||||
"summary": "Delete a hook",
|
||||
"operationId": "orgDeleteHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the organization",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the hook to delete",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
|
|
@ -518,6 +572,22 @@
|
|||
],
|
||||
"summary": "Update a hook",
|
||||
"operationId": "orgEditHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the organization",
|
||||
"name": "org",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the hook to update",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Hook"
|
||||
|
|
@ -994,7 +1064,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/archive/{filepath}": {
|
||||
"/repos/{owner}/{repo}/archive/{archive}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
|
@ -1028,7 +1098,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1338,7 +1410,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -1526,6 +1600,47 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Delete a hook in a repository",
|
||||
"operationId": "repoDeleteHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the hook to delete",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
|
@ -1550,6 +1665,13 @@
|
|||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the hook",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
|
|
@ -1821,6 +1943,100 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/issues/{id}/times": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"issue"
|
||||
],
|
||||
"summary": "List an issue's tracked times",
|
||||
"operationId": "issueTrackedTimes",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/TrackedTimeList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"issue"
|
||||
],
|
||||
"summary": "Add a tracked time to a issue",
|
||||
"operationId": "issueAddTime",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue to add tracked time to",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AddTimeOption"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/TrackedTime"
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/issues/{index}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
|
@ -1937,7 +2153,7 @@
|
|||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue",
|
||||
"name": "id",
|
||||
"name": "index",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
|
|
@ -1984,7 +2200,7 @@
|
|||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue",
|
||||
"name": "id",
|
||||
"name": "index",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
|
|
@ -2328,100 +2544,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/issues/{index}/times": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"issue"
|
||||
],
|
||||
"summary": "List an issue's tracked times",
|
||||
"operationId": "issueTrackedTimes",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/TrackedTimeList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"issue"
|
||||
],
|
||||
"summary": "Add a tracked time to a issue",
|
||||
"operationId": "issueAddTime",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "index of the issue to add tracked time to",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AddTimeOption"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/TrackedTime"
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/responses/error"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/keys": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
|
@ -2777,7 +2899,7 @@
|
|||
"issue"
|
||||
],
|
||||
"summary": "Get all of a repository's milestones",
|
||||
"operationId": "issueGetMilestones",
|
||||
"operationId": "issueGetMilestonesList",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
|
|
@ -2792,13 +2914,6 @@
|
|||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the milestone to get",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -2859,6 +2974,29 @@
|
|||
],
|
||||
"summary": "Get a milestone",
|
||||
"operationId": "issueGetMilestone",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the milestone",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/Milestone"
|
||||
|
|
@ -2889,7 +3027,7 @@
|
|||
{
|
||||
"type": "integer",
|
||||
"description": "id of the milestone to delete",
|
||||
"name": "body",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
|
|
@ -2927,6 +3065,13 @@
|
|||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the milestone",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
|
|
@ -3261,7 +3406,9 @@
|
|||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {}
|
||||
"200": {
|
||||
"description": "success"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -3973,7 +4120,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/times/{tracker}": {
|
||||
"/repos/{owner}/{repo}/times/{user}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
|
@ -4013,49 +4160,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/repos/{user}/{repo}/hooks/{id}": {
|
||||
"delete": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Delete a hook in a repository",
|
||||
"operationId": "repoDeleteHook",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the hook to delete",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"$ref": "#/responses/empty"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repositories/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
|
@ -4232,7 +4336,7 @@
|
|||
"organization"
|
||||
],
|
||||
"summary": "Remove a team member",
|
||||
"operationId": "orgAddTeamMember",
|
||||
"operationId": "orgRemoveTeamMember",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
|
|
@ -4291,7 +4395,7 @@
|
|||
"organization"
|
||||
],
|
||||
"summary": "Add a repository to a team",
|
||||
"operationId": "orgAddTeamMember",
|
||||
"operationId": "orgAddTeamRepository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
|
|
@ -4330,7 +4434,7 @@
|
|||
"organization"
|
||||
],
|
||||
"summary": "Remove a repository from a team",
|
||||
"operationId": "orgAddTeamMember",
|
||||
"operationId": "orgRemoveTeamRepository",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
|
|
@ -4373,10 +4477,10 @@
|
|||
"operationId": "topicSearch",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "id of the repo to get",
|
||||
"name": "keyword",
|
||||
"in": "path",
|
||||
"type": "string",
|
||||
"description": "keywords to search",
|
||||
"name": "q",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
|
|
@ -4503,7 +4607,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/user/following/{followee}": {
|
||||
"/user/following/{username}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"user"
|
||||
|
|
@ -4514,7 +4618,7 @@
|
|||
{
|
||||
"type": "string",
|
||||
"description": "username of followed user",
|
||||
"name": "followee",
|
||||
"name": "username",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
|
|
@ -4527,9 +4631,7 @@
|
|||
"$ref": "#/responses/notFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user/following/{username}": {
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"user"
|
||||
|
|
@ -4999,7 +5101,8 @@
|
|||
"type": "string",
|
||||
"description": "username of user",
|
||||
"name": "username",
|
||||
"in": "path"
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -5273,7 +5376,8 @@
|
|||
"type": "string",
|
||||
"description": "username of the user",
|
||||
"name": "username",
|
||||
"in": "path"
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -5293,6 +5397,15 @@
|
|||
],
|
||||
"summary": "List the authenticated user's access tokens",
|
||||
"operationId": "userGetTokens",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "username of user",
|
||||
"name": "username",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/AccessTokenList"
|
||||
|
|
@ -5315,8 +5428,10 @@
|
|||
{
|
||||
"type": "string",
|
||||
"x-go-name": "Name",
|
||||
"name": "name",
|
||||
"in": "query"
|
||||
"description": "username of user",
|
||||
"name": "username",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
|
@ -7376,11 +7491,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 +7506,13 @@
|
|||
}
|
||||
},
|
||||
"Branch": {
|
||||
"description": "Branch",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Branch"
|
||||
}
|
||||
},
|
||||
"BranchList": {
|
||||
"description": "BranchList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7402,11 +7521,13 @@
|
|||
}
|
||||
},
|
||||
"Comment": {
|
||||
"description": "Comment",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Comment"
|
||||
}
|
||||
},
|
||||
"CommentList": {
|
||||
"description": "CommentList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7415,11 +7536,13 @@
|
|||
}
|
||||
},
|
||||
"DeployKey": {
|
||||
"description": "DeployKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/DeployKey"
|
||||
}
|
||||
},
|
||||
"DeployKeyList": {
|
||||
"description": "DeployKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7428,6 +7551,7 @@
|
|||
}
|
||||
},
|
||||
"EmailList": {
|
||||
"description": "EmailList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7436,11 +7560,13 @@
|
|||
}
|
||||
},
|
||||
"GPGKey": {
|
||||
"description": "GPGKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GPGKey"
|
||||
}
|
||||
},
|
||||
"GPGKeyList": {
|
||||
"description": "GPGKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7449,6 +7575,7 @@
|
|||
}
|
||||
},
|
||||
"Hook": {
|
||||
"description": "Hook",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7457,6 +7584,7 @@
|
|||
}
|
||||
},
|
||||
"HookList": {
|
||||
"description": "HookList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7465,11 +7593,13 @@
|
|||
}
|
||||
},
|
||||
"Issue": {
|
||||
"description": "Issue",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Issue"
|
||||
}
|
||||
},
|
||||
"IssueList": {
|
||||
"description": "IssueList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7478,11 +7608,13 @@
|
|||
}
|
||||
},
|
||||
"Label": {
|
||||
"description": "Label",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Label"
|
||||
}
|
||||
},
|
||||
"LabelList": {
|
||||
"description": "LabelList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7494,11 +7626,13 @@
|
|||
"description": "MarkdownRender is a rendered markdown document"
|
||||
},
|
||||
"Milestone": {
|
||||
"description": "Milestone",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Milestone"
|
||||
}
|
||||
},
|
||||
"MilestoneList": {
|
||||
"description": "MilestoneList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7507,11 +7641,13 @@
|
|||
}
|
||||
},
|
||||
"Organization": {
|
||||
"description": "Organization",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Organization"
|
||||
}
|
||||
},
|
||||
"OrganizationList": {
|
||||
"description": "OrganizationList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7520,11 +7656,13 @@
|
|||
}
|
||||
},
|
||||
"PublicKey": {
|
||||
"description": "PublicKey",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PublicKey"
|
||||
}
|
||||
},
|
||||
"PublicKeyList": {
|
||||
"description": "PublicKeyList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7533,11 +7671,13 @@
|
|||
}
|
||||
},
|
||||
"PullRequest": {
|
||||
"description": "PullRequest",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PullRequest"
|
||||
}
|
||||
},
|
||||
"PullRequestList": {
|
||||
"description": "PullRequestList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7546,11 +7686,13 @@
|
|||
}
|
||||
},
|
||||
"Release": {
|
||||
"description": "Release",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Release"
|
||||
}
|
||||
},
|
||||
"ReleaseList": {
|
||||
"description": "ReleaseList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7559,11 +7701,13 @@
|
|||
}
|
||||
},
|
||||
"Repository": {
|
||||
"description": "Repository",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Repository"
|
||||
}
|
||||
},
|
||||
"RepositoryList": {
|
||||
"description": "RepositoryList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7572,24 +7716,25 @@
|
|||
}
|
||||
},
|
||||
"SearchResults": {
|
||||
"description": "SearchResults",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchResults"
|
||||
},
|
||||
"headers": {
|
||||
"body": {}
|
||||
}
|
||||
},
|
||||
"ServerVersion": {
|
||||
"description": "ServerVersion",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/ServerVersion"
|
||||
}
|
||||
},
|
||||
"Status": {
|
||||
"description": "Status",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Status"
|
||||
}
|
||||
},
|
||||
"StatusList": {
|
||||
"description": "StatusList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7598,11 +7743,13 @@
|
|||
}
|
||||
},
|
||||
"Team": {
|
||||
"description": "Team",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Team"
|
||||
}
|
||||
},
|
||||
"TeamList": {
|
||||
"description": "TeamList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7611,11 +7758,13 @@
|
|||
}
|
||||
},
|
||||
"TrackedTime": {
|
||||
"description": "TrackedTime",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TrackedTime"
|
||||
}
|
||||
},
|
||||
"TrackedTimeList": {
|
||||
"description": "TrackedTimeList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7624,11 +7773,13 @@
|
|||
}
|
||||
},
|
||||
"User": {
|
||||
"description": "User",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/User"
|
||||
}
|
||||
},
|
||||
"UserList": {
|
||||
"description": "UserList",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
@ -7637,6 +7788,7 @@
|
|||
}
|
||||
},
|
||||
"WatchInfo": {
|
||||
"description": "WatchInfo",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/WatchInfo"
|
||||
}
|
||||
|
|
@ -7670,42 +7822,9 @@
|
|||
"description": "APINotFound is a not found empty response"
|
||||
},
|
||||
"parameterBodies": {
|
||||
"description": "parameterBodies",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/EditAttachmentOptions"
|
||||
},
|
||||
"headers": {
|
||||
"AddCollaboratorOption": {},
|
||||
"AddTimeOption": {},
|
||||
"CreateEmailOption": {},
|
||||
"CreateForkOption": {},
|
||||
"CreateHookOption": {},
|
||||
"CreateIssueCommentOption": {},
|
||||
"CreateIssueOption": {},
|
||||
"CreateKeyOption": {},
|
||||
"CreateLabelOption": {},
|
||||
"CreateMilestoneOption": {},
|
||||
"CreateOrgOption": {},
|
||||
"CreatePullRequestOption": {},
|
||||
"CreateReleaseOption": {},
|
||||
"CreateRepoOption": {},
|
||||
"CreateStatusOption": {},
|
||||
"CreateTeamOption": {},
|
||||
"CreateUserOption": {},
|
||||
"DeleteEmailOption": {},
|
||||
"EditAttachmentOptions": {},
|
||||
"EditHookOption": {},
|
||||
"EditIssueCommentOption": {},
|
||||
"EditIssueOption": {},
|
||||
"EditLabelOption": {},
|
||||
"EditMilestoneOption": {},
|
||||
"EditOrgOption": {},
|
||||
"EditPullRequestOption": {},
|
||||
"EditReleaseOption": {},
|
||||
"EditTeamOption": {},
|
||||
"EditUserOption": {},
|
||||
"IssueLabelsOption": {},
|
||||
"MarkdownOption": {},
|
||||
"MigrateRepoForm": {}
|
||||
}
|
||||
},
|
||||
"redirect": {
|
||||
|
|
@ -7745,24 +7864,16 @@
|
|||
},
|
||||
"security": [
|
||||
{
|
||||
"BasicAuth": [
|
||||
"[]"
|
||||
]
|
||||
"BasicAuth": []
|
||||
},
|
||||
{
|
||||
"Token": [
|
||||
"[]"
|
||||
]
|
||||
"Token": []
|
||||
},
|
||||
{
|
||||
"AccessToken": [
|
||||
"[]"
|
||||
]
|
||||
"AccessToken": []
|
||||
},
|
||||
{
|
||||
"AuthorizationHeaderToken": [
|
||||
"[]"
|
||||
]
|
||||
"AuthorizationHeaderToken": []
|
||||
}
|
||||
]
|
||||
}
|
||||
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
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
// - text/html
|
||||
//
|
||||
// Security:
|
||||
// - BasicAuth: []
|
||||
// - Token: []
|
||||
// - AccessToken: []
|
||||
// - AuthorizationHeaderToken: []
|
||||
// - BasicAuth :
|
||||
// - Token :
|
||||
// - AccessToken :
|
||||
// - AuthorizationHeaderToken :
|
||||
//
|
||||
// SecurityDefinitions:
|
||||
// BasicAuth:
|
||||
|
|
|
|||
|
|
@ -62,9 +62,12 @@ func MarkdownRaw(ctx *context.APIContext) {
|
|||
// ---
|
||||
// summary: Render raw markdown as HTML
|
||||
// parameters:
|
||||
// - name: body
|
||||
// in: body
|
||||
// type: string
|
||||
// - name: body
|
||||
// in: body
|
||||
// description: Request body to render
|
||||
// required: true
|
||||
// schema:
|
||||
// type: string
|
||||
// consumes:
|
||||
// - text/plain
|
||||
// produces:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@ func ListHooks(ctx *context.APIContext) {
|
|||
// summary: List an organization's webhooks
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: org
|
||||
// in: path
|
||||
// description: name of the organization
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/HookList"
|
||||
|
|
@ -43,6 +49,17 @@ func GetHook(ctx *context.APIContext) {
|
|||
// summary: Get a hook
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: org
|
||||
// in: path
|
||||
// description: name of the organization
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the hook to get
|
||||
// type: integer
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Hook"
|
||||
|
|
@ -64,9 +81,17 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
|
|||
// - application/json
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: org
|
||||
// in: path
|
||||
// description: name of the organization
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "201":
|
||||
// "$ref": "#/responses/Hook"
|
||||
|
||||
//TODO in body params
|
||||
if !utils.CheckCreateHookOption(ctx, &form) {
|
||||
return
|
||||
}
|
||||
|
|
@ -82,9 +107,22 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
|||
// - application/json
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: org
|
||||
// in: path
|
||||
// description: name of the organization
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the hook to update
|
||||
// type: integer
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Hook"
|
||||
|
||||
//TODO in body params
|
||||
hookID := ctx.ParamsInt64(":id")
|
||||
utils.EditOrgHook(ctx, &form, hookID)
|
||||
}
|
||||
|
|
@ -96,6 +134,17 @@ func DeleteHook(ctx *context.APIContext) {
|
|||
// summary: Delete a hook
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: org
|
||||
// in: path
|
||||
// description: name of the organization
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the hook to delete
|
||||
// type: integer
|
||||
// required: true
|
||||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ func ListUserOrgs(ctx *context.APIContext) {
|
|||
// in: path
|
||||
// description: username of user
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/OrganizationList"
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ func AddTeamMember(ctx *context.APIContext) {
|
|||
|
||||
// RemoveTeamMember api for remove one member from a team
|
||||
func RemoveTeamMember(ctx *context.APIContext) {
|
||||
// swagger:operation DELETE /teams/{id}/members/{username} organization orgAddTeamMember
|
||||
// swagger:operation DELETE /teams/{id}/members/{username} organization orgRemoveTeamMember
|
||||
// ---
|
||||
// summary: Remove a team member
|
||||
// produces:
|
||||
|
|
@ -306,7 +306,7 @@ func getRepositoryByParams(ctx *context.APIContext) *models.Repository {
|
|||
|
||||
// AddTeamRepository api for adding a repository to a team
|
||||
func AddTeamRepository(ctx *context.APIContext) {
|
||||
// swagger:operation PUT /teams/{id}/repos/{org}/{repo} organization orgAddTeamMember
|
||||
// swagger:operation PUT /teams/{id}/repos/{org}/{repo} organization orgAddTeamRepository
|
||||
// ---
|
||||
// summary: Add a repository to a team
|
||||
// produces:
|
||||
|
|
@ -350,7 +350,7 @@ func AddTeamRepository(ctx *context.APIContext) {
|
|||
|
||||
// RemoveTeamRepository api for removing a repository from a team
|
||||
func RemoveTeamRepository(ctx *context.APIContext) {
|
||||
// swagger:operation DELETE /teams/{id}/repos/{org}/{repo} organization orgAddTeamMember
|
||||
// swagger:operation DELETE /teams/{id}/repos/{org}/{repo} organization orgRemoveTeamRepository
|
||||
// ---
|
||||
// summary: Remove a repository from a team
|
||||
// description: This does not delete the repository, it only removes the
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -63,7 +64,7 @@ func GetRawFile(ctx *context.APIContext) {
|
|||
|
||||
// GetArchive get archive of a repository
|
||||
func GetArchive(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/archive/{filepath} repository repoGetArchive
|
||||
// swagger:operation GET /repos/{owner}/{repo}/archive/{archive} repository repoGetArchive
|
||||
// ---
|
||||
// summary: Get an archive of a repository
|
||||
// produces:
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -189,6 +189,11 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: index of the hook
|
||||
// type: integer
|
||||
// required: true
|
||||
// - name: body
|
||||
// in: body
|
||||
// schema:
|
||||
|
|
@ -202,7 +207,7 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) {
|
|||
|
||||
// DeleteHook delete a hook of a repository
|
||||
func DeleteHook(ctx *context.APIContext) {
|
||||
// swagger:operation DELETE /repos/{user}/{repo}/hooks/{id} repository repoDeleteHook
|
||||
// swagger:operation DELETE /repos/{owner}/{repo}/hooks/{id} repository repoDeleteHook
|
||||
// ---
|
||||
// summary: Delete a hook in a repository
|
||||
// produces:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ func ListIssueComments(ctx *context.APIContext) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// - name: index
|
||||
// in: path
|
||||
// description: index of the issue
|
||||
// type: integer
|
||||
|
|
@ -139,7 +139,7 @@ func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOpti
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// - name: index
|
||||
// in: path
|
||||
// description: index of the issue
|
||||
// type: integer
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ func trackedTimesToAPIFormat(trackedTimes []*models.TrackedTime) []*api.TrackedT
|
|||
|
||||
// ListTrackedTimes list all the tracked times of an issue
|
||||
func ListTrackedTimes(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/issues/{index}/times issue issueTrackedTimes
|
||||
// swagger:operation GET /repos/{owner}/{repo}/issues/{id}/times issue issueTrackedTimes
|
||||
// ---
|
||||
// summary: List an issue's tracked times
|
||||
// produces:
|
||||
|
|
@ -37,7 +37,7 @@ func ListTrackedTimes(ctx *context.APIContext) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: repo
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: index of the issue
|
||||
// type: integer
|
||||
|
|
@ -70,7 +70,7 @@ func ListTrackedTimes(ctx *context.APIContext) {
|
|||
|
||||
// AddTime adds time manual to the given issue
|
||||
func AddTime(ctx *context.APIContext, form api.AddTimeOption) {
|
||||
// swagger:operation Post /repos/{owner}/{repo}/issues/{index}/times issue issueAddTime
|
||||
// swagger:operation Post /repos/{owner}/{repo}/issues/{id}/times issue issueAddTime
|
||||
// ---
|
||||
// summary: Add a tracked time to a issue
|
||||
// consumes:
|
||||
|
|
@ -132,7 +132,7 @@ func AddTime(ctx *context.APIContext, form api.AddTimeOption) {
|
|||
|
||||
// ListTrackedTimesByUser lists all tracked times of the user
|
||||
func ListTrackedTimesByUser(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/times/{tracker} user userTrackedTimes
|
||||
// swagger:operation GET /repos/{owner}/{repo}/times/{user} user userTrackedTimes
|
||||
// ---
|
||||
// summary: List a user's tracked times in a repo
|
||||
// produces:
|
||||
|
|
|
|||
|
|
@ -16,30 +16,7 @@ import (
|
|||
|
||||
// ListMilestones list all the milestones for a repository
|
||||
func ListMilestones(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/milestones/{id} issue issueGetMilestone
|
||||
// ---
|
||||
// summary: Get a milestone
|
||||
// produces:
|
||||
// - application/json
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Milestone"
|
||||
milestones, err := models.GetMilestonesByRepoID(ctx.Repo.Repository.ID)
|
||||
if err != nil {
|
||||
ctx.Error(500, "GetMilestonesByRepoID", err)
|
||||
return
|
||||
}
|
||||
|
||||
apiMilestones := make([]*api.Milestone, len(milestones))
|
||||
for i := range milestones {
|
||||
apiMilestones[i] = milestones[i].APIFormat()
|
||||
}
|
||||
ctx.JSON(200, &apiMilestones)
|
||||
}
|
||||
|
||||
// GetMilestone get a milestone for a repository
|
||||
func GetMilestone(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/milestones issue issueGetMilestones
|
||||
// swagger:operation GET /repos/{owner}/{repo}/milestones issue issueGetMilestonesList
|
||||
// ---
|
||||
// summary: Get all of a repository's milestones
|
||||
// produces:
|
||||
|
|
@ -55,6 +32,29 @@ func GetMilestone(ctx *context.APIContext) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/MilestoneList"
|
||||
milestones, err := models.GetMilestonesByRepoID(ctx.Repo.Repository.ID)
|
||||
if err != nil {
|
||||
ctx.Error(500, "GetMilestonesByRepoID", err)
|
||||
return
|
||||
}
|
||||
|
||||
apiMilestones := make([]*api.Milestone, len(milestones))
|
||||
for i := range milestones {
|
||||
apiMilestones[i] = milestones[i].APIFormat()
|
||||
}
|
||||
ctx.JSON(200, &apiMilestones)
|
||||
}
|
||||
|
||||
// GetMilestone get a milestone for a repository
|
||||
func GetMilestone(ctx *context.APIContext) {
|
||||
// swagger:operation GET /repos/{owner}/{repo}/milestones/{id} issue issueGetMilestone
|
||||
// ---
|
||||
// summary: Get a milestone
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: owner
|
||||
// in: path
|
||||
|
|
@ -68,12 +68,12 @@ func GetMilestone(ctx *context.APIContext) {
|
|||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the milestone to get
|
||||
// description: id of the milestone
|
||||
// type: integer
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/MilestoneList"
|
||||
// "$ref": "#/responses/Milestone"
|
||||
milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||
if err != nil {
|
||||
if models.IsErrMilestoneNotExist(err) {
|
||||
|
|
@ -152,6 +152,11 @@ func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the milestone
|
||||
// type: integer
|
||||
// required: true
|
||||
// - name: body
|
||||
// in: body
|
||||
// schema:
|
||||
|
|
@ -202,7 +207,7 @@ func DeleteMilestone(ctx *context.APIContext) {
|
|||
// description: name of the repo
|
||||
// type: string
|
||||
// required: true
|
||||
// - name: body
|
||||
// - name: id
|
||||
// in: path
|
||||
// description: id of the milestone to delete
|
||||
// type: integer
|
||||
|
|
|
|||
|
|
@ -508,13 +508,13 @@ func TopicSearch(ctx *context.Context) {
|
|||
// ---
|
||||
// summary: search topics via keyword
|
||||
// produces:
|
||||
// - application/json
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: keyword
|
||||
// in: path
|
||||
// description: id of the repo to get
|
||||
// type: integer
|
||||
// required: true
|
||||
// - name: q
|
||||
// in: query
|
||||
// description: keywords to search
|
||||
// required: true
|
||||
// type: string
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/Repository"
|
||||
|
|
|
|||
|
|
@ -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,57 +12,90 @@ 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 {
|
||||
// in:body
|
||||
AddCollaboratorOption api.AddCollaboratorOption
|
||||
|
||||
// in:body
|
||||
CreateEmailOption api.CreateEmailOption
|
||||
// in:body
|
||||
DeleteEmailOption api.DeleteEmailOption
|
||||
|
||||
// in:body
|
||||
CreateHookOption api.CreateHookOption
|
||||
EditHookOption api.EditHookOption
|
||||
// in:body
|
||||
EditHookOption api.EditHookOption
|
||||
|
||||
// in:body
|
||||
CreateIssueOption api.CreateIssueOption
|
||||
EditIssueOption api.EditIssueOption
|
||||
// in:body
|
||||
EditIssueOption api.EditIssueOption
|
||||
|
||||
// in:body
|
||||
CreateIssueCommentOption api.CreateIssueCommentOption
|
||||
EditIssueCommentOption api.EditIssueCommentOption
|
||||
// in:body
|
||||
EditIssueCommentOption api.EditIssueCommentOption
|
||||
|
||||
// in:body
|
||||
IssueLabelsOption api.IssueLabelsOption
|
||||
|
||||
// in:body
|
||||
CreateKeyOption api.CreateKeyOption
|
||||
|
||||
// in:body
|
||||
CreateLabelOption api.CreateLabelOption
|
||||
EditLabelOption api.EditLabelOption
|
||||
// in:body
|
||||
EditLabelOption api.EditLabelOption
|
||||
|
||||
// in:body
|
||||
MarkdownOption api.MarkdownOption
|
||||
|
||||
// in:body
|
||||
CreateMilestoneOption api.CreateMilestoneOption
|
||||
EditMilestoneOption api.EditMilestoneOption
|
||||
// in:body
|
||||
EditMilestoneOption api.EditMilestoneOption
|
||||
|
||||
// in:body
|
||||
CreateOrgOption api.CreateOrgOption
|
||||
EditOrgOption api.EditOrgOption
|
||||
// in:body
|
||||
EditOrgOption api.EditOrgOption
|
||||
|
||||
// in:body
|
||||
CreatePullRequestOption api.CreatePullRequestOption
|
||||
EditPullRequestOption api.EditPullRequestOption
|
||||
// in:body
|
||||
EditPullRequestOption api.EditPullRequestOption
|
||||
|
||||
// in:body
|
||||
CreateReleaseOption api.CreateReleaseOption
|
||||
EditReleaseOption api.EditReleaseOption
|
||||
// in:body
|
||||
EditReleaseOption api.EditReleaseOption
|
||||
|
||||
// in:body
|
||||
CreateRepoOption api.CreateRepoOption
|
||||
// in:body
|
||||
CreateForkOption api.CreateForkOption
|
||||
|
||||
// in:body
|
||||
CreateStatusOption api.CreateStatusOption
|
||||
|
||||
// in:body
|
||||
CreateTeamOption api.CreateTeamOption
|
||||
EditTeamOption api.EditTeamOption
|
||||
// in:body
|
||||
EditTeamOption api.EditTeamOption
|
||||
|
||||
// in:body
|
||||
AddTimeOption api.AddTimeOption
|
||||
|
||||
// in:body
|
||||
CreateUserOption api.CreateUserOption
|
||||
EditUserOption api.EditUserOption
|
||||
// in:body
|
||||
EditUserOption api.EditUserOption
|
||||
|
||||
// in:body
|
||||
MigrateRepoForm auth.MigrateRepoForm
|
||||
|
||||
// in:body
|
||||
EditAttachmentOptions api.EditAttachmentOptions
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,112 @@ 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 {
|
||||
// in:body
|
||||
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
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ func ListAccessTokens(ctx *context.APIContext) {
|
|||
// summary: List the authenticated user's access tokens
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: username
|
||||
// in: path
|
||||
// description: username of user
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/AccessTokenList"
|
||||
|
|
@ -46,6 +52,12 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
|
|||
// - application/json
|
||||
// produces:
|
||||
// - application/json
|
||||
// parameters:
|
||||
// - name: username
|
||||
// in: path
|
||||
// description: username of user
|
||||
// type: string
|
||||
// required: true
|
||||
// responses:
|
||||
// "200":
|
||||
// "$ref": "#/responses/AccessToken"
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ func checkUserFollowing(ctx *context.APIContext, u *models.User, followID int64)
|
|||
|
||||
// CheckMyFollowing whether the given user is followed by the authenticated user
|
||||
func CheckMyFollowing(ctx *context.APIContext) {
|
||||
// swagger:operation GET /user/following/{followee} user userCurrentCheckFollowing
|
||||
// swagger:operation GET /user/following/{username} user userCurrentCheckFollowing
|
||||
// ---
|
||||
// summary: Check whether a user is followed by the authenticated user
|
||||
// parameters:
|
||||
// - name: followee
|
||||
// - name: username
|
||||
// in: path
|
||||
// description: username of followed user
|
||||
// type: string
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||
ctx.Data["FileContent"] = string(markup.Render(readmeFile.Name(), buf, treeLink, ctx.Repo.Repository.ComposeMetas()))
|
||||
} else {
|
||||
ctx.Data["IsRenderedHTML"] = true
|
||||
ctx.Data["FileContent"] = string(bytes.Replace(buf, []byte("\n"), []byte(`<br>`), -1))
|
||||
ctx.Data["FileContent"] = strings.Replace(
|
||||
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`, -1,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -208,7 +210,9 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
|
|||
ctx.Data["FileContent"] = string(markup.Render(blob.Name(), buf, path.Dir(treeLink), ctx.Repo.Repository.ComposeMetas()))
|
||||
} else if readmeExist {
|
||||
ctx.Data["IsRenderedHTML"] = true
|
||||
ctx.Data["FileContent"] = string(bytes.Replace(buf, []byte("\n"), []byte(`<br>`), -1))
|
||||
ctx.Data["FileContent"] = strings.Replace(
|
||||
gotemplate.HTMLEscapeString(string(buf)), "\n", `<br>`, -1,
|
||||
)
|
||||
} else {
|
||||
// Building code view blocks with line number on server side.
|
||||
var fileContent string
|
||||
|
|
@ -223,6 +227,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>
|
||||
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
<tr>
|
||||
<td>{{.PID}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Start.FormatLong}}</td>
|
||||
<td>{{TimeSinceUnix .Start $.Lang}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
{{if .CanBeForked}}
|
||||
<div class="ui compact labeled button" tabindex="0">
|
||||
<a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
||||
<a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
||||
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.Link}}/forks">
|
||||
|
|
|
|||
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