Merge branch 'master' into master

This commit is contained in:
Lauris BH 2018-05-06 12:00:28 +03:00 committed by GitHub
commit 5d9bbd9b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
141 changed files with 4345 additions and 433 deletions

View File

@ -238,16 +238,7 @@ pipeline:
branch: [ master ]
docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ]
when:
event: [ tag ]
docker:
image: plugins/docker:17.05
image: plugins/docker:17.12
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
@ -257,14 +248,13 @@ pipeline:
branch: [ release/* ]
docker:
image: plugins/docker:17.05
pull: true
image: plugins/docker:17.12
secrets: [ docker_username, docker_password ]
pull: true
repo: gitea/gitea
tags: [ 'latest' ]
default_tags: true
when:
event: [ push ]
branch: [ master ]
event: [ push, tag ]
release:
image: plugins/s3:1

View File

@ -4,11 +4,32 @@ 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.0-rc1](https://github.com/go-gitea/gitea/releases/tag/v1.4.0-rc1) - 2018-01-31
## [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)
* SECURITY
* Do not allow inactive users to access repositories using private key (#3887) (#3889)
* Fix path cleanup in file editor, when initilizing new repository and LFS oids (#3871) (#3873)
* Remove unnecessary allowed safe HTML (#3778) (#3779)
* Correctly check http git access rights for reverse proxy authorized users (#3721) (#3743)
* BUGFIXES
* Fix to use only needed columns from tables to get repository git paths (#3870) (#3883)
* Fix GPG expire time display when time is zero (#3584) (#3884)
* Fix to update only issue last update time when adding a comment (#3855) (#3860)
* Fix repository star count after deleting user (#3781) (#3783)
* Use the active branch for the code tab (#3720) (#3776)
* Set default branch name on first push (#3715) (#3723)
* Show clipboard button if disable HTTP of git protocol (#3773) (#3774)
## [1.4.0](https://github.com/go-gitea/gitea/releases/tag/v1.4.0) - 2018-03-25
* BREAKING
* Drop deprecated GOGS\_WORK\_DIR use (#2946)
* Fix API status code for hook creation (#2814)
* SECURITY
* Escape branch name in dropdown menu (#3691) (#3692)
* Refactor and simplify to correctly validate redirect to URL (#3674) (#3676)
* Fix escaping changed title in comments (#3530) (#3534)
 * Escape search query (#3486) (#3488)
* Sanitize logs for mirror sync (#3057)
* FEATURE
* Serve .patch and .diff for pull requests (#3305, #3293)
@ -24,6 +45,17 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
* Add dingtalk webhook (#2777)
* Responsive view (#2750)
* BUGFIXES
* Fix wiki inter-links with spaces (#3560) (#3632)
* Fix query protected branch bug (#3563) (#3571)
* Fix remove team member issue (#3566) (#3570)
* Fix the protected branch panic issue (#3567) (#3569)
* If Mirrors repository no content is fetched, updated time should not be changed (#3551) (#3565)
* Bug fix for mirrored repository releases sorted (#3522) (#3555)
* Add issue closed time column to fix activity closed issues list (#3537) (#3540)
 * Update markbates/goth library to support OAuth2 with new dropbox API (#3533) (#3539)
 * Fixes missing avatars in offline mode (#3471) (#3477)
 * Fix synchronization bug in repo indexer (#3455) (#3461)
 * Fix rendering of wiki page list if wiki repo contains other files (#3454) (#3463)
* Fix webhook X-GitHub-* headers casing for better compatibility (#3429)
* Add content type and doctype to requests made with go-get (#3426, #3423)
* Fix SQL type error for webhooks (#3424)

View File

@ -230,6 +230,12 @@ func runServ(c *cli.Context) error {
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
}
if !user.IsActive || user.ProhibitLogin {
fail("Your account is not active or has been disabled by Administrator",
"User %s is disabled and have no access to repository %s",
user.Name, repoPath)
}
mode, err := models.AccessLevel(user.ID, repo)
if err != nil {
fail("Internal error", "Failed to check access: %v", err)

View File

@ -2,6 +2,7 @@
date: "2016-11-08T16:00:00+02:00"
title: "Documentation"
slug: "documentation"
url: "/en-us/"
weight: 10
toc: true
draft: false

View File

@ -2,6 +2,7 @@
date: "2017-08-23T09:00:00+02:00"
title: "Documentation"
slug: "documentation"
url: "/fr-fr/"
weight: 10
toc: true
draft: false
@ -48,7 +49,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide
- Migré
- Notifications (courriel et web)
- Lu
- Non lu
- Non lu
- Épinglé
- Page d'exploration
- Utilisateurs

View File

@ -2,6 +2,7 @@
date: "2016-11-08T16:00:00+02:00"
title: "文档"
slug: "documentation"
url: "/zh-cn/"
weight: 10
toc: true
draft: false

View File

@ -2,6 +2,7 @@
date: "2016-11-08T16:00:00+02:00"
title: "文件"
slug: "documentation"
url: "/zh-tw/"
weight: 10
toc: true
draft: false

View File

@ -28,6 +28,8 @@ for SOURCE in $(find ${ROOT}/content -type f -iname *.en-us.md); do
if [[ ! -f ${DEST} ]]; then
echo "Creating fallback for ${DEST#${ROOT}/content/}"
cp ${SOURCE} ${DEST}
sed -i.bak "s/en\-us/${LOCALE}/g" ${DEST}
rm ${DEST}.bak
fi
done
done

View File

@ -0,0 +1 @@
ref: refs/heads/master

View File

@ -0,0 +1,4 @@
[core]
repositoryformatversion = 0
filemode = true
bare = true

View File

@ -0,0 +1 @@
Unnamed repository; edit this file 'description' to name the repository.

View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# An example hook script to check the commit log message taken by
# applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit. The hook is
# allowed to edit the commit message file.
#
# To enable this hook, rename this file to "applypatch-msg".
. git-sh-setup
commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
:

View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit. The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".
# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
# This example catches duplicate Signed-off-by lines.
test "" = "$(grep '^Signed-off-by: ' "$1" |
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
echo >&2 Duplicate Signed-off-by lines.
exit 1
}

View File

@ -0,0 +1,114 @@
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Open2;
# An example hook script to integrate Watchman
# (https://facebook.github.io/watchman/) with git to speed up detecting
# new and modified files.
#
# The hook is passed a version (currently 1) and a time in nanoseconds
# formatted as a string and outputs to stdout all files that have been
# modified since the given time. Paths must be relative to the root of
# the working tree and separated by a single NUL.
#
# To enable this hook, rename this file to "query-watchman" and set
# 'git config core.fsmonitor .git/hooks/query-watchman'
#
my ($version, $time) = @ARGV;
# Check the hook interface version
if ($version == 1) {
# convert nanoseconds to seconds
$time = int $time / 1000000000;
} else {
die "Unsupported query-fsmonitor hook version '$version'.\n" .
"Falling back to scanning...\n";
}
my $git_work_tree;
if ($^O =~ 'msys' || $^O =~ 'cygwin') {
$git_work_tree = Win32::GetCwd();
$git_work_tree =~ tr/\\/\//;
} else {
require Cwd;
$git_work_tree = Cwd::cwd();
}
my $retry = 1;
launch_watchman();
sub launch_watchman {
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
or die "open2() failed: $!\n" .
"Falling back to scanning...\n";
# In the query expression below we're asking for names of files that
# changed since $time but were not transient (ie created after
# $time but no longer exist).
#
# To accomplish this, we're using the "since" generator to use the
# recency index to select candidate nodes and "fields" to limit the
# output to file names only. Then we're using the "expression" term to
# further constrain the results.
#
# The category of transient files that we want to ignore will have a
# creation clock (cclock) newer than $time_t value and will also not
# currently exist.
my $query = <<" END";
["query", "$git_work_tree", {
"since": $time,
"fields": ["name"],
"expression": ["not", ["allof", ["since", $time, "cclock"], ["not", "exists"]]]
}]
END
print CHLD_IN $query;
close CHLD_IN;
my $response = do {local $/; <CHLD_OUT>};
die "Watchman: command returned no output.\n" .
"Falling back to scanning...\n" if $response eq "";
die "Watchman: command returned invalid output: $response\n" .
"Falling back to scanning...\n" unless $response =~ /^\{/;
my $json_pkg;
eval {
require JSON::XS;
$json_pkg = "JSON::XS";
1;
} or do {
require JSON::PP;
$json_pkg = "JSON::PP";
};
my $o = $json_pkg->new->utf8->decode($response);
if ($retry > 0 and $o->{error} and $o->{error} =~ m/unable to resolve root .* directory (.*) is not watched/) {
print STDERR "Adding '$git_work_tree' to watchman's watch list.\n";
$retry--;
qx/watchman watch "$git_work_tree"/;
die "Failed to make watchman watch '$git_work_tree'.\n" .
"Falling back to scanning...\n" if $? != 0;
# Watchman will always return all files on the first query so
# return the fast "everything is dirty" flag to git and do the
# Watchman query just to get it over with now so we won't pay
# the cost in git to look up each individual file.
print "/\0";
eval { launch_watchman() };
exit 0;
}
die "Watchman: $o->{error}.\n" .
"Falling back to scanning...\n" if $o->{error};
binmode STDOUT, ":utf8";
local $, = "\0";
print @{$o->{files}};
}

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
data=$(cat)
exitcodes=""
hookname=$(basename $0)
GIT_DIR=${GIT_DIR:-$(dirname $0)}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" || continue
echo "${data}" | "${hook}"
exitcodes="${exitcodes} $?"
done
for i in ${exitcodes}; do
[ ${i} -eq 0 ] || exit ${i}
done

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
"/home/tris/Projects/go/src/code.gitea.io/gitea/gitea" hook --config='/home/tris/Projects/go/src/code.gitea.io/gitea/custom/conf/app.ini' post-receive

View File

@ -0,0 +1,8 @@
#!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
exec git update-server-info

View File

@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed
# by applypatch from an e-mail message.
#
# The hook should exit with non-zero status after issuing an
# appropriate message if it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-applypatch".
. git-sh-setup
precommit="$(git rev-parse --git-path hooks/pre-commit)"
test -x "$precommit" && exec "$precommit" ${1+"$@"}
:

View File

@ -0,0 +1,49 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
# If you want to allow non-ASCII filenames set this variable to true.
allownonascii=$(git config --bool hooks.allownonascii)
# Redirect output to stderr.
exec 1>&2
# Cross platform projects tend to avoid non-ASCII filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
if [ "$allownonascii" != "true" ] &&
# Note that the use of brackets around a tr range is ok here, (it's
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test $(git diff --cached --name-only --diff-filter=A -z $against |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
cat <<\EOF
Error: Attempt to add a non-ASCII file name.
This can cause problems if you want to work with people on other platforms.
To be portable it is advisable to rename the file.
If you know what you are doing you can disable this check using:
git config hooks.allownonascii true
EOF
exit 1
fi
# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --

View File

@ -0,0 +1,53 @@
#!/bin/sh
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local sha1> <remote ref> <remote sha1>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).
remote="$1"
url="$2"
z40=0000000000000000000000000000000000000000
while read local_ref local_sha remote_ref remote_sha
do
if [ "$local_sha" = $z40 ]
then
# Handle delete
:
else
if [ "$remote_sha" = $z40 ]
then
# New branch, examine all commits
range="$local_sha"
else
# Update to existing branch, examine new commits
range="$remote_sha..$local_sha"
fi
# Check for WIP commit
commit=`git rev-list -n 1 --grep '^WIP' "$range"`
if [ -n "$commit" ]
then
echo >&2 "Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi
done
exit 0

View File

@ -0,0 +1,169 @@
#!/bin/sh
#
# Copyright (c) 2006, 2008 Junio C Hamano
#
# The "pre-rebase" hook is run just before "git rebase" starts doing
# its job, and can prevent the command from running by exiting with
# non-zero status.
#
# The hook is called with the following parameters:
#
# $1 -- the upstream the series was forked from.
# $2 -- the branch being rebased (or empty when rebasing the current branch).
#
# This sample shows how to prevent topic branches that are already
# merged to 'next' branch from getting rebased, because allowing it
# would result in rebasing already published history.
publish=next
basebranch="$1"
if test "$#" = 2
then
topic="refs/heads/$2"
else
topic=`git symbolic-ref HEAD` ||
exit 0 ;# we do not interrupt rebasing detached HEAD
fi
case "$topic" in
refs/heads/??/*)
;;
*)
exit 0 ;# we do not interrupt others.
;;
esac
# Now we are dealing with a topic branch being rebased
# on top of master. Is it OK to rebase it?
# Does the topic really exist?
git show-ref -q "$topic" || {
echo >&2 "No such branch $topic"
exit 1
}
# Is topic fully merged to master?
not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
if test -z "$not_in_master"
then
echo >&2 "$topic is fully merged to master; better remove it."
exit 1 ;# we could allow it, but there is no point.
fi
# Is topic ever merged to next? If so you should not be rebasing it.
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
only_next_2=`git rev-list ^master ${publish} | sort`
if test "$only_next_1" = "$only_next_2"
then
not_in_topic=`git rev-list "^$topic" master`
if test -z "$not_in_topic"
then
echo >&2 "$topic is already up to date with master"
exit 1 ;# we could allow it, but there is no point.
else
exit 0
fi
else
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
/usr/bin/perl -e '
my $topic = $ARGV[0];
my $msg = "* $topic has commits already merged to public branch:\n";
my (%not_in_next) = map {
/^([0-9a-f]+) /;
($1 => 1);
} split(/\n/, $ARGV[1]);
for my $elem (map {
/^([0-9a-f]+) (.*)$/;
[$1 => $2];
} split(/\n/, $ARGV[2])) {
if (!exists $not_in_next{$elem->[0]}) {
if ($msg) {
print STDERR $msg;
undef $msg;
}
print STDERR " $elem->[1]\n";
}
}
' "$topic" "$not_in_next" "$not_in_master"
exit 1
fi
<<\DOC_END
This sample hook safeguards topic branches that have been
published from being rewound.
The workflow assumed here is:
* Once a topic branch forks from "master", "master" is never
merged into it again (either directly or indirectly).
* Once a topic branch is fully cooked and merged into "master",
it is deleted. If you need to build on top of it to correct
earlier mistakes, a new topic branch is created by forking at
the tip of the "master". This is not strictly necessary, but
it makes it easier to keep your history simple.
* Whenever you need to test or publish your changes to topic
branches, merge them into "next" branch.
The script, being an example, hardcodes the publish branch name
to be "next", but it is trivial to make it configurable via
$GIT_DIR/config mechanism.
With this workflow, you would want to know:
(1) ... if a topic branch has ever been merged to "next". Young
topic branches can have stupid mistakes you would rather
clean up before publishing, and things that have not been
merged into other branches can be easily rebased without
affecting other people. But once it is published, you would
not want to rewind it.
(2) ... if a topic branch has been fully merged to "master".
Then you can delete it. More importantly, you should not
build on top of it -- other people may already want to
change things related to the topic as patches against your
"master", so if you need further changes, it is better to
fork the topic (perhaps with the same name) afresh from the
tip of "master".
Let's look at this example:
o---o---o---o---o---o---o---o---o---o "next"
/ / / /
/ a---a---b A / /
/ / / /
/ / c---c---c---c B /
/ / / \ /
/ / / b---b C \ /
/ / / / \ /
---o---o---o---o---o---o---o---o---o---o---o "master"
A, B and C are topic branches.
* A has one fix since it was merged up to "next".
* B has finished. It has been fully merged up to "master" and "next",
and is ready to be deleted.
* C has not merged to "next" at all.
We would want to allow C to be rebased, refuse A, and encourage
B to be deleted.
To compute (1):
git rev-list ^master ^topic next
git rev-list ^master next
if these match, topic has not merged in next at all.
To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
data=$(cat)
exitcodes=""
hookname=$(basename $0)
GIT_DIR=${GIT_DIR:-$(dirname $0)}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" || continue
echo "${data}" | "${hook}"
exitcodes="${exitcodes} $?"
done
for i in ${exitcodes}; do
[ ${i} -eq 0 ] || exit ${i}
done

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
"/home/tris/Projects/go/src/code.gitea.io/gitea/gitea" hook --config='/home/tris/Projects/go/src/code.gitea.io/gitea/custom/conf/app.ini' pre-receive

View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# An example hook script to make use of push options.
# The example simply echoes all push options that start with 'echoback='
# and rejects all pushes when the "reject" push option is used.
#
# To enable this hook, rename this file to "pre-receive".
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
echoback=*)
echo "echo from the pre-receive-hook: ${value#*=}" >&2
;;
reject)
exit 1
esac
i=$((i + 1))
done
fi

View File

@ -0,0 +1,42 @@
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
# This hook includes three examples. The first one removes the
# "# Please enter the commit message..." help message.
#
# The second includes the output of "git diff --name-status -r"
# into the message, just before the "git status" output. It is
# commented because it doesn't cope with --amend or with squashed
# commits.
#
# The third example adds a Signed-off-by line to the message, that can
# still be edited. This is rarely a good idea.
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
# case "$COMMIT_SOURCE,$SHA1" in
# ,|template,)
# /usr/bin/perl -i.bak -pe '
# print "\n" . `git diff --cached --name-status -r`
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
# *) ;;
# esac
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE"
# then
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
# fi

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
exitcodes=""
hookname=$(basename $0)
GIT_DIR=${GIT_DIR:-$(dirname $0)}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" || continue
"${hook}" $1 $2 $3
exitcodes="${exitcodes} $?"
done
for i in ${exitcodes}; do
[ ${i} -eq 0 ] || exit ${i}
done

View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
"/home/tris/Projects/go/src/code.gitea.io/gitea/gitea" hook --config='/home/tris/Projects/go/src/code.gitea.io/gitea/custom/conf/app.ini' update $1 $2 $3

View File

@ -0,0 +1,128 @@
#!/bin/sh
#
# An example hook script to block unannotated tags from entering.
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
#
# To enable this hook, rename this file to "update".
#
# Config
# ------
# hooks.allowunannotated
# This boolean sets whether unannotated tags will be allowed into the
# repository. By default they won't be.
# hooks.allowdeletetag
# This boolean sets whether deleting tags will be allowed in the
# repository. By default they won't be.
# hooks.allowmodifytag
# This boolean sets whether a tag may be modified after creation. By default
# it won't be.
# hooks.allowdeletebranch
# This boolean sets whether deleting branches will be allowed in the
# repository. By default they won't be.
# hooks.denycreatebranch
# This boolean sets whether remotely creating branches will be denied
# in the repository. By default this is allowed.
#
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
# --- Config
allowunannotated=$(git config --bool hooks.allowunannotated)
allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
denycreatebranch=$(git config --bool hooks.denycreatebranch)
allowdeletetag=$(git config --bool hooks.allowdeletetag)
allowmodifytag=$(git config --bool hooks.allowmodifytag)
# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
echo "*** Project description file hasn't been set" >&2
exit 1
;;
esac
# --- Check types
# if $newrev is 0000...0000, it's a commit to delete a ref.
zero="0000000000000000000000000000000000000000"
if [ "$newrev" = "$zero" ]; then
newrev_type=delete
else
newrev_type=$(git cat-file -t $newrev)
fi
case "$refname","$newrev_type" in
refs/tags/*,commit)
# un-annotated tag
short_refname=${refname##refs/tags/}
if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
;;
refs/tags/*,delete)
# delete tag
if [ "$allowdeletetag" != "true" ]; then
echo "*** Deleting a tag is not allowed in this repository" >&2
exit 1
fi
;;
refs/tags/*,tag)
# annotated tag
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
then
echo "*** Tag '$refname' already exists." >&2
echo "*** Modifying a tag is not allowed in this repository." >&2
exit 1
fi
;;
refs/heads/*,commit)
# branch
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
echo "*** Creating a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/heads/*,delete)
# delete branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a branch is not allowed in this repository" >&2
exit 1
fi
;;
refs/remotes/*,commit)
# tracking branch
;;
refs/remotes/*,delete)
# delete tracking branch
if [ "$allowdeletebranch" != "true" ]; then
echo "*** Deleting a tracking branch is not allowed in this repository" >&2
exit 1
fi
;;
*)
# Anything else (is there anything else?)
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
exit 1
;;
esac
# --- Finished
exit 0

View File

@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@ -0,0 +1 @@
808038d2f71b0ab020991439cffd24309c7bc530 refs/heads/master

View File

@ -0,0 +1 @@
808038d2f71b0ab020991439cffd24309c7bc530

View File

@ -7,10 +7,12 @@ package integrations
import (
"fmt"
"net/http"
"strings"
"testing"
"code.gitea.io/gitea/modules/setting"
"github.com/PuerkitoBio/goquery"
"github.com/stretchr/testify/assert"
)
@ -74,3 +76,26 @@ func TestViewRepo1CloneLinkAuthorized(t *testing.T) {
sshURL := fmt.Sprintf("ssh://%s@%s:%d/user2/repo1.git", setting.RunUser, setting.SSH.Domain, setting.SSH.Port)
assert.Equal(t, sshURL, link)
}
func TestViewRepoWithSymlinks(t *testing.T) {
prepareTestEnv(t)
session := loginUser(t, "user2")
req := NewRequest(t, "GET", "/user2/repo20.git")
resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name")
items := files.Map(func(i int, s *goquery.Selection) string {
cls, _ := s.Find("SPAN").Attr("class")
file := strings.Trim(s.Find("A").Text(), " \t\n")
return fmt.Sprintf("%s: %s", file, cls)
})
assert.Equal(t, len(items), 5)
assert.Equal(t, items[0], "a: octicon octicon-file-directory")
assert.Equal(t, items[1], "link_b: octicon octicon-file-symlink-directory")
assert.Equal(t, items[2], "link_d: octicon octicon-file-symlink-file")
assert.Equal(t, items[3], "link_hi: octicon octicon-file-symlink-file")
assert.Equal(t, items[4], "link_link: octicon octicon-file-symlink-file")
}

View File

@ -27,9 +27,10 @@ func TestRenameUsername(t *testing.T) {
session := loginUser(t, "user2")
req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{
"_csrf": GetCSRF(t, session, "/user/settings"),
"name": "newUsername",
"email": "user2@example.com",
"_csrf": GetCSRF(t, session, "/user/settings"),
"name": "newUsername",
"email": "user2@example.com",
"language": "en-us",
})
session.MakeRequest(t, req, http.StatusFound)
@ -81,9 +82,10 @@ func TestRenameReservedUsername(t *testing.T) {
for _, reservedUsername := range reservedUsernames {
t.Logf("Testing username %s", reservedUsername)
req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{
"_csrf": GetCSRF(t, session, "/user/settings"),
"name": reservedUsername,
"email": "user2@example.com",
"_csrf": GetCSRF(t, session, "/user/settings"),
"name": reservedUsername,
"email": "user2@example.com",
"language": "en-us",
})
resp := session.MakeRequest(t, req, http.StatusFound)

View File

@ -24,6 +24,7 @@ func TestXSSUserFullName(t *testing.T) {
"name": user.Name,
"full_name": fullName,
"email": user.Email,
"language": "en-us",
})
session.MakeRequest(t, req, http.StatusFound)

View File

@ -3,3 +3,4 @@
repo_id: 1
hook_id: 1
uuid: uuid1
is_delivered: true

View File

@ -67,3 +67,10 @@
type: 5
config: "{}"
created_unix: 946684810
-
id: 11
repo_id: 31
type: 1
config: "{}"
created_unix: 1524304355

View File

@ -378,4 +378,14 @@
num_pulls: 0
num_closed_pulls: 0
is_mirror: false
is_fork: true
is_fork: true
-
id: 31
owner_id: 2
lower_name: repo20
name: repo20
num_stars: 0
num_forks: 0
num_issues: 0
is_mirror: false

View File

@ -27,7 +27,7 @@
is_admin: false
avatar: avatar2
avatar_email: user2@example.com
num_repos: 4
num_repos: 5
num_stars: 2
num_followers: 2
num_following: 1
@ -313,4 +313,4 @@
avatar: avatar20
avatar_email: user20@example.com
num_repos: 4
is_active: true
is_active: true

View File

@ -47,13 +47,15 @@ type Issue struct {
Ref string
DeadlineUnix util.TimeStamp `xorm:"INDEX"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
ClosedUnix util.TimeStamp `xorm:"INDEX"`
Attachments []*Attachment `xorm:"-"`
Comments []*Comment `xorm:"-"`
Reactions ReactionList `xorm:"-"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
ClosedUnix util.TimeStamp `xorm:"INDEX"`
Attachments []*Attachment `xorm:"-"`
Comments []*Comment `xorm:"-"`
Reactions ReactionList `xorm:"-"`
TotalTrackedTime int64 `xorm:"-"`
}
var (
@ -69,6 +71,20 @@ func init() {
issueTasksDonePat = regexp.MustCompile(issueTasksDoneRegexpStr)
}
func (issue *Issue) loadTotalTimes(e Engine) (err error) {
opts := FindTrackedTimesOptions{IssueID: issue.ID}
issue.TotalTrackedTime, err = opts.ToSession(e).SumInt(&TrackedTime{}, "time")
if err != nil {
return err
}
return nil
}
// IsOverdue checks if the issue is overdue
func (issue *Issue) IsOverdue() bool {
return util.TimeStampNow() >= issue.DeadlineUnix
}
func (issue *Issue) loadRepo(e Engine) (err error) {
if issue.Repo == nil {
issue.Repo, err = getRepositoryByID(e, issue.RepoID)
@ -79,6 +95,15 @@ func (issue *Issue) loadRepo(e Engine) (err error) {
return nil
}
// IsTimetrackerEnabled returns true if the repo enables timetracking
func (issue *Issue) IsTimetrackerEnabled() bool {
if err := issue.loadRepo(x); err != nil {
log.Error(4, fmt.Sprintf("loadRepo: %v", err))
return false
}
return issue.Repo.IsTimetrackerEnabled()
}
// GetPullRequest returns the issue pull request
func (issue *Issue) GetPullRequest() (pr *PullRequest, err error) {
if !issue.IsPull {
@ -225,6 +250,11 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
if err = issue.loadComments(e); err != nil {
return err
}
if issue.IsTimetrackerEnabled() {
if err = issue.loadTotalTimes(e); err != nil {
return err
}
}
return issue.loadReactions(e)
}
@ -324,6 +354,9 @@ func (issue *Issue) APIFormat() *api.Issue {
apiIssue.PullRequest.Merged = issue.PullRequest.MergedUnix.AsTimePtr()
}
}
if issue.DeadlineUnix != 0 {
apiIssue.Deadline = issue.DeadlineUnix.AsTimePtr()
}
return apiIssue
}
@ -1498,3 +1531,30 @@ func updateIssue(e Engine, issue *Issue) error {
func UpdateIssue(issue *Issue) error {
return updateIssue(x, issue)
}
// UpdateIssueDeadline updates an issue deadline and adds comments. Setting a deadline to 0 means deleting it.
func UpdateIssueDeadline(issue *Issue, deadlineUnix util.TimeStamp, doer *User) (err error) {
// if the deadline hasn't changed do nothing
if issue.DeadlineUnix == deadlineUnix {
return nil
}
sess := x.NewSession()
defer sess.Close()
if err := sess.Begin(); err != nil {
return err
}
// Update the deadline
if err = updateIssueCols(sess, &Issue{ID: issue.ID, DeadlineUnix: deadlineUnix}, "deadline_unix"); err != nil {
return err
}
// Make the comment
if _, err = createDeadlineComment(sess, doer, issue, deadlineUnix); err != nil {
return fmt.Errorf("createRemovedDueDateComment: %v", err)
}
return sess.Commit()
}

View File

@ -60,6 +60,12 @@ const (
CommentTypeAddTimeManual
// Cancel a stopwatch for time tracking
CommentTypeCancelTracking
// Added a due date
CommentTypeAddedDeadline
// Modified the due date
CommentTypeModifiedDeadline
// Removed a due date
CommentTypeRemovedDeadline
)
// CommentTag defines comment tag type
@ -418,7 +424,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
}
// update the issue's updated_unix column
if err = updateIssueCols(e, opts.Issue); err != nil {
if err = updateIssueCols(e, opts.Issue, "updated_unix"); err != nil {
return nil, err
}
@ -485,6 +491,34 @@ func createAssigneeComment(e *xorm.Session, doer *User, repo *Repository, issue
})
}
func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlineUnix util.TimeStamp) (*Comment, error) {
var content string
var commentType CommentType
// newDeadline = 0 means deleting
if newDeadlineUnix == 0 {
commentType = CommentTypeRemovedDeadline
content = issue.DeadlineUnix.Format("2006-01-02")
} else if issue.DeadlineUnix == 0 {
// Check if the new date was added or modified
// If the actual deadline is 0 => deadline added
commentType = CommentTypeAddedDeadline
content = newDeadlineUnix.Format("2006-01-02")
} else { // Otherwise modified
commentType = CommentTypeModifiedDeadline
content = newDeadlineUnix.Format("2006-01-02") + "|" + issue.DeadlineUnix.Format("2006-01-02")
}
return createComment(e, &CreateCommentOptions{
Type: commentType,
Doer: doer,
Repo: issue.Repo,
Issue: issue,
Content: content,
})
}
func createChangeTitleComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue, oldTitle, newTitle string) (*Comment, error) {
return createComment(e, &CreateCommentOptions{
Type: CommentTypeChangeTitle,

View File

@ -290,6 +290,50 @@ func (issues IssueList) loadComments(e Engine) (err error) {
return nil
}
func (issues IssueList) loadTotalTrackedTimes(e Engine) (err error) {
type totalTimesByIssue struct {
IssueID int64
Time int64
}
if len(issues) == 0 {
return nil
}
var trackedTimes = make(map[int64]int64, len(issues))
var ids = make([]int64, 0, len(issues))
for _, issue := range issues {
if issue.Repo.IsTimetrackerEnabled() {
ids = append(ids, issue.ID)
}
}
// select issue_id, sum(time) from tracked_time where issue_id in (<issue ids in current page>) group by issue_id
rows, err := e.Table("tracked_time").
Select("issue_id, sum(time) as time").
In("issue_id", ids).
GroupBy("issue_id").
Rows(new(totalTimesByIssue))
if err != nil {
return err
}
defer rows.Close()
for rows.Next() {
var totalTime totalTimesByIssue
err = rows.Scan(&totalTime)
if err != nil {
return err
}
trackedTimes[totalTime.IssueID] = totalTime.Time
}
for _, issue := range issues {
issue.TotalTrackedTime = trackedTimes[issue.ID]
}
return nil
}
// loadAttributes loads all attributes, expect for attachments and comments
func (issues IssueList) loadAttributes(e Engine) (err error) {
if _, err = issues.loadRepositories(e); err != nil {
@ -316,6 +360,10 @@ func (issues IssueList) loadAttributes(e Engine) (err error) {
return
}
if err = issues.loadTotalTrackedTimes(e); err != nil {
return
}
return nil
}

View File

@ -7,6 +7,8 @@ package models
import (
"testing"
"code.gitea.io/gitea/modules/setting"
"github.com/stretchr/testify/assert"
)
@ -29,7 +31,7 @@ func TestIssueList_LoadRepositories(t *testing.T) {
func TestIssueList_LoadAttributes(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
setting.Service.EnableTimetracking = true
issueList := IssueList{
AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue),
AssertExistsAndLoadBean(t, &Issue{ID: 2}).(*Issue),
@ -61,5 +63,10 @@ func TestIssueList_LoadAttributes(t *testing.T) {
for _, comment := range issue.Comments {
assert.EqualValues(t, issue.ID, comment.IssueID)
}
if issue.ID == int64(1) {
assert.Equal(t, int64(400), issue.TotalTrackedTime)
} else if issue.ID == int64(2) {
assert.Equal(t, int64(3662), issue.TotalTrackedTime)
}
}
}

View File

@ -29,6 +29,8 @@ type Milestone struct {
DeadlineString string `xorm:"-"`
DeadlineUnix util.TimeStamp
ClosedDateUnix util.TimeStamp
TotalTrackedTime int64 `xorm:"-"`
}
// BeforeUpdate is invoked from XORM before updating this object.
@ -118,14 +120,69 @@ func GetMilestoneByRepoID(repoID, id int64) (*Milestone, error) {
return getMilestoneByRepoID(x, repoID, id)
}
// MilestoneList is a list of milestones offering additional functionality
type MilestoneList []*Milestone
func (milestones MilestoneList) loadTotalTrackedTimes(e Engine) error {
type totalTimesByMilestone struct {
MilestoneID int64
Time int64
}
if len(milestones) == 0 {
return nil
}
var trackedTimes = make(map[int64]int64, len(milestones))
// Get total tracked time by milestone_id
rows, err := e.Table("issue").
Join("INNER", "milestone", "issue.milestone_id = milestone.id").
Join("LEFT", "tracked_time", "tracked_time.issue_id = issue.id").
Select("milestone_id, sum(time) as time").
In("milestone_id", milestones.getMilestoneIDs()).
GroupBy("milestone_id").
Rows(new(totalTimesByMilestone))
if err != nil {
return err
}
defer rows.Close()
for rows.Next() {
var totalTime totalTimesByMilestone
err = rows.Scan(&totalTime)
if err != nil {
return err
}
trackedTimes[totalTime.MilestoneID] = totalTime.Time
}
for _, milestone := range milestones {
milestone.TotalTrackedTime = trackedTimes[milestone.ID]
}
return nil
}
// LoadTotalTrackedTimes loads for every milestone in the list the TotalTrackedTime by a batch request
func (milestones MilestoneList) LoadTotalTrackedTimes() error {
return milestones.loadTotalTrackedTimes(x)
}
func (milestones MilestoneList) getMilestoneIDs() []int64 {
var ids = make([]int64, 0, len(milestones))
for _, ms := range milestones {
ids = append(ids, ms.ID)
}
return ids
}
// GetMilestonesByRepoID returns all milestones of a repository.
func GetMilestonesByRepoID(repoID int64) ([]*Milestone, error) {
func GetMilestonesByRepoID(repoID int64) (MilestoneList, error) {
miles := make([]*Milestone, 0, 10)
return miles, x.Where("repo_id = ?", repoID).Find(&miles)
}
// GetMilestones returns a list of milestones of given repository and status.
func GetMilestones(repoID int64, page int, isClosed bool, sortType string) ([]*Milestone, error) {
func GetMilestones(repoID int64, page int, isClosed bool, sortType string) (MilestoneList, error) {
miles := make([]*Milestone, 0, setting.UI.IssuePagingNum)
sess := x.Where("repo_id = ? AND is_closed = ?", repoID, isClosed)
if page > 0 {
@ -146,7 +203,6 @@ func GetMilestones(repoID int64, page int, isClosed bool, sortType string) ([]*M
default:
sess.Asc("deadline_unix")
}
return miles, sess.Find(&miles)
}

View File

@ -253,3 +253,14 @@ func TestDeleteMilestoneByRepoID(t *testing.T) {
assert.NoError(t, DeleteMilestoneByRepoID(NonexistentID, NonexistentID))
}
func TestMilestoneList_LoadTotalTrackedTimes(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
miles := MilestoneList{
AssertExistsAndLoadBean(t, &Milestone{ID: 1}).(*Milestone),
}
assert.NoError(t, miles.LoadTotalTrackedTimes())
assert.Equal(t, miles[0].TotalTrackedTime, int64(3662))
}

View File

@ -69,7 +69,7 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error {
Doer: user,
Issue: issue,
Repo: issue.Repo,
Content: secToTime(timediff),
Content: SecToTime(timediff),
Type: CommentTypeStopTracking,
}); err != nil {
return err
@ -124,7 +124,8 @@ func CancelStopwatch(user *User, issue *Issue) error {
return nil
}
func secToTime(duration int64) string {
// SecToTime converts an amount of seconds to a human-readable string (example: 66s -> 1min 6s)
func SecToTime(duration int64) string {
seconds := duration % 60
minutes := (duration / (60)) % 60
hours := duration / (60 * 60)

View File

@ -279,3 +279,11 @@ func TestGetUserIssueStats(t *testing.T) {
assert.Equal(t, test.ExpectedIssueStats, *stats)
}
}
func TestIssue_loadTotalTimes(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
ms, err := GetIssueByID(2)
assert.NoError(t, err)
assert.NoError(t, ms.loadTotalTimes(x))
assert.Equal(t, int64(3662), ms.TotalTrackedTime)
}

View File

@ -11,6 +11,7 @@ import (
api "code.gitea.io/sdk/gitea"
"github.com/go-xorm/builder"
"github.com/go-xorm/xorm"
)
// TrackedTime represents a time that was spent for a specific issue.
@ -44,6 +45,7 @@ type FindTrackedTimesOptions struct {
IssueID int64
UserID int64
RepositoryID int64
MilestoneID int64
}
// ToCond will convert each condition into a xorm-Cond
@ -58,16 +60,23 @@ func (opts *FindTrackedTimesOptions) ToCond() builder.Cond {
if opts.RepositoryID != 0 {
cond = cond.And(builder.Eq{"issue.repo_id": opts.RepositoryID})
}
if opts.MilestoneID != 0 {
cond = cond.And(builder.Eq{"issue.milestone_id": opts.MilestoneID})
}
return cond
}
// ToSession will convert the given options to a xorm Session by using the conditions from ToCond and joining with issue table if required
func (opts *FindTrackedTimesOptions) ToSession(e Engine) *xorm.Session {
if opts.RepositoryID > 0 || opts.MilestoneID > 0 {
return e.Join("INNER", "issue", "issue.id = tracked_time.issue_id").Where(opts.ToCond())
}
return x.Where(opts.ToCond())
}
// GetTrackedTimes returns all tracked times that fit to the given options.
func GetTrackedTimes(options FindTrackedTimesOptions) (trackedTimes []*TrackedTime, err error) {
if options.RepositoryID > 0 {
err = x.Join("INNER", "issue", "issue.id = tracked_time.issue_id").Where(options.ToCond()).Find(&trackedTimes)
return
}
err = x.Where(options.ToCond()).Find(&trackedTimes)
err = options.ToSession(x).Find(&trackedTimes)
return
}
@ -85,7 +94,7 @@ func AddTime(user *User, issue *Issue, time int64) (*TrackedTime, error) {
Issue: issue,
Repo: issue.Repo,
Doer: user,
Content: secToTime(time),
Content: SecToTime(time),
Type: CommentTypeAddTimeManual,
}); err != nil {
return nil, err
@ -115,7 +124,7 @@ func TotalTimes(options FindTrackedTimesOptions) (map[*User]string, error) {
}
return nil, err
}
totalTimes[user] = secToTime(total)
totalTimes[user] = SecToTime(total)
}
return totalTimes, nil
}

View File

@ -176,6 +176,10 @@ var migrations = []Migration{
NewMigration("add is_fsck_enabled column for repos", addFsckEnabledToRepo),
// v61 -> v62
NewMigration("add size column for attachments", addSizeToAttachment),
// v62 -> v63
NewMigration("add last used passcode column for TOTP", addLastUsedPasscodeTOTP),
// v63 -> v64
NewMigration("add language column for user setting", addLanguageSetting),
}
// Migrate database to current version

22
models/migrations/v62.go Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"fmt"
"github.com/go-xorm/xorm"
)
func addLastUsedPasscodeTOTP(x *xorm.Engine) error {
type TwoFactor struct {
LastUsedPasscode string `xorm:"VARCHAR(10)"`
}
if err := x.Sync2(new(TwoFactor)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
return nil
}

23
models/migrations/v63.go Normal file
View File

@ -0,0 +1,23 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"fmt"
"github.com/go-xorm/xorm"
)
func addLanguageSetting(x *xorm.Engine) error {
type User struct {
Language string `xorm:"VARCHAR(5)"`
}
if err := x.Sync2(new(User)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
return nil
}

View File

@ -97,14 +97,17 @@ func GetActiveOAuth2Providers() ([]string, map[string]OAuth2Provider, error) {
}
// InitOAuth2 initialize the OAuth2 lib and register all active OAuth2 providers in the library
func InitOAuth2() {
oauth2.Init()
func InitOAuth2() error {
if err := oauth2.Init(x); err != nil {
return err
}
loginSources, _ := GetActiveOAuth2ProviderLoginSources()
for _, source := range loginSources {
oAuth2Config := source.OAuth2()
oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL, oAuth2Config.CustomURLMapping)
}
return nil
}
// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2

View File

@ -207,6 +207,7 @@ func (pr *PullRequest) APIFormat() *api.PullRequest {
Base: apiBaseBranchInfo,
Head: apiHeadBranchInfo,
MergeBase: pr.MergeBase,
Deadline: apiIssue.Deadline,
Created: pr.Issue.CreatedUnix.AsTimePtr(),
Updated: pr.Issue.UpdatedUnix.AsTimePtr(),
}

View File

@ -163,6 +163,7 @@ func NewRepoContext() {
type Repository struct {
ID int64 `xorm:"pk autoincr"`
OwnerID int64 `xorm:"UNIQUE(s)"`
OwnerName string `xorm:"-"`
Owner *User `xorm:"-"`
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
Name string `xorm:"INDEX NOT NULL"`
@ -225,9 +226,17 @@ func (repo *Repository) MustOwner() *User {
return repo.mustOwner(x)
}
// MustOwnerName always returns valid owner name to avoid
// conceptually impossible error handling.
// It returns "error" and logs error details when error
// occurs.
func (repo *Repository) MustOwnerName() string {
return repo.mustOwnerName(x)
}
// FullName returns the repository full name
func (repo *Repository) FullName() string {
return repo.MustOwner().Name + "/" + repo.Name
return repo.MustOwnerName() + "/" + repo.Name
}
// HTMLURL returns the repository HTML URL
@ -479,6 +488,41 @@ func (repo *Repository) mustOwner(e Engine) *User {
return repo.Owner
}
func (repo *Repository) getOwnerName(e Engine) error {
if len(repo.OwnerName) > 0 {
return nil
}
if repo.Owner != nil {
repo.OwnerName = repo.Owner.Name
return nil
}
u := new(User)
has, err := e.ID(repo.OwnerID).Cols("name").Get(u)
if err != nil {
return err
} else if !has {
return ErrUserNotExist{repo.OwnerID, "", 0}
}
repo.OwnerName = u.Name
return nil
}
// GetOwnerName returns the repository owner name
func (repo *Repository) GetOwnerName() error {
return repo.getOwnerName(x)
}
func (repo *Repository) mustOwnerName(e Engine) string {
if err := repo.getOwnerName(e); err != nil {
log.Error(4, "Error loading repository owner name: %v", err)
return "error"
}
return repo.OwnerName
}
// ComposeMetas composes a map of metas for rendering external issue tracker URL.
func (repo *Repository) ComposeMetas() map[string]string {
unit, err := repo.GetUnit(UnitTypeExternalTracker)
@ -590,7 +634,7 @@ func (repo *Repository) GetBaseRepo() (err error) {
}
func (repo *Repository) repoPath(e Engine) string {
return RepoPath(repo.mustOwner(e).Name, repo.Name)
return RepoPath(repo.mustOwnerName(e), repo.Name)
}
// RepoPath returns the repository path
@ -1133,7 +1177,7 @@ type CreateRepoOptions struct {
}
func getRepoInitFile(tp, name string) ([]byte, error) {
cleanedName := strings.TrimLeft(name, "./")
cleanedName := strings.TrimLeft(path.Clean("/"+name), "/")
relPath := path.Join("options", tp, cleanedName)
// Use custom file when available.
@ -2141,7 +2185,7 @@ func ReinitMissingRepositories() error {
// SyncRepositoryHooks rewrites all repositories' pre-receive, update and post-receive hooks
// to make sure the binary and custom conf path are up-to-date.
func SyncRepositoryHooks() error {
return x.Where("id > 0").Iterate(new(Repository),
return x.Cols("owner_id", "name").Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error {
if err := createDelegateHooks(bean.(*Repository).RepoPath()); err != nil {
return fmt.Errorf("SyncRepositoryHook: %v", err)

View File

@ -23,12 +23,13 @@ import (
// TwoFactor represents a two-factor authentication token.
type TwoFactor struct {
ID int64 `xorm:"pk autoincr"`
UID int64 `xorm:"UNIQUE"`
Secret string
ScratchToken string
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
ID int64 `xorm:"pk autoincr"`
UID int64 `xorm:"UNIQUE"`
Secret string
ScratchToken string
LastUsedPasscode string `xorm:"VARCHAR(10)"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
}
// GenerateScratchToken recreates the scratch token the user is using.

View File

@ -94,6 +94,7 @@ type User struct {
Website string
Rands string `xorm:"VARCHAR(10)"`
Salt string `xorm:"VARCHAR(10)"`
Language string `xorm:"VARCHAR(5)"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
@ -185,6 +186,7 @@ func (u *User) APIFormat() *api.User {
FullName: u.FullName,
Email: u.getEmail(),
AvatarURL: u.AvatarLink(),
Language: u.Language,
}
}
@ -652,7 +654,7 @@ func NewGhostUser() *User {
}
var (
reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."}
reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "error", "new", ".", ".."}
reservedUserPatterns = []string{"*.keys"}
)

View File

@ -67,7 +67,7 @@ func WikiPath(userName, repoName string) string {
// WikiPath returns wiki data path for given repository.
func (repo *Repository) WikiPath() string {
return WikiPath(repo.MustOwner().Name, repo.Name)
return WikiPath(repo.MustOwnerName(), repo.Name)
}
// HasWiki returns true if repository has wiki.

View File

@ -153,6 +153,7 @@ func TestRepository_LocalWikiPath(t *testing.T) {
}
func TestRepository_AddWikiPage(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())
const wikiContent = "This is the wiki content"
const commitMsg = "Commit message"
repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository)
@ -161,23 +162,30 @@ func TestRepository_AddWikiPage(t *testing.T) {
"Another page",
"Here's a <tag> and a/slash",
} {
PrepareTestEnv(t)
assert.NoError(t, repo.AddWikiPage(doer, wikiName, wikiContent, commitMsg))
expectedPath := path.Join(repo.LocalWikiPath(), WikiNameToFilename(wikiName))
assert.True(t, com.IsExist(expectedPath))
wikiName := wikiName
t.Run("test wiki exist: "+wikiName, func(t *testing.T) {
t.Parallel()
assert.NoError(t, repo.AddWikiPage(doer, wikiName, wikiContent, commitMsg))
expectedPath := path.Join(repo.LocalWikiPath(), WikiNameToFilename(wikiName))
assert.True(t, com.IsExist(expectedPath))
})
}
// test for already-existing wiki name
PrepareTestEnv(t)
err := repo.AddWikiPage(doer, "Home", wikiContent, commitMsg)
assert.Error(t, err)
assert.True(t, IsErrWikiAlreadyExist(err))
t.Run("check wiki already exist", func(t *testing.T) {
t.Parallel()
// test for already-existing wiki name
err := repo.AddWikiPage(doer, "Home", wikiContent, commitMsg)
assert.Error(t, err)
assert.True(t, IsErrWikiAlreadyExist(err))
})
// test for reserved wiki name
PrepareTestEnv(t)
err = repo.AddWikiPage(doer, "_edit", wikiContent, commitMsg)
assert.Error(t, err)
assert.True(t, IsErrWikiReservedName(err))
t.Run("check wiki reserved name", func(t *testing.T) {
t.Parallel()
// test for reserved wiki name
err := repo.AddWikiPage(doer, "_edit", wikiContent, commitMsg)
assert.Error(t, err)
assert.True(t, IsErrWikiReservedName(err))
})
}
func TestRepository_EditWikiPage(t *testing.T) {

View File

@ -25,6 +25,8 @@ type AuthenticationForm struct {
AttributeSurname string
AttributeMail string
AttributesInBind bool
UsePagedSearch bool
SearchPageSize int
Filter string
AdminFilter string
IsActive bool

View File

@ -42,6 +42,7 @@ type Source struct {
AttributeSurname string // Surname attribute
AttributeMail string // E-mail attribute
AttributesInBind bool // fetch attributes in bind context (not user)
SearchPageSize uint32 // Search with paging page size
Filter string // Query filter to validate entry
AdminFilter string // Query filter to check if user is admin
Enabled bool // if this source is disabled
@ -269,6 +270,11 @@ func (ls *Source) SearchEntry(name, passwd string, directBind bool) *SearchResul
}
}
// UsePagedSearch returns if need to use paged search
func (ls *Source) UsePagedSearch() bool {
return ls.SearchPageSize > 0
}
// SearchEntries : search an LDAP source for all users matching userFilter
func (ls *Source) SearchEntries() []*SearchResult {
l, err := dial(ls)
@ -298,7 +304,12 @@ func (ls *Source) SearchEntries() []*SearchResult {
[]string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail},
nil)
sr, err := l.Search(search)
var sr *ldap.SearchResult
if ls.UsePagedSearch() {
sr, err = l.SearchWithPaging(search, ls.SearchPageSize)
} else {
sr, err = l.Search(search)
}
if err != nil {
log.Error(4, "LDAP Search failed unexpectedly! (%v)", err)
return nil

View File

@ -7,13 +7,12 @@ package oauth2
import (
"math"
"net/http"
"os"
"path/filepath"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/gorilla/sessions"
"github.com/go-xorm/xorm"
"github.com/lafriks/xormstore"
"github.com/markbates/goth"
"github.com/markbates/goth/gothic"
"github.com/markbates/goth/providers/bitbucket"
@ -41,13 +40,14 @@ type CustomURLMapping struct {
}
// Init initialize the setup of the OAuth2 library
func Init() {
sessionDir := filepath.Join(setting.AppDataPath, "sessions", "oauth2")
if err := os.MkdirAll(sessionDir, 0700); err != nil {
log.Fatal(4, "Fail to create dir %s: %v", sessionDir, err)
}
func Init(x *xorm.Engine) error {
store, err := xormstore.NewOptions(x, xormstore.Options{
TableName: "oauth2_session",
}, []byte(sessionUsersStoreKey))
store := sessions.NewFilesystemStore(sessionDir, []byte(sessionUsersStoreKey))
if err != nil {
return err
}
// according to the Goth lib:
// set the maxLength of the cookies stored on the disk to a larger number to prevent issues with:
// securecookie: the value is too long
@ -65,6 +65,7 @@ func Init() {
return req.Header.Get(providerHeaderKey), nil
}
return nil
}
// Auth OAuth2 auth service

View File

@ -521,3 +521,13 @@ func (f *AddTimeManuallyForm) Validate(ctx *macaron.Context, errs binding.Errors
type SaveTopicForm struct {
Topics []string `binding:"topics;Required;"`
}
// DeadlineForm hold the validation rules for deadlines
type DeadlineForm struct {
DateString string `form:"date" binding:"Required;Size(10)"`
}
// Validate validates the fields
func (f *DeadlineForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}

View File

@ -109,6 +109,7 @@ type UpdateProfileForm struct {
KeepEmailPrivate bool
Website string `binding:"ValidUrl;MaxSize(255)"`
Location string `binding:"MaxSize(50)"`
Language string `binding:"Size(5)"`
}
// Validate validates the fields

View File

@ -23,6 +23,7 @@ import (
"unicode"
"unicode/utf8"
"code.gitea.io/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
@ -559,3 +560,25 @@ func IsPDFFile(data []byte) bool {
func IsVideoFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "video/") != -1
}
// EntryIcon returns the octicon class for displaying files/directories
func EntryIcon(entry *git.TreeEntry) string {
switch {
case entry.IsLink():
te, err := entry.FollowLink()
if err != nil {
log.Debug(err.Error())
return "file-symlink-file"
}
if te.IsDir() {
return "file-symlink-directory"
}
return "file-symlink-file"
case entry.IsDir():
return "file-directory"
case entry.IsSubModule():
return "file-submodule"
}
return "file-text"
}

View File

@ -83,6 +83,8 @@ type link struct {
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
var oidRegExp = regexp.MustCompile(`^[A-Fa-f0-9]+$`)
// ObjectOidHandler is the main request routing entry point into LFS server functions
func ObjectOidHandler(ctx *context.Context) {
@ -217,6 +219,12 @@ func PostHandler(ctx *context.Context) {
if !authenticate(ctx, repository, rv.Authorization, true) {
requireAuth(ctx)
return
}
if !oidRegExp.MatchString(rv.Oid) {
writeStatus(ctx, 404)
return
}
meta, err := models.NewLFSMetaObject(&models.LFSMetaObject{Oid: rv.Oid, Size: rv.Size, RepositoryID: repository.ID})
@ -284,10 +292,12 @@ func BatchHandler(ctx *context.Context) {
continue
}
// Object is not found
meta, err = models.NewLFSMetaObject(&models.LFSMetaObject{Oid: object.Oid, Size: object.Size, RepositoryID: repository.ID})
if err == nil {
responseObjects = append(responseObjects, Represent(object, meta, meta.Existing, !contentStore.Exists(meta)))
if oidRegExp.MatchString(object.Oid) {
// Object is not found
meta, err = models.NewLFSMetaObject(&models.LFSMetaObject{Oid: object.Oid, Size: object.Size, RepositoryID: repository.ID})
if err == nil {
responseObjects = append(responseObjects, Represent(object, meta, meta.Existing, !contentStore.Exists(meta)))
}
}
}

View File

@ -75,6 +75,7 @@ func NewFuncMap() []template.FuncMap {
"RawTimeSince": base.RawTimeSince,
"FileSize": base.FileSize,
"Subtract": base.Subtract,
"EntryIcon": base.EntryIcon,
"Add": func(a, b int) int {
return a + b
},
@ -179,8 +180,12 @@ func NewFuncMap() []template.FuncMap {
}
return dict, nil
},
"Printf": fmt.Sprintf,
"Escape": Escape,
"Printf": fmt.Sprintf,
"Escape": Escape,
"Sec2Time": models.SecToTime,
"ParseDeadline": func(deadline string) []string {
return strings.Split(deadline, "|")
},
}}
}

View File

@ -13,10 +13,11 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"net/http/httptest"
"github.com/go-macaron/session"
"github.com/stretchr/testify/assert"
"gopkg.in/macaron.v1"
"net/http/httptest"
)
// MockContext mock context for unit tests
@ -48,6 +49,16 @@ func LoadRepo(t *testing.T, ctx *context.Context, repoID int64) {
ctx.Repo.RepoLink = ctx.Repo.Repository.Link()
}
// LoadRepoCommit loads a repo's commit into a test context.
func LoadRepoCommit(t *testing.T, ctx *context.Context) {
gitRepo, err := git.OpenRepository(ctx.Repo.Repository.RepoPath())
assert.NoError(t, err)
branch, err := gitRepo.GetHEADBranch()
assert.NoError(t, err)
ctx.Repo.Commit, err = gitRepo.GetBranchCommit(branch.Name)
assert.NoError(t, err)
}
// LoadUser load a user into a test context.
func LoadUser(t *testing.T, ctx *context.Context, userID int64) {
ctx.User = models.AssertExistsAndLoadBean(t, &models.User{ID: userID}).(*models.User)

View File

@ -28,7 +28,7 @@ password=Passwort
re_type=Passwort erneut eingeben
captcha=CAPTCHA
twofa=Zwei-Faktor-Authentifizierung
twofa_scratch=Zwei-Faktor-Scratch-Code
twofa_scratch=Zwei-Faktor-Einmalpasswort
passcode=PIN
repository=Repository
@ -81,10 +81,12 @@ err_empty_admin_password=Das Administrator-Passwort darf nicht leer sein.
general_title=Allgemeine Einstellungen
app_name=Seitentitel
app_name_helper=Gebe hier den Namen deines Unternehmens ein.
repo_path=Repository-Verzeichnis
repo_path_helper=Remote-Git-Repositories werden in diesem Verzeichnis gespeichert.
lfs_path=Git LFS-Wurzelpfad
lfs_path_helper=In diesem Verzeichnis werden die Dateien von Git LFS abgespeichert. Leer lassen um LFS zu deaktivieren.
run_user=Ausführen als
run_user_helper=Gebe den Betriebssystem-Benutzernamen ein, unter welchem Gitea laufen soll. Beachte, dass dieser Nutzer Zugriff auf den Repository-Ordner haben muss.
domain=SSH Server-Domain
domain_helper=Domain oder Host-Adresse für die SSH-URL.
@ -144,6 +146,7 @@ default_allow_create_organization=Erstellen von Organisationen standarmäßig er
default_allow_create_organization_popup=Neuen Nutzern das Erstellen von Organisationen standardmäßig erlauben.
default_enable_timetracking=Zeiterfassung standardmäßig aktivieren
default_enable_timetracking_popup=Zeiterfassung standardmäßig für neue Repositories aktivieren.
no_reply_address_helper=Domain-Namen für Benutzer mit einer versteckten Emailadresse. Zum Beispiel wird der Benutzername "Joe" in Git als "joe@noreply.example.org" protokolliert, wenn die versteckte E-Mail-Domäne "noreply.example.org" festgelegt ist.
[home]
uname_holder=E-Mail-Adresse oder Benutzername
@ -185,23 +188,29 @@ confirmation_mail_sent_prompt=Eine neue Bestätigungs-E-Mail wurde an <b>%s</b>
reset_password_mail_sent_prompt=Eine E-Mail wurde an <b>%s</b> gesendet. Bitte überprüfe dein Postfach innerhalb der nächsten %s, um das Passwort zurückzusetzen.
active_your_account=Aktiviere dein Konto
prohibit_login=Anmelden verboten
resent_limit_prompt=Du hast bereits eine Aktivierungs-E-Mail angefordert. Bitte warte 3 Minuten und probiere es dann nochmal.
has_unconfirmed_mail=Hallo %s, du hast eine unbestätigte E-Mail-Adresse (<b>%s</b>). Wenn du keine Bestätigungs-E-Mail erhalten hast oder eine neue senden möchtest, klicke bitte auf den folgenden Button.
resend_mail=Aktivierungs-E-Mail erneut verschicken
email_not_associate=Diese E-Mail-Adresse ist mit keinem Konto verknüpft.
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
use_scratch_code=Einmalpasswort verwenden
twofa_scratch_used=Du hast dein Einmalpasswort verwendet. Du wurdest zu den Einstellung der Zwei-Faktor-Authentifizierung umgeleitet, dort kannst du dein Gerät abmelden oder ein neues Einmalpasswort erzeugen.
twofa_passcode_incorrect=Ungültige PIN. Wenn du dein Gerät verloren hast, verwende dein Einmalpasswort.
twofa_scratch_token_incorrect=Das Einmalpasswort ist falsch.
login_userpass=Anmelden
login_openid=OpenID
openid_connect_submit=Verbinden
openid_connect_title=Mit bestehendem Konto verbinden
openid_register_title=Neues Konto einrichten
openid_signin_desc=Gib deine OpenID-URI ein. Zum Beispiel: https://anne.me, bob.openid.org.cn oder gnusocial.net/carry.
disable_forgot_password_mail=Das Zurücksetzen von Passwörtern wurde deaktiviert. Bitte wende dich an den Administrator.
[mail]
activate_account=Bitte aktiviere dein Konto
@ -236,6 +245,9 @@ TreeName=Dateipfad
Content=Inhalt
require_error=` darf nicht leer sein.`
alpha_dash_error=` sollte nur Buchstaben, Zahlen, Bindestriche ('-') und Unterstriche ('_') enthalten`
alpha_dash_dot_error=` sollte nur Buchstaben, Zahlen, Bindestriche ('-'), Unterstriche ('_') und Punkte ('.') enthalten`
git_ref_name_error=` muss ein wohlgeformter Git-Referenzname sein.`
size_error=` muss die Größe %s haben.`
min_size_error=` muss mindestens %s Zeichen enthalten.`
max_size_error=` darf höchstens %s Zeichen enthalten.`
@ -250,13 +262,24 @@ username_been_taken=Der Benutzername ist bereits vergeben.
repo_name_been_taken=Der Repository-Name wird schon verwendet.
org_name_been_taken=Der Organisationsname ist bereits vergeben.
team_name_been_taken=Der Teamname ist bereits vergeben.
team_no_units_error=Das Team muss auf mindestens einen Bereich Zugriff haben.
email_been_used=Die E-Mail-Adresse wird bereits verwendet.
openid_been_used=Die OpenID-Adresse "%s" wird bereits verwendet.
username_password_incorrect=Benutzername oder Passwort ist falsch.
enterred_invalid_repo_name=Der eingegebenen Repository-Name ist falsch.
enterred_invalid_owner_name=Der Name des neuen Besitzers ist invalid.
enterred_invalid_password=Das eingegebene Passwort ist falsch.
user_not_exist=Dieser Benutzer ist nicht vorhanden.
last_org_owner=Du kannst den letzten Benutzer nicht aus dem "Besitzer"-Team entferenen. Es muss mindestens ein Besitzer in einer Organisation geben.
cannot_add_org_to_team=Eine Organisation kann nicht als Teammitglied hinzugefügt werden.
invalid_ssh_key=Dein SSH-Key kann nicht überprüft werden: %s
invalid_gpg_key=Dein GPG-Key kann nicht überprüft werden: %s
unable_verify_ssh_key=Dein SSH-Key kann nicht überprüft werden, probiere es erneut.
auth_failed=Authentifizierung fehlgeschlagen: %v
still_own_repo=Dein Konto besitzt ein oder mehrere Repositories. Diese müssen zuerst gelöscht oder übertragen werden.
org_still_own_repo=Diese Organisation besitzt noch mindestens ein Repository. Bitte lösche oder übertrage diese zuerst.
target_branch_not_exist=Die Ziel-Branch existiert nicht.
@ -272,6 +295,7 @@ follow=Folgen
unfollow=Nicht mehr folgen
form.name_reserved=Der Benutzername '%s' ist reserviert.
form.name_pattern_not_allowed='%s' ist nicht erlaubt für Benutzernamen.
[settings]
profile=Profil
@ -290,17 +314,23 @@ organization=Organisationen
uid=Uid
public_profile=Öffentliches Profil
profile_desc=Deine E-Mail-Adresse wird für Benachrichtigungen und anderes verwendet.
password_username_disabled=Benutzer, die nicht von Gitea verwaltet werden können ihren Benutzernamen nicht ändern. Bitte kontaktiere deinen Administrator für mehr Details.
full_name=Vollständiger Name
website=Webseite
location=Standort
update_profile=Profil aktualisieren
update_profile_success=Dein Profil wurde aktualisiert.
change_username=Dein Benutzername wurde geändert.
change_username_prompt=Hinweis: Wenn du deinen Benutzernamen änderst, wird auch deine Konto-URL geändert.
continue=Weiter
cancel=Abbrechen
lookup_avatar_by_mail=Avatar anhand der E-Mail-Addresse suchen
federated_avatar_lookup=Suche nach föderierten Profilbildern
enable_custom_avatar=Benutzerdefiniertes Profilbild benutzen
choose_new_avatar=Neues Profilbild auswählen
update_avatar=Profilbild aktualisieren
delete_current_avatar=Aktuelles Profilbild löschen
uploaded_avatar_not_a_image=Die hochgeladene Datei ist kein Bild.
update_avatar_success=Dein Profilbild wurde geändert.
@ -309,15 +339,33 @@ change_password=Passwort aktualisieren
old_password=Aktuelles Passwort
new_password=Neues Passwort
retype_new_password=Neues Passwort erneut eingeben
password_incorrect=Das aktuelle Passwort ist falsch.
change_password_success=Dein Passwort wurde aktualisiert. Bitte verwende dieses beim nächsten Einloggen.
password_change_disabled=Benutzer, die nicht von Gitea verwaltet werden, können ihr Passwort im Web Interface nicht ändern.
emails=E-Mail-Adressen
manage_emails=E-Mail-Adressen verwalten
manage_openid=OpenID-Adressen verwalten
email_desc=Deine primäre E-Mail-Adresse wird für Benachrichtigungen und andere Funktionen verwendet.
primary=Primär
primary_email=Als primäre E-Mail-Adresse verwenden
delete_email=Löschen
email_deletion=E-Mail-Adresse löschen
email_deletion_desc=Die E-Mail-Adresse und die damit verbundenen Informationen werden von deinem Konto entfernt. Git-Commits von dieser E-Mail-Addresse bleiben unverändert. Fortfahren?
email_deletion_success=Die E-Mail-Adresse wurde entfernt.
openid_deletion=OpenID-Adresse löschen
openid_deletion_desc=Du wirst dich nicht mehr mit dieser OpenID anmelden können, wenn du sie löschst. Fortfahren?
openid_deletion_success=Die OpenID-Adresse wurde gelöscht.
add_new_email=Neue E-Mail-Adresse hinzufügen
add_new_openid=Neue OpenID-URI hinzufügen
add_email=E-Mail-Adresse hinzufügen
add_openid=OpenID-URI hinzufügen
add_email_confirmation_sent=Eine Bestätigungs-E-Mail wurde an '%s' gesendet. Bitte überprüfe dein Postfach innerhalb der nächsten %s, um die E-Mail-Adresse zu bestätigen.
add_email_success=Die neue E-Mail-Addresse wurde hinzugefügt.
add_openid_success=Die neue OpenID-Adresse wurde hinzugefügt.
keep_email_private=E-Mail-Adresse verbergen
keep_email_private_popup=Deine E-Mail-Adresse wird für andere Benutzer ausgeblendet.
openid_desc=Mit OpenID kannst du dich über einen Drittanbieter authentifizieren.
manage_ssh_keys=SSH-Schlüssel verwalten
manage_gpg_keys=GPG-Schlüssel verwalten
@ -326,13 +374,18 @@ ssh_helper=<strong>Brauchst du Hilfe?</strong> Hier ist Githubs Anleitung zum <a
gpg_helper=<strong>Brauchst du Hilfe?</strong> Hier ist GitHubs Anleitung <a href="%s">über GPG</a>.
add_new_key=SSH-Schlüssel hinzufügen
add_new_gpg_key=GPG-Schlüssel hinzufügen
gpg_key_id_used=Ein öffentlicher GPG-Schlüssel mit der gleichen ID existiert bereits.
subkeys=Unterschlüssel
key_id=Schlüssel-ID
key_name=Schlüsselname
key_content=Inhalt
add_key_success=Der SSH-Schlüssel "%s" wurde hinzugefügt.
add_gpg_key_success=Der GPG-Key "%s" wurde hinzugefügt.
delete_key=Entfernen
ssh_key_deletion=SSH-Schlüssel entfernen
gpg_key_deletion=GPG-Schlüssel entfernen
ssh_key_deletion_desc=Wenn du einen SSH-Key entfernst, hast du mit diesem Key keinen Zugriff mehr. Fortfahren?
gpg_key_deletion_desc=Wenn du einen GPG-Key entfernst, können damit unterschriebenen Commits nicht mehr verifiziert werden. Fortfahren?
ssh_key_deletion_success=Der SSH-Schlüssel wurde entfernt.
gpg_key_deletion_success=Der GPG-Schlüssel wurde entfernt.
add_on=Hinzugefügt am
@ -349,17 +402,33 @@ hide_openid=Nicht im Profil anzeigen
ssh_disabled=SSH ist deaktiviert
manage_social=Verknüpfte soziale Konten verwalten
unbind=Trennen
unbind_success=Das Konto wurde von deinem Gitea-Konto getrennt.
manage_access_token=Zugriffstokens verwalten
generate_new_token=Neuen Token erzeugen
tokens_desc=Diese Tokens gewähren vollen Zugriff auf dein Konto via die Gitea-API.
new_token_desc=Anwendungen, die diesen Token benutzen haben Vollzugriff auf dein Konto.
token_name=Token-Name
generate_token=Token generieren
generate_token_success=Ein neuer Token wurde generiert. Kopiere diesen, da er nicht erneut angezeigt wird.
delete_token=Löschen
access_token_deletion=Zugriffstoken löschen
twofa_is_enrolled=Für dein Konto ist die Zwei-Faktor-Authentifizierung <strong>eingeschaltet</strong>.
twofa_not_enrolled=Für dein Konto ist die Zwei-Faktor-Authentifizierung momentan nicht eingeschaltet.
twofa_disable=Zwei-Faktor-Authentifizierung deaktivieren
twofa_scratch_token_regenerate=Neues Einmalpasswort erstellen
twofa_scratch_token_regenerated=Dein Einmalpasswort ist %s. Bewahre es an einem sicheren Ort auf.
twofa_enroll=Zwei-Faktor-Authentifizierung aktivieren
twofa_disable_note=Du kannst die Zwei-Faktor-Authentifizierung auch wieder deaktivieren.
twofa_disable_desc=Wenn du die Zwei-Faktor-Authentifizierung deaktivierst, wird die Sicherheit deines Kontos verringert. Fortfahren?
twofa_disabled=Zwei-Faktor-Authentifizierung wurde deaktiviert.
scan_this_image=Scanne diese Grafik mit deiner Authentifizierungs-App:
or_enter_secret=Oder gib das Secret ein: %s
then_enter_passcode=Und gebe dann die angezeigte PIN der Anwendung ein:
passcode_invalid=Die PIN ist falsch. Probiere es erneut.
twofa_enrolled=Die Zwei-Faktor-Authentifizierung wurde für dein Konto aktiviert. Bewahre dein Einmalpasswort (%s) an einem sicheren Ort auf, da es nicht wieder angezeigt werden wird.
orgs_none=Du bist kein Mitglied in einer Organisation.
@ -372,6 +441,7 @@ delete_account_title=Benutzerkonto löschen
[repo]
owner=Besitzer
repo_name=Repository-Name
repo_name_helper=Ein guter Repository-Name besteht normalerweise aus kurzen, unvergesslichen und einzigartigen Schlagwörtern.
visibility=Sichtbarkeit
fork_repo=Repository forken
fork_from=Fork von
@ -449,7 +519,9 @@ editor.upload_file=Datei hochladen
editor.edit_file=Datei bearbeiten
editor.preview_changes=Vorschau der Änderungen
editor.edit_this_file=Datei bearbeiten
editor.fork_before_edit=Du musst dieses Repository forken, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen.
editor.delete_this_file=Datei löschen
editor.must_have_write_access=Du benötigst Schreibzugriff, um Änderungen an dieser Datei vorzuschlagen oder vorzunehmen.
editor.file_delete_success=Datei '%s' wurde gelöscht.
editor.name_your_file=Dateinamen eingeben…
editor.or=oder
@ -466,13 +538,21 @@ editor.new_branch_name_desc=Neuer Branchname…
editor.cancel=Abbrechen
editor.filename_cannot_be_empty=Der Dateiname darf nicht leer sein.
editor.branch_already_exists=Branch '%s' existiert bereits in diesem Repository.
editor.directory_is_a_file=Der Verzeichnisname '%s' wird bereits als Dateiname in diesem Repository verwendet.
editor.file_is_a_symlink='%s' ist ein symolischer Link. Symbolische Links können mit dem Web Editor nicht bearbeitet werden.
editor.filename_is_a_directory=Der Dateiname '%s' wird bereits als Verzeichnisname in diesem Repository verwendet.
editor.file_editing_no_longer_exists=Die bearbeitete Datei '%s' existiert nicht mehr in diesem Repository.
editor.file_already_exists=Eine Datei mit dem Namen '%s' ist bereits in diesem Repository vorhanden.
editor.no_changes_to_show=Keine Änderungen vorhanden.
editor.fail_to_update_file=Fehler beim Ändern/Erstellen der Datei '%s'. Fehler: %v
editor.add_subdir=Verzeichnis erstellen…
editor.unable_to_upload_files=Fehler beim Hochladen der Dateien nach '%s'. Fehler: %v
editor.upload_files_to_dir=Dateien hochladen nach '%s'
editor.cannot_commit_to_protected_branch=Commit in den geschützten Branch '%s' ist nicht möglich.
commits.desc=Durchsuche die Quellcode Änderungshistorie.
commits.commits=Commits
commits.search=Commits durchsuchen…
commits.find=Suchen
commits.search_all=Alle Branches
commits.author=Autor
@ -483,7 +563,9 @@ commits.newer=Neuer
commits.signed_by=Signiert von
commits.gpg_key_id=GPG Schlüssel-ID
ext_issues=Externe Issues
issues.desc=Bearbeite Bug Reports, Aufgaben und Meilensteine.
issues.new=Neuer Issue
issues.new.labels=Label
issues.new.no_label=Kein Label
@ -499,9 +581,13 @@ issues.new.no_assignee=Niemand zuständig
issues.no_ref=Keine Branch/Tag angegeben
issues.create=Issue erstellen
issues.new_label=Neues Label
issues.new_label_placeholder=Labelname
issues.new_label_desc_placeholder=Beschreibung
issues.create_label=Label erstellen
issues.label_templates.title=Lade vordefinierte Label
issues.label_templates.info=Es existieren noch keine Labels. Erstelle ein neues Label ("Neues Label") oder verwende das Standard Label-Set:
issues.label_templates.helper=Wähle ein Label
issues.label_templates.use=Label-Set verwenden
issues.label_templates.fail_to_load_file=Fehler beim Laden der Label Template Datei '%s': %v
issues.add_label_at=hat das <div class="ui label"style="color: %s\; background-color: %s">%s</div>-Label %s hinzugefügt
issues.remove_label_at=hat das <div class="ui label"style="color: %s\; background-color: %s">%s</div>-Label %s entfernt
@ -517,8 +603,11 @@ issues.delete_branch_at=`löschte die Branch <b>%s</b> %s`
issues.open_tab=%d offen
issues.close_tab=%d geschlossen
issues.filter_label=Label
issues.filter_label_no_select=Alle Labels
issues.filter_milestone=Meilenstein
issues.filter_milestone_no_select=Alle Meilensteine
issues.filter_assignee=Zuständig
issues.filter_assginee_no_select=Alle Zuständigen
issues.filter_type=Typ
issues.filter_type.all_issues=Alle Issues
issues.filter_type.assigned_to_you=Dir zugewiesen
@ -549,7 +638,9 @@ issues.commented_at=`hat <a href="#%s">%s</a> kommentiert`
issues.delete_comment_confirm=Bist du sicher dass du diesen Kommentar löschen möchtest?
issues.no_content=Hier gibt es bis jetzt noch keinen Inhalt.
issues.close_issue=Schließen
issues.close_comment_issue=Kommentieren und schließen
issues.reopen_issue=Wieder öffnen
issues.reopen_comment_issue=Kommentieren und wieder öffnen
issues.create_comment=Kommentieren
issues.closed_at=`hat <a id="%[1]s" href="#%[1]s">%[2]s</a> geschlossen`
issues.reopened_at=`hat <a id="%[1]s" href="#%[1]s">%[2]s</a> wieder geöffnet`
@ -568,6 +659,10 @@ issues.label_count=%d Label
issues.label_open_issues=%d offene Issues
issues.label_edit=Bearbeiten
issues.label_delete=Löschen
issues.label_modify=Label bearbeiten
issues.label_deletion=Label löschen
issues.label_deletion_desc=Das Löschen des Labels entfernt es von allen Issues. Fortfahren?
issues.label_deletion_success=Das Label wurde gelöscht.
issues.label.filter_sort.alphabetically=Alphabetisch
issues.label.filter_sort.reverse_alphabetically=Umgekehrt alphabetisch
issues.label.filter_sort.by_size=Kleinste zuerst
@ -577,21 +672,24 @@ issues.attachment.open_tab=`Klicken um "%s" in einem neuen Tab zu öffnen`
issues.attachment.download=`Klicken um "%s" herunterzuladen`
issues.subscribe=Abonnieren
issues.unsubscribe=Abbestellen
issues.tracker=Zeiterfassung
issues.start_tracking_short=Start
issues.start_tracking=Zeiterfassung starten
issues.start_tracking_history=hat die Zeiterfassung %s gestartet
issues.tracking_already_started=`Du hast die Zeiterfassung bereits in <a href="%s">diesem Issue</a> gestartet!`
issues.stop_tracking=Stopp
issues.stop_tracking_history=hat die Zeiterfassung %s angehalten
issues.add_time=Zeit manuell hinzufügen
issues.add_time_cancel=Abbrechen
issues.add_time_history=hat %s gearbeitete Zeit hinzugefügt
issues.add_time_hours=Stunden
issues.add_time_minutes=Minuten
issues.cancel_tracking=Abbrechen
issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen
issues.time_spent_total=Zeitaufwand insgesamt
pulls.new=Neuer Pull-Request
pulls.compare_changes=Neuer Pull-Request
pulls.compare_compare=pull von
pulls.filter_branch=Branch filtern
pulls.no_results=Keine Ergebnisse verfügbar.
pulls.create=Pull-Request erstellen
@ -602,6 +700,7 @@ pulls.tab_commits=Commits
pulls.tab_files=Geänderte Dateien
pulls.reopen_to_merge=Bitte diesen Pull-Request wieder öffnen, um die Merge-Operation auszuführen.
pulls.merged=Zusammengeführt
pulls.has_merged=Der Pull-Request wurde zusammengeführt.
pulls.can_auto_merge_desc=Dieser Pull-Request kann automatisch zusammengeführt werden.
pulls.merge_pull_request=Pull-Request zusammenführen
pulls.rebase_merge_pull_request=Rebase und Mergen
@ -620,8 +719,14 @@ milestones.desc=Beschreibung
milestones.due_date=Fälligkeitsdatum (optional)
milestones.clear=Feld leeren
milestones.invalid_due_date_format=Das Fälligkeitsdatum muss das Format 'JJJJ-MM-TT' haben.
milestones.create_success=Der Meilenstein '%s' wurde erstellt.
milestones.edit=Meilenstein bearbeiten
milestones.cancel=Abbrechen
milestones.modify=Meilenstein bearbeiten
milestones.edit_success=Die Änderungen am Meilenstein "%s" wurden gespeichert.
milestones.deletion=Meilenstein löschen
milestones.deletion_desc=Das Löschen des Meilensteins entfernt ihn von allen Issues. Fortfahren?
milestones.deletion_success=Der Meilenstein wurde gelöscht.
milestones.filter_sort.closest_due_date=Nächster Stichtag
milestones.filter_sort.furthest_due_date=Fernster Stichtag
milestones.filter_sort.least_complete=Am wenigsten vollständig
@ -634,6 +739,7 @@ ext_wiki.desc=Verweis auf externes Wiki.
wiki=Wiki
wiki.welcome=Willkommen im Wiki.
wiki.desc=Schreibe und teile Dokumentation mit Mitarbeitern.
wiki.create_first_page=Erstelle die erste Seite
wiki.page=Seite
wiki.filter_page=Seite filtern
@ -645,6 +751,7 @@ wiki.edit_page_button=Bearbeiten
wiki.new_page_button=Neue Seite
wiki.delete_page_button=Seite löschen
wiki.page_already_exists=Eine Wiki-Seite mit dem gleichen Namen existiert bereits.
wiki.reserved_page=Der Wiki-Seitenname "%s" ist reserviert.
wiki.pages=Seiten
wiki.last_updated=Zuletzt aktualisiert %s
@ -707,16 +814,24 @@ settings.sync_mirror=Jetzt Synchronisieren
settings.site=Webseite
settings.update_settings=Einstellungen speichern
settings.advanced_settings=Erweiterte Einstellungen
settings.wiki_desc=Repository Wiki aktivieren
settings.use_internal_wiki=Eingebautes Wiki verwenden
settings.use_external_wiki=Externes Wiki verwenden
settings.external_wiki_url=Externe Wiki URL
settings.external_wiki_url_error=Die externe Wiki-URL ist ungültig.
settings.issues_desc=Repository Issue-Tracker aktivieren
settings.use_internal_issue_tracker=Integrierten Issue-Tracker verwenden
settings.use_external_issue_tracker=Externen Issue-Tracker verwenden
settings.external_tracker_url=URL eines externen Issue Trackers
settings.external_tracker_url_error=Die URL des externen Issue-Trackers ist ungültig.
settings.tracker_url_format=URL-Format des externen Issue-Systems
settings.tracker_issue_style.numeric=Numerisch
settings.tracker_issue_style.alphanumeric=Alphanumerisch
settings.enable_timetracker=Zeiterfassung aktivieren
settings.admin_settings=Administratoreinstellungen
settings.danger_zone=Gefahrenzone
settings.new_owner_has_same_repo=Der neue Eigentümer hat bereits ein Repository mit dem gleichen Namen. Bitte wähle einen anderen Namen.
settings.convert=In ein normales Repository umwandeln
settings.convert_desc=Dieser Mirror kann in ein normales Repository umgewandelt werden. Dies kann nicht rückgängig gemacht werden.
settings.convert_notices_1=Dieser Vorgang wandelt das Mirror-Repository in ein normales Repository um. Dies kann nicht rückgängig gemacht werden.
settings.convert_confirm=Repository umwandeln

View File

@ -331,6 +331,7 @@ change_username = Your username has been changed.
change_username_prompt = Note: username changes also change your account URL.
continue = Continue
cancel = Cancel
language = Language
lookup_avatar_by_mail = Look Up Avatar by Email Address
federated_avatar_lookup = Federated Avatar Lookup
@ -737,6 +738,21 @@ issues.add_time_sum_to_small = No time was entered.
issues.cancel_tracking = Cancel
issues.cancel_tracking_history = `cancelled time tracking %s`
issues.time_spent_total = Total Time Spent
issues.time_spent_from_all_authors = `Total Time Spent: %s`
issues.due_date = Due date
issues.invalid_due_date_format = "Due date format is invalid, must be 'yyyy-mm-dd'."
issues.error_modifying_due_date = "An error occured while modifying the due date."
issues.error_removing_due_date = "An error occured while remvoing the due date."
issues.due_date_form = "Due date, format yyyy-mm-dd"
issues.due_date_form_add = "Add due date"
issues.due_date_form_update = "Update due date"
issues.due_date_form_remove = "Remove due date"
issues.due_date_not_writer = "You need to have at least write access to this repository in order to update the due date for this issue."
issues.due_date_not_set = "No due date set."
issues.due_date_added = "added the due date %s %s"
issues.due_date_modified = "modified the due date to %s from %s %s"
issues.due_date_remove = "removed the due date %s %s"
issues.due_date_overdue = "Overdue"
pulls.desc = Enable merge requests and code reviews.
pulls.new = New Pull Request
@ -1336,6 +1352,8 @@ auths.attribute_name = First Name Attribute
auths.attribute_surname = Surname Attribute
auths.attribute_mail = Email Attribute
auths.attributes_in_bind = Fetch Attributes in Bind DN Context
auths.use_paged_search = Use paged search
auths.search_page_size = Page size
auths.filter = User Filter
auths.admin_filter = Admin Filter
auths.ms_ad_sa = MS AD Search Attributes

View File

@ -13,6 +13,7 @@ page=ページ
template=テンプレート
language=言語
notifications=通知
create_new=作成…
signed_in_as=ログイン済み
username=ユーザ名
@ -70,10 +71,12 @@ save_config_failed=設定ファイルの保存に失敗しました: %v
password_holder=パスワード
switch_dashboard_context=ダッシュ ボードのコンテキストを切替
my_repos=自分のリポジトリ
show_more_repos=リポジトリをさらに表示…
collaborative_repos=共同リポジトリ
my_orgs=自分の組織
my_mirrors=自分のミラー
view_home=ビュー %s
search_repos=リポジトリを探す…
issues.in_your_repos=あなたのリポジトリ
@ -82,6 +85,7 @@ repos=リポジトリ
users=ユーザー
organizations=組織
search=検索
code=コード
[auth]
register_helper_msg=既にアカウントをお持ちですか?今すぐログインしましょう!
@ -306,14 +310,17 @@ file_permalink=パーマリンク
stored_lfs=Git LFSで保管されています
editor.preview_changes=変更をプレビュー
editor.name_your_file=ファイル名を指定…
editor.or=または
editor.commit_changes=変更をコミット
editor.add_tmpl='%s/<filename>' を追加
editor.add='%s' を追加
editor.update='%s' を更新
editor.delete='%s' を削除
editor.commit_message_desc=詳細な説明を追加…
editor.commit_directly_to_this_branch=ブランチ<strong class="branch-name">%s</strong>へ直接コミットする。
editor.create_new_branch=<strong>新しいブランチ</strong>にコミットしてプルリクエストを作成する。
editor.new_branch_name_desc=新しいブランチ名…
editor.cancel=キャンセル
editor.branch_already_exists=ブランチ '%s' は、このリポジトリに既に存在します。
editor.no_changes_to_show=表示する変更箇所はありません。
@ -409,6 +416,7 @@ issues.edit=編集
issues.cancel=キャンセル
issues.save=保存
issues.label_title=ラベル名
issues.label_description=ラベルの詳細
issues.label_color=ラベルの色
issues.label_count=%d ラベル
issues.label_open_issues=%d 未解決の問題
@ -417,6 +425,7 @@ issues.label_delete=削除
issues.label.filter_sort.alphabetically=アルファベット順
issues.label.filter_sort.reverse_alphabetically=逆アルファベット順
issues.label.filter_sort.by_size=サイズ
issues.label.filter_sort.reverse_by_size=サイズの逆順
issues.num_participants=参加者数 %d
issues.attachment.open_tab=`クリックして新しいタブで "%s" を見る`
issues.attachment.download=`クリックして "%s" をダウンロード`
@ -549,6 +558,7 @@ settings.transfer=オーナー移転
settings.delete=このリポジトリを削除
settings.delete_notices_1=-この操作は<strong>元に戻せません</strong> 。
settings.transfer_owner=新しいオーナー
settings.search_user_placeholder=ユーザーを検索…
settings.add_webhook=Webhook を追加
settings.webhook.test_delivery=テスト配信
settings.webhook.request=リクエスト
@ -586,6 +596,7 @@ settings.protected_branch_can_push_yes=プッシュできます
settings.protected_branch_can_push_no=プッシュできません
settings.add_protected_branch=保護を有効にする
settings.delete_protected_branch=保護を無効にする
settings.choose_branch=ブランチを選択…
diff.browse_source=ソースを参照
diff.parent=
@ -614,6 +625,7 @@ release.title=タイトル
release.content=コンテント
release.write=書込み
release.preview=プレビュー
release.loading=読み込み中…
release.cancel=キャンセル
release.publish=リリースを発行
release.save_draft=下書きを保存
@ -638,6 +650,8 @@ people=人々
teams=チーム
lower_members=メンバー
lower_repositories=リポジトリ
create_new_team=新しいチーム
create_team=チームを作成
org_desc=説明
team_name=チーム名
team_desc=説明
@ -674,6 +688,7 @@ teams.update_settings=設定の更新
teams.add_team_member=チーム メンバーを追加
teams.delete_team_success=このチームが削除されました。
teams.repositories=チームのリポジトリ
teams.search_repo_placeholder=リポジトリを検索…
teams.add_team_repository=チームのリポジトリを追加
teams.remove_repo=削除(Remove)
teams.add_nonexistent_repo=追加しようとしているリポジトリは存在しません。まずはじめに作成してください。
@ -696,7 +711,10 @@ dashboard.clean_unbind_oauth=関連付けられていないOAuth接続を削除
dashboard.clean_unbind_oauth_success=すべての関連付けられていないOAuth接続は削除されました。
dashboard.delete_inactivate_accounts=非アクティブのアカウントをすべて削除
dashboard.delete_inactivate_accounts_success=すべての非アクティブなアカウントは削除されました。
dashboard.reinit_missing_repos=レコードが存在するが見当たらないすべてのGitリポジトリを再初期化する
dashboard.reinit_missing_repos_success=レコードが存在するが見当たらないすべてのGitリポジトリが再初期化されました。
dashboard.sync_external_users=外部ユーザーデータの同期
dashboard.git_fsck=全てのリポジトリでヘルスチェックを実行する
dashboard.server_uptime=サーバーの稼働時間
dashboard.current_goroutine=現在のGoroutine
dashboard.current_memory_usage=現在のメモリ使用量
@ -745,6 +763,7 @@ repos.private=プライベート
repos.watches=ウォッチ
repos.stars=お気に入り
repos.issues=課題
repos.size=サイズ
auths.name=名前
auths.type=タイプ

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@ template=Шаблон
language=Язык
notifications=Уведомления
create_new=Создать…
user_profile_and_more=Профиль и настройки...
signed_in_as=Вы вошли как
enable_javascript=Пожалуйста, включите JavaScript.
@ -79,8 +80,10 @@ repo_path=Путь корня репозитория
repo_path_helper=Все удаленные Git репозиториии будут сохранены в этот каталог.
lfs_path=Корневой путь Git LFS
lfs_path_helper=В этой папке будут храниться файлы Git LFS. Оставьте пустым, чтобы отключить LFS.
domain=Домен SSH сервера
ssh_port=Порт SSH сервера
ssh_port_helper=Номер порта, который использует SSH сервер. Оставьте пустым, чтобы отключить SSH.
app_url=Базовый URL-адрес Gitea
log_root_path=Путь к журналу
optional_title=Расширенные настройки
@ -90,14 +93,31 @@ smtp_from=Отправлять Email от имени
mailer_user=SMTP логин
mailer_password=SMTP пароль
mail_notify=Разрешить почтовые уведомления
server_service_title=Сервер и настройки внешних служб
disable_gravatar=Отключить Gravatar
federated_avatar_lookup_popup=Включите поиск федеративного аватара для использования службы с открытым исходным кодом на основе libravatar.
openid_signin=Включение входа через OpenID
openid_signin_popup=Включение входа через OpenID.
openid_signup=Включить саморегистрацию OpenID
openid_signup_popup=Включить саморегистрацию OpenID.
enable_captcha=Включить CAPTCHA
enable_captcha_popup=Запрашивать капчу при регистрации пользователя.
require_sign_in_view=Требовать авторизации для просмотра страниц
admin_title=Настройки учётной записи администратора
admin_name=Логин администратора
admin_password=Пароль
confirm_password=Подтвердить пароль
admin_email=Адрес эл. почты
install_btn_confirm=Установить Gitea
test_git_failed=Не удалось проверить 'git' команду: %v
invalid_db_setting=Недопустимые параметры настройки базы данных: %v
invalid_repo_path=Недопустимый путь к корню репозитория: %v
save_config_failed=Не удалось сохранить конфигурацию: %v
invalid_admin_setting=Указан недопустимый параметр учетной записи администратора: %v
install_success=Добро пожаловать! Благодарим вас за выбор Gitea, пользуйтесь с удовольствием!
invalid_log_root_path=Недопустимый путь для логов: %v
default_enable_timetracking=Включение отслеживания времени по умолчанию
no_reply_address=Скрытый почтовый домен
[home]
uname_holder=Имя пользователя / Email
@ -210,7 +230,11 @@ 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=Организацию нельзя добавить в качестве члена команды.
auth_failed=Ошибка аутентификации: %v
@ -235,32 +259,51 @@ security=Безопасность
avatar=Аватар
ssh_gpg_keys=SSH / GPG ключи
social=Учетные записи в соцсетях
orgs=Управление организациями
repos=Репозитории
delete=Удалить аккаунт
twofa=Двухфакторная аутентификация
account_link=Привязанные аккаунты
organization=Организации
uid=UID
public_profile=Открытый профиль
profile_desc=Ваш адрес электронной почты будет использован для уведомлений и других операций.
password_username_disabled=Нелокальным пользователям запрещено изменение их имени пользователя. Для получения более подробной информации обратитесь к администратору сайта.
full_name=ФИО
website=Веб-сайт
location=Местоположение
update_profile=Обновить профиль
update_profile_success=Ваш профиль успешно обновлен.
change_username=Ваше имя пользователя было изменено.
continue=Далее
cancel=Отмена
federated_avatar_lookup=Найти внешний аватар
enable_custom_avatar=Включить собственный аватар
choose_new_avatar=Выбрать новый аватар
update_avatar=Обновить аватар
delete_current_avatar=Удалить текущий аватар
uploaded_avatar_not_a_image=Загружаемый файл не является изображением.
update_avatar_success=Ваш аватар был изменен.
change_password=Обновить пароль
old_password=Текущий пароль
new_password=Новый пароль
retype_new_password=Подтверждение нового пароля
password_incorrect=Текущий пароль неправильный.
password_change_disabled=Нелокальные аккаунты не могут изменить пароль через Gitea.
emails=Email адреса
email_desc=Ваш основной адрес электронной почты будет использован для уведомлений и других операций.
primary=Основной
delete_email=Удалить
email_deletion=Удалить адрес электронной почты
email_deletion_desc=Адрес электронной почты и вся связанная с ним информация будет удалена из вашего аккаунта. Коммиты, сделанные от имени этого адреса электронной почты, не будут изменены. Продолжить?
add_new_email=Добавить новый адрес электронной почты
add_email=Добавить новый адрес электронной почты
add_openid=Добавить адрес OpenID
add_email_confirmation_sent=Письмо для подтверждения было отправлено на '%s'. Пожалуйста, проверьте ваш почтовый ящик в течение %s, чтобы завершить процесс подтверждения.
manage_ssh_keys=Управление SSH ключами
manage_gpg_keys=Управление GPG ключами
@ -269,10 +312,16 @@ ssh_helper=<strong>Нужна помощь?</strong> Ознакомьтесь с
gpg_helper=<strong>Нужна помощь?</strong> Взгляните на руководство GitHub <a href="%s"> по GPG</a>.
add_new_key=Добавить SSH ключ
add_new_gpg_key=Добавить GPG ключ
gpg_key_id_used=Публичный GPG ключ с таким же идентификатором уже существует.
subkeys=Подключи
key_id=ИД ключа
key_name=Имя ключа
key_content=Содержимое
add_key_success=SSH ключ '%s' добавлен.
add_gpg_key_success=GPG ключ '%s' добавлен.
delete_key=Удалить
ssh_key_deletion_success=SSH ключ был удален.
gpg_key_deletion_success=GPG ключ был удален.
add_on=Добавлено
valid_until=Действителен до
valid_forever=Действителен навсегда
@ -284,16 +333,23 @@ key_state_desc=Этот ключ использовался в течение п
token_state_desc=Этот токен использовался в течение последних 7 дней
show_openid=Показывать в профиле
hide_openid=Скрыть из профиля
ssh_disabled=SSH отключён
manage_social=Управление привязанными учетными записями в соцсетях
unbind=Удалить связь
unbind_success=Связанная внешняя учётная запись была удалена.
generate_new_token=Создать новый токен
token_name=Имя токена
generate_token=Генерировать токен
delete_token=Удалить
twofa_desc=Двухфакторная проверка подлинности повышает уровень безопасности вашей учётной записи.
twofa_is_enrolled=Ваша учётная запись в настоящее время <strong>использует</strong> двухфакторную аутентификацию.
twofa_not_enrolled=Ваша учётная запись в настоящее время не использует двухфакторную аутентификацию.
twofa_disable=Отключить двухфакторную аутентификацию
twofa_scratch_token_regenerate=Пересоздать scratch-токен
twofa_enroll=Включить двухфакторную аутентификацию
twofa_disabled=Двухфакторная аутентификация выключена.
scan_this_image=Сканируйте это изображение вашим приложением для двуфакторной аутентификации:
or_enter_secret=Или введите кодовое слово: %s
@ -313,10 +369,16 @@ fork_repo=Форкнуть репозиторий
fork_from=Форк от
repo_desc=Описание
repo_lang=Язык
repo_gitignore_helper=Выберите шаблон .gitignore.
license=Лицензия
license_helper=Выберите файл лицензии.
readme=README
readme_helper=Выберите шаблон README.
create_repo=Создать репозиторий
default_branch=Ветка по умолчанию
mirror_prune=Очистить
mirror_interval=Интервал зеркалирования (допустимы единицы времени 'h', 'm', 's')
mirror_interval_invalid=Недопустимый интервал зеркалирования.
watchers=Наблюдатели
stargazers=Звездочеты
forks=Форки
@ -329,18 +391,25 @@ form.name_reserved=Имя репозитория '%s' зарезервирова
migrate_type=Тип миграции
migrate_type_helper=Этот репозиторий будет <span class="text blue">зеркалом</span>
migrate_repo=Перенос репозитория
migrate.clone_local_path=или путь к локальному серверу
migrate.permission_denied=У вас нет прав на импорт локальных репозиториев.
migrate.invalid_local_path=Недопустимый локальный путь. Возможно он не существует или не является папкой.
migrate.failed=Миграция не удалась: %v
migrate.lfs_mirror_unsupported=Зеркалирование LFS объектов не поддерживается - используйте 'git lfs fetch --all' и 'git lfs push --all' вручную.
mirror_from=зеркало из
forked_from=форкнуто от
fork_from_self=Вы не можете форкнуть репозиторий, так как вы уже его владелец.
copy_link=Скопировать
copy_link_success=Ссылка была скопирована
copy_link_error=Нажмите ⌘-C или Ctrl-C для копирования
copied=Успешно скопировано
unwatch=Перестать следить
watch=Следить
unstar=Убрать из избранного
star=В избранное
fork=Форкнуть
download_archive=Скачать репозиторий
no_desc=Нет описания
quick_guide=Краткое руководство

View File

@ -1,10 +1,15 @@
app_desc=Зручний сервіс, власного Git хостінгу
home=Головна
dashboard=Панель інструментів
dashboard=Панель управління
explore=Огляд
help=Довідка
sign_in=Увійти
sign_in_with=Увійти через
sign_out=Вийти
sign_up=Реєстрація
link_account=Прив'язати обліковий запис
link_account_signin_or_signup=Увійдіть з уже існуючими обліковими даними або зареєструйтеся для зв'язку з цим аккаунтом.
register=Реєстрація
website=Web-сайт
version=Версія
@ -12,10 +17,18 @@ page=Сторінка
template=Шаблон
language=Мова
notifications=Сповіщення
create_new=Створити…
user_profile_and_more=Профіль і налаштування…
signed_in_as=Увійшов як
enable_javascript=Цей веб-сайт працює краще з JavaScript.
username=Ім'я кристувача
email=Адреса електронної пошти
password=Пароль
re_type=Введіть пароль ще раз
captcha=CAPTCHA
twofa=Двофакторна авторизація
twofa_scratch=Двофакторний одноразовий пароль
passcode=Код доступу
repository=Репозиторій
@ -27,47 +40,84 @@ new_mirror=Нове дзеркало
new_fork=Новий репозиторій - копія
new_org=Нова організація
manage_org=Керування організаціями
account_settings=Параметри облікового запису
settings=Параметри
admin_panel=Панель Адміністратора
account_settings=Налаштування облікового запису
settings=Налаштування
your_profile=Профіль
your_starred=Обрані
your_settings=Налаштування
all=Усі
sources=Джерела
sources=Власні
mirrors=Дзеркала
collaborative=Співпраця
forks=Відгалуження
collaborative=Спільні
forks=Форки
pull_requests=Запити до злиття
issues=Питання
activities=Дії
pull_requests=Запити на злиття
issues=Проблеми
cancel=Відміна
[install]
install=Встановлення
title=Початкова конфігурація
docker_helper=Якщо ви запускаєте Gitea всередині Docker, будь ласка уважно прочитайте <a target="_blank" rel="noopener" href="%s">документацію</a> перед тим, як що-небудь змінити на цій сторінці.
requite_db_desc=Gitea потребує MySQL, PostgreSQL, MSSQL, SQLite3 або TiDB.
db_title=Налаштування бази даних
db_type=Тип бази даних
host=Хост
user=Ім'я кристувача
password=Пароль
db_name=Ім'я бази даних
ssl_mode=SSL
path=Шлях
err_empty_db_path=Шлях до бази даних SQLite3 або TiDB не може бути порожнім.
no_admin_and_disable_registration=Ви не можете вимкнути реєстрацію до створення облікового запису адміністратора.
general_title=Загальні налаштування
app_name=Назва сайту
repo_path=Кореневий шлях репозиторія
repo_path_helper=Всі вилучені Git репозиторії будуть збережені в цей каталог.
lfs_path=Кореневої шлях Git LFS
lfs_path_helper=У цій папці будуть зберігатися файли Git LFS. Залиште порожнім, щоб відключити LFS.
domain=Домен SSH сервера
ssh_port=Порт SSH сервера
ssh_port_helper=Номер порту, який використовує SSH сервер. Залиште порожнім, щоб відключити SSH.
app_url=Базова URL-адреса Gitea
log_root_path=Шлях до лог файлу
optional_title=Додаткові налаштування
email_title=Налаштування Email
smtp_host=SMTP хост
smtp_from=Відправляти Email від імені
mailer_user=SMTP Ім'я кристувача
mailer_password=SMTP Пароль
mail_notify=Дозволити поштові повідомлення
disable_gravatar=Вимкнути Gravatar
federated_avatar_lookup_popup=Увімкнути зовнішний Аватар за допомогою Libravatar.
openid_signin=Увімкнути реєстрацію за допомогою OpenID
enable_captcha=Увімкнути CAPTCHA
enable_captcha_popup=Вимагати перевірку CAPTCHA при самостійній реєстрації користувача.
admin_name=Ім'я кристувача Адміністратора
admin_password=Пароль
confirm_password=Підтвердження пароля
admin_email=Адреса електронної пошти
install_btn_confirm=Встановлення Gitea
test_git_failed=Не в змозі перевірити 'git' команду: %v
save_config_failed=Не в змозі зберегти конфігурацію: %v
install_success=Ласкаво просимо! Дякуємо вам за вибір Gitea. Розважайтеся, і будьте обережні!
[home]
password_holder=Пароль
switch_dashboard_context=Змінити дошку
my_repos=Мої репозиторії
show_more_repos=Показати більше репозиторіїв…
collaborative_repos=Спільні репозиторії
my_orgs=Мої організації
my_mirrors=Мої дзеркала
view_home=Переглянути %s
search_repos=Шукати репозиторій…
issues.in_your_repos=В ваших репозиторіях
@ -76,21 +126,43 @@ repos=Репозиторії
users=Користувачі
organizations=Організації
search=Пошук
code=Код
[auth]
create_new_account=Реєстрація аккаунта
register_helper_msg=Вже зареєстровані? Увійдіть зараз!
disable_register_prompt=Вибачте, можливість реєстрації відключена. Будь ласка, зв'яжіться з адміністратором сайту.
remember_me=Запам'ятати мене
forgot_password_title=Забув пароль
forgot_password=Забули пароль?
sign_up_now=Потрібен аккаунт? Зареєструватися.
confirmation_mail_sent_prompt=Новий лист для підтвердження було направлено на <b>%s</b>, будь ласка, перевірте вашу поштову скриньку протягом% s для завершення реєстрації.
reset_password_mail_sent_prompt=Лист для підтвердження було направлено на <b>%s</b>. Будь ласка, перевірте вашу поштову скриньку протягом% s для скидання пароля.
active_your_account=Активувати обліковий запис
prohibit_login=Вхід заборонений
prohibit_login_desc=Вхід для вашого профілю був заборонений, будь ласка, зв'яжіться з адміністратором сайту.
resent_limit_prompt=Вибачте, ви вже запросили активацію по електронній пошті нещодавно. Будь ласка, зачекайте 3 хвилини, а потім спробуйте ще раз.
has_unconfirmed_mail=Привіт %s, у вас є непідтверджена електронна адреса (<b>%s </b>). Якщо ви не отримали електронний лист із підтвердженням або вам потрібно надіслати новий, натисніть на кнопку нижче.
resend_mail=Натисніть тут, щоб вислати лист активації знову
email_not_associate=Ця електронна пошта не пов'язана ні з одним обліковим записом.
send_reset_mail=Натисніть сюди, щоб відправити лист для скидання пароля
reset_password=Скинути пароль
invalid_code=Цей код підтвердження недійсний або закінчився.
reset_password_helper=Натисніть тут для скидання пароля
password_too_short=Довжина пароля не може бути меншою за %d.
non_local_account=Нелокальні акаунти не можуть змінити пароль через Gitea.
verify=Підтвердити
scratch_code=Одноразовий пароль
use_scratch_code=Використовувати одноразовий пароль
twofa_scratch_used=Ви використовували одноразовий пароль. Ви були перенаправлені на сторінку налаштувань для генерації нового коду або відключення двуфакторной аутентифікації.
twofa_passcode_incorrect=Ваш пароль є невірним. Якщо ви втратили пристрій, використовуйте ваш одноразовий пароль.
twofa_scratch_token_incorrect=Невірний одноразовий пароль.
login_userpass=Увійти
login_openid=OpenID
openid_connect_submit=Під’єднатися
openid_connect_title=Підключитися до існуючого облікового запису
openid_register_title=Створити новий обліковий запис
disable_forgot_password_mail=На жаль скидання пароля відключене. Будь ласка, зв'яжіться з адміністратором сайту.
[mail]
activate_account=Будь ласка, активуйте ваш обліковий запис
@ -102,14 +174,17 @@ register_notify=Ласкаво просимо у Gitea
[modal]
yes=Так
no=Ні
modify=Оновлення
[form]
UserName=Ім’я користувача
RepoName=Назва репозиторію
Email=Адреса електронної пошти
Password=Пароль
Retype=Введіть пароль ще раз
SSHTitle=Iм'я SSH ключа
HttpsUrl=Адреса HTTPS
PayloadUrl=URL обробника
TeamName=Назва команди
AuthName=Назва авторизації
AdminEmail=Email адміністратора
@ -117,14 +192,23 @@ AdminEmail=Email адміністратора
NewBranchName=Ім'я нової гілки
CommitSummary=Резюме коміту
CommitMessage=Повідомлення коміту
CommitChoice=Вибір коміта
TreeName=Шлях до файлу
Content=Зміст
require_error=` не може бути пустим.`
git_ref_name_error=` має бути правильним посилальним ім'ям Git.`
email_error=` не є адресою електронної пошти.`
unknown_error=Невідома помилка:
password_not_match=Паролі не співпадають.
username_been_taken=Ім'я користувача вже зайнято.
repo_name_been_taken=Ім'я репозіторію вже використовується.
email_been_used=Ця електронна адреса вже використовується.
username_password_incorrect=Неправильне ім'я користувача або пароль.
user_not_exist=Даний користувач не існує.
auth_failed=Помилка автентифікації: %v
@ -133,6 +217,7 @@ join_on=Приєднався
repositories=Репозиторії
activity=Публічна активність
followers=Підписники
starred=Обрані Репозиторії
following=Слідкувати
follow=Підписатися
unfollow=Відписатися
@ -144,10 +229,14 @@ profile=Профіль
password=Пароль
security=Безпека
avatar=Аватар
ssh_gpg_keys=SSH / GPG ключі
social=Соціальні акаунти
applications=Токени Доступу
orgs=Керування організаціями
repos=Репозиторії
delete=Видалити обліковий запис
twofa=Двофакторна авторизація
organization=Організації
uid=Ідентифікатор Uid
public_profile=Загальнодоступний профіль
@ -159,16 +248,38 @@ update_profile_success=Профіль успішно оновлено.
continue=Продовжити
cancel=Відміна
federated_avatar_lookup=Знайти зовнішній аватар
enable_custom_avatar=Увімкнути користувацькі аватари
choose_new_avatar=Оберіть новий аватар
update_avatar=Оновити аватар
delete_current_avatar=Видалити поточний аватар
change_password=Оновити пароль
old_password=Поточний пароль
new_password=Новий пароль
retype_new_password=Введіть новий пароль ще раз
emails=Адреса електронної пошти
manage_emails=Керування адресами ел. пошти
email_desc=Ваша основна адреса електронної пошти використовуватиметься для сповіщення та інших операцій.
primary=Основний
delete_email=Видалити
manage_ssh_keys=Керувати SSH ключами
manage_gpg_keys=Керувати GPG ключами
add_key=Додати ключ
ssh_helper=<strong>Потрібна допомога?</strong> Дивіться гід на GitHub з <a href="%s"> генерації ключів SSH</a> або виправлення <a href="%s">типових неполадок SSH</a>.
add_new_key=Додати SSH ключ
add_new_gpg_key=Додати GPG ключ
key_id=ID ключа
key_name=Ім'я ключа
key_content=Зміст
delete_key=Видалити
ssh_key_deletion=Видалити SSH ключ
gpg_key_deletion=Видалити GPG ключ
add_on=Додано
valid_until=Дійсний до
valid_forever=Дійсний завжди
last_used=Останнє використання
no_activity=Жодної діяльності
can_read_info=Читати
@ -178,7 +289,11 @@ token_state_desc=Цей токен використовувався в оста
show_openid=Показати у профілю
hide_openid=Не показувати у профілі
manage_social=Керувати зв'язаними аккаунтами соціальних мереж
generate_new_token=Згенерувати новий токен
token_name=Ім'я токену
generate_token=Згенерувати токен
delete_token=Видалити
@ -186,37 +301,54 @@ delete_token=Видалити
delete_account=Видалити ваш обліковий запис
confirm_delete_account=Підтвердження видалення
delete_account_title=Видалити цей обліковий запис
[repo]
owner=Власник
repo_name=Назва репозиторію
visibility=Видимість
fork_repo=Відгалужити репозиторій
fork_from=Відгалужена з
visiblity_helper=Зробити репозиторій приватним
clone_helper=Потрібна допомога у клонуванні? Відвідайте <a target="_blank" rel="noopener" href="%s">Допомогу</a>.
fork_repo=Форкнути репозиторій
fork_from=Форк з
repo_desc=Опис
repo_lang=Мова
repo_gitignore_helper=Виберіть шаблон .gitignore.
license=Ліцензія
license_helper=Виберіть ліцензійний файл.
readme=README
readme_helper=Виберіть шаблон README.
create_repo=Створити репозиторій
default_branch=Головна гілка
mirror_prune=Очистити
watchers=Спостерігачі
forks=Форки
pick_reaction=Залиште свою оцінку
form.reach_limit_of_creation=Ви досягли максимальної кількості %d створених репозиторіїв.
migrate_type=Тип міграції
migrate_type_helper=Даний репозиторій буде <span class="text blue">дзеркалом</span>
migrate_repo=Перенесення репозиторія
migrate.failed=Міграція не вдалася: %v
forked_from=відгалужено від
mirror_from=дзеркало
forked_from=форк від
copy_link=Копіювати
copied=Скопійовано
unwatch=Не стежити
watch=Слідкувати
unstar=Зняти зірку
star=Зірка
fork=Відгалуження
unstar=Видалити із обраних
star=В обрані
fork=Форк
download_archive=Скачати репозиторій
no_desc=Без опису
quick_guide=Короткий посібник
clone_this_repo=Кнонувати цей репозиторій
create_new_repo_command=Створити новий репозиторій з командного рядка
push_exist_repo=Опублікувати існуючий репозиторій з командного рядка
bare_message=Цей репозиторій порожній.
code=Код
branch=Гілка
@ -224,25 +356,42 @@ tree=Дерево
filter_branch_and_tag=Фільтрувати гілку або тег
branches=Гілки
tags=Теги
issues=Питання
pulls=Запити до злиття
issues=Проблеми
pulls=Запити на злиття
labels=Мітки
milestones=Етап
commits=Зміни
commits=Коміти
commit=Змина
releases=Релізи
file_raw=Raw
file_history=Історія
file_view_raw=Перегляд Raw
file_permalink=Постійне посилання
stored_lfs=Збережено з Git LFS
editor.new_file=Новий файл
editor.upload_file=Завантажити файл
editor.edit_file=Редагування файлу
editor.preview_changes=Попередній перегляд змін
editor.edit_this_file=Редагувати файл
editor.delete_this_file=Видалити файл
editor.name_your_file=Дайте назву файлу…
editor.or=або
editor.commit_changes=Зафіксувати зміни
editor.cancel_lower=Скасувати
editor.commit_changes=Закомітити зміни
editor.add_tmpl=Додати '%s/<filename>'
editor.add=Додати '%s'
editor.update=Оновити '%s'
editor.delete=Видалити '%s'
editor.create_new_branch=Створити <strong>нову гілку</strong> для цього коміту та відкрити запит на злиття.
editor.new_branch_name_desc=Нова назва гілки…
editor.cancel=Відміна
editor.branch_already_exists=Гілка '%s' вже присутня в репозиторії.
editor.upload_files_to_dir=Завантажувати файли до '%s'
commits.commits=Зміни
commits.commits=Коміти
commits.find=Пошук
commits.search_all=Усі гілки
commits.author=Автор
commits.message=Повідомлення
commits.date=Дата
@ -250,7 +399,7 @@ commits.older=Давніше
commits.newer=Новіше
issues.new=Нове обговорення
issues.new=Нова Проблема
issues.new.labels=Мітки
issues.new.no_label=Без Мітки
issues.new.clear_labels=Очистити мітки
@ -259,46 +408,112 @@ issues.new.no_milestone=Етап відсутній
issues.new.clear_milestone=Очистити етап
issues.new.open_milestone=Активні етапи
issues.new.closed_milestone=Закриті етапи
issues.new.assignee=Призначено
issues.new.clear_assignee=Прибрати відповідального
issues.new.no_assignee=Немає відповідального
issues.new.assignee=Виконавець
issues.new.clear_assignee=Прибрати виконавеця
issues.new.no_assignee=Немає виконавеця
issues.create=Створити Проблему
issues.new_label=Нова мітка
issues.new_label_placeholder=Назва мітки
issues.new_label_desc_placeholder=Опис
issues.create_label=Створити мітку
issues.label_templates.helper=Оберіть набір міток
issues.label_templates.fail_to_load_file=Не вдалося завантажити файл шаблона мітки '%s': %v
issues.deleted_milestone=`(видалено)`
issues.open_tab=%d відкрито
issues.close_tab=%d закрито
issues.filter_label=Мітка
issues.filter_label_no_select=Всі мітки
issues.filter_milestone=Етап
issues.filter_milestone_no_select=Всі етапи
issues.filter_assignee=Виконавець
issues.filter_assginee_no_select=Всі виконавеці
issues.filter_type=Тип
issues.filter_type.all_issues=Всі проблеми
issues.filter_type.assigned_to_you=Призначене вам
issues.filter_type.created_by_you=Створено вами
issues.filter_type.mentioning_you=Вас згадано
issues.filter_sort=Сортувати
issues.filter_sort.latest=Найновіші
issues.filter_sort.oldest=Найстаріші
issues.filter_sort.recentupdate=Нещодавно оновлено
issues.filter_sort.leastupdate=Найдавніше оновлені
issues.filter_sort.mostcomment=Найбільш коментовані
issues.filter_sort.leastcomment=Найменш коментовані
issues.action_open=Відкрити
issues.action_close=Закрити
issues.action_label=Мітка
issues.action_milestone=Етап
issues.action_milestone_no_select=Етап відсутній
issues.action_assignee=Виконавець
issues.action_assignee_no_select=Немає виконавеця
issues.opened_by=%[1]s відкрито <a href="%[2]s">%[3]s</a>
issues.opened_by_fake=%[1]s відкрито %[2]s
issues.previous=Попередній
issues.next=Далі
issues.open_title=Відкрити
issues.closed_title=Закриті
issues.num_comments=%d коментарів
issues.commented_at=`відкоментовано <a href="#%s">%s</a>`
issues.delete_comment_confirm=Ви впевнені, що хочете видалити цей коментар?
issues.no_content=Тут ще немає жодного змісту.
issues.close_issue=Закрити
issues.close_comment_issue=Прокоментувати і закрити
issues.reopen_issue=Відкрити знову
issues.reopen_comment_issue=Прокоментувати та відкрити знову
issues.create_comment=Коментар
issues.closed_at=`закрито <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.reopened_at=`повторно відкрито <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.commit_ref_at=`згадано цю проблему в коміті <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.collaborator=Співавтор
issues.owner=Власник
issues.sign_in_require_desc=<a href="%s">Підпишіться</a> щоб приєднатися до обговорення.
issues.edit=Редагувати
issues.cancel=Відміна
issues.save=Зберегти
issues.label_title=Назва мітки
issues.label_description=Опис мітки
issues.label_color=Колір мітки
issues.label_count=%d міток
issues.label_open_issues=%d відкритих питань
issues.label_open_issues=%d відкритих проблем
issues.label_edit=Редагувати
issues.label_delete=Видалити
issues.label_modify=Редагувати мітку
issues.label_deletion=Видалити мітку
issues.label.filter_sort.alphabetically=За абеткою
issues.label.filter_sort.reverse_alphabetically=Зворотною абеткою
issues.label.filter_sort.by_size=Розмір
issues.label.filter_sort.reverse_by_size=Зворотний розмір
issues.num_participants=%d учасників
issues.attachment.open_tab=`Натисніть щоб побачити "%s" у новій вкладці`
issues.subscribe=Підписатися
issues.unsubscribe=Відписатися
issues.start_tracking_short=Запустити
issues.stop_tracking=Стоп
issues.add_time_short=Додати час
issues.add_time_cancel=Відміна
issues.add_time_hours=Години
issues.add_time_minutes=Хвилини
issues.cancel_tracking=Відміна
pulls.new=Новий запит на злиття
pulls.compare_changes=Новий запит на злиття
pulls.compare_base=злити в
pulls.compare_compare=pull з
pulls.filter_branch=Фільтр по гілці
pulls.no_results=Результатів не знайдено.
pulls.create=Створити запит на злиття
pulls.title_desc=хоче злити %[1]d комітів з <code>%[2]s</code> до <code>%[3]s</code>
pulls.tab_commits=Коміти
pulls.reopen_to_merge=Будь ласка перевідкрийте цей запит щоб здіснити операцію злиття.
pulls.merged=Злито
pulls.can_auto_merge_desc=Цей запит можна об'єднати автоматично.
pulls.merge_pull_request=Об'єднати запит на злиття
milestones.new=Новий етап
milestones.open_tab=%d відкрито
milestones.close_tab=%d закрито
milestones.closed=Закрито %s
milestones.no_due_date=Немає дати завершення
milestones.open=Відкрити
milestones.close=Закрити
milestones.create=Створити етап
@ -308,78 +523,425 @@ milestones.due_date=Дата завершення (опціонально)
milestones.clear=Очистити
milestones.edit=Редагувати етап
milestones.cancel=Відміна
milestones.modify=Оновити етап
wiki=Wiki
wiki.welcome=Ласкаво просимо до Wiki.
wiki.create_first_page=Створити першу сторінку
wiki.page=Сторінка
wiki.filter_page=Фільтр сторінок
wiki.new_page=Сторінка
wiki.save_page=Зберегти сторінку
wiki.edit_page_button=Редагувати
wiki.new_page_button=Нова сторінка
wiki.delete_page_button=Видалити сторінку
wiki.pages=Сторінки
wiki.last_updated=Останні оновлення %s
activity.merged_prs_count_1=Об'єднати запит на злиття
activity.merged_prs_count_n=Об'єднати запити на злиття
activity=Активність
activity.period.filter_label=Період:
activity.period.daily=1 день
activity.period.halfweekly=3 дні
activity.period.weekly=1 тиждень
activity.period.monthly=1 місяць
activity.overview=Огляд
activity.active_prs_count_n=<strong>%d</strong> Активні запити на злиття
activity.merged_prs_count_1=Злитий запит на злиття
activity.merged_prs_count_n=Злиті запити на злиття
activity.opened_prs_count_1=Запропонований запит на злиття
activity.opened_prs_count_n=Запропонованих запитів на злиття
activity.title.user_1=%d користувач
activity.title.user_n=%d користувачів
activity.title.prs_1=%d Запит на злиття
activity.title.prs_n=%d Запитів на злиття
activity.title.prs_opened_by=%s запропоновано %s
activity.merged_prs_label=Злито
activity.opened_prs_label=Запропоновано
activity.active_issues_count_1=<strong>%d</strong> Активна проблема
activity.active_issues_count_n=<strong>%d</strong> Активні проблеми
activity.closed_issues_count_1=Закрита проблема
activity.closed_issues_count_n=Закриті проблеми
activity.title.issues_1=%d Проблема
activity.title.issues_n=%d Проблеми
activity.title.issues_closed_by=%s закрито %s
activity.title.issues_created_by=%s створено %s
activity.closed_issue_label=Закриті
activity.new_issues_count_1=Нове обговорення
activity.new_issues_count_n=Нове обговорення
activity.new_issues_count_1=Нова Проблема
activity.new_issues_count_n=%d Проблем
activity.new_issue_label=Відкриті
activity.unresolved_conv_label=Відкрити
activity.title.releases_1=%d Реліз
activity.title.releases_n=%d Релізів
activity.title.releases_published_by=%s Опубліковано %s
activity.published_release_label=Опубліковано
search=Пошук
search.search_repo=Пошук репозиторію
settings=Параметри
settings=Налаштування
settings.options=Репозиторій
settings.collaboration.admin=Адміністратор
settings.collaboration.write=Написати
settings.collaboration.read=Читати
settings.collaboration.undefined=Не визначено
settings.hooks=Веб-хуки
settings.githooks=Git хуки
settings.basic_settings=Базові налаштування
settings.mirror_settings=Налаштування дзеркала
settings.sync_mirror=Синхронізувати зараз
settings.site=Web-сайт
settings.update_settings=Оновити налаштування
settings.advanced_settings=Додаткові налаштування
settings.wiki_desc=Увімкнути репозиторії Wiki
settings.use_internal_wiki=Використовувати вбудовані Wiki
settings.use_external_wiki=Використовувати зовнішні Wiki
settings.external_wiki_url=URL зовнішньої wiki
settings.external_tracker_url=URL зовнішньої системи відстеження проблем
settings.tracker_issue_style.numeric=Цифровий
settings.tracker_issue_style.alphanumeric=Буквено-цифровий
settings.danger_zone=Небезпечна зона
settings.new_owner_has_same_repo=Новий власник вже має репозиторій з такою назвою. Будь ласка, виберіть інше ім'я.
settings.transfer=Переказати новому власнику
settings.delete=Видалити цей репозиторій
settings.delete_notices_1=- Цю операцію <strong>НЕ МОЖНА</strong> відмінити.
settings.transfer_owner=Новий власник
settings.confirm_delete=Видалити репозиторій
settings.delete_collaborator=Видалити
settings.search_user_placeholder=Пошук користувача…
settings.add_webhook=Додати веб-хук
settings.webhook_deletion=Видалити веб-хук
settings.webhook.test_delivery=Перевірити доставку
settings.webhook.request=Запит
settings.webhook.response=Відповідь
settings.webhook.headers=Заголовки
settings.webhook.payload=Зміст
settings.webhook.body=Тіло
settings.githook_name=Ім'я хуку
settings.githook_content=Зміст хука
settings.update_githook=Оновити хук
settings.secret=Секрет
settings.slack_username=Ім'я кристувача
settings.slack_icon_url=URL іконки
settings.discord_username=Ім'я кристувача
settings.discord_icon_url=URL іконки
settings.slack_color=Колір
settings.event_create=Створити
settings.event_create_desc=Гілку або тег створено.
settings.event_pull_request=Запити до злиття
settings.event_push=Push
settings.event_repository=Репозиторій
settings.event_repository_desc=Репозиторій створений або видалено.
settings.update_webhook=Оновити веб-хук
settings.hook_type=Тип хука
settings.slack_token=Токен
settings.slack_domain=Домен
settings.slack_channel=Канал
settings.deploy_keys=Ключі для розгортування
settings.add_deploy_key=Додати ключ для розгортування
settings.is_writable=Включити доступ для запису
settings.title=Заголовок
settings.deploy_key_content=Зміст
settings.branches=Гілки
settings.protected_branch=Захист гілки
settings.protected_branch_can_push=Дозволити push?
settings.protected_branch_can_push_yes=Ви можете виконувати push
settings.protected_branch_can_push_no=Ви не можете виконувати push
settings.protect_whitelist_search_users=Пошук користувачів…
settings.add_protected_branch=Увімкнути захист
settings.delete_protected_branch=Вимкнути захист
settings.choose_branch=Оберіть гілку…
diff.browse_source=Переглянути джерело
diff.commit=коміт
diff.show_split_view=Розділений перегляд
diff.stats_desc=<strong> %d змінених файлів</strong> з <strong>%d додано</strong> та <strong>%d видалено</strong>
diff.view_file=Переглянути файл
diff.too_many_files=Деякі файли не було показано, через те що забагато файлів було змінено
release.releases=Релізи
release.new_release=Новий реліз
release.draft=Чернетка
release.prerelease=Пре-реліз
release.stable=Стабільний
release.edit=редагувати
release.ahead=<strong>%d</strong> комітів %s після цього релізу
release.tag_name=Назва тегу
release.target=Ціль
release.title=Заголовок
release.content=Зміст
release.preview=Переглянути
release.loading=Завантаження…
release.prerelease_desc=Позначити як пре-реліз
release.cancel=Відміна
release.publish=Опублікувати реліз
release.save_draft=Зберегти чернетку
release.edit_release=Оновити реліз
release.delete_release=Видалити реліз
release.deletion=Видалити реліз
release.downloads=Завантажити
branch.delete_head=Видалити
branch.delete=Видалити гілку '%s'
branch.delete_html=Видалити гілку
branch.create_from=з '%s'
branch.deleted_by=Видалено %s
topic.manage_topics=Керувати тематичними мітками
topic.done=Готово
[org]
org_name_holder=Назва організації
org_full_name_holder=Повна назва організації
create_org=Створити організацію
repo_updated=Оновлено
people=Учасники
teams=Команди
lower_members=учасники
lower_repositories=репозиторії
create_new_team=Нова команда
create_team=Створити команду
org_desc=Опис
team_name=Назва команди
team_desc=Опис
team_permission_desc=Права доступу
settings=Налаштування
settings.options=Організація
settings.full_name=Повне ім'я
settings.website=Web-сайт
settings.location=Розташування
settings.update_settings=Оновити налаштування
settings.delete=Видалити організацію
settings.delete_account=Видалити цю організацію
settings.confirm_delete_account=Підтвердіть видалення
members.member_role=Роль учасника:
members.owner=Власник
members.member=Учасник
members.remove=Видалити
members.leave=Покинути
members.invite_desc=Додати нового учасника до %s:
members.invite_now=Запросити зараз
teams.join=Приєднатися
teams.leave=Покинути
teams.read_access=Доступ для читання
teams.settings=Налаштування
teams.members=Учасники команди
teams.update_settings=Оновити налаштування
teams.add_team_member=Додати учасника команди
teams.add_team_repository=Додати репозиторій команди
teams.remove_repo=Видалити
[admin]
dashboard=Панель управління
users=Облікові записи користувачів
organizations=Організації
repositories=Репозиторії
config=Конфігурація
notices=Сповіщення системи
monitor=Моніторинг
first_page=Перша
last_page=Остання
total=Разом: %d
dashboard.statistic=Підсумок
dashboard.operation_name=Назва операції
dashboard.operation_switch=Перемкнути
dashboard.operation_run=Запустити
dashboard.delete_inactivate_accounts=Видалити всі неактивні облікові записи
dashboard.delete_inactivate_accounts_success=Усі неактивні облікові записи успішно видалено.
dashboard.server_uptime=Uptime серверу
dashboard.current_memory_usage=Поточне використання пам'яті
dashboard.memory_obtained=Отримано пам'яті
dashboard.stack_memory_obtained=Зайнято пам'яті стеком
dashboard.mspan_structures_usage=Використання структур MSpan
dashboard.mcache_structures_usage=Використання структур MCache
dashboard.mcache_structures_obtained=Отримано структур MCache
dashboard.next_gc_recycle=Наступний цикл GC
users.name=Ім'я кристувача
users.activated=Активовано
users.admin=Адміністратор
users.repos=Репозиторії
users.created=Створено
users.edit=Редагувати
users.local=Локальні
orgs.org_manage_panel=Керування організаціями
orgs.name=Назва
orgs.teams=Команди
orgs.members=Учасники
orgs.new_orga=Нова організація
repos.repo_manage_panel=Керування організаціями
repos.owner=Власник
repos.name=Назва
repos.private=Приватний
repos.issues=Проблеми
repos.size=Розмір
auths.name=Ім'я
auths.type=Тип
auths.enabled=Увімкнено
auths.updated=Оновлено
auths.auth_type=Тип автентифікації
auths.auth_name=Назва автентифікації
auths.security_protocol=Протокол безпеки
auths.domain=Домен
auths.host=Хост
auths.port=Порт
auths.admin_filter=Фільтр адміністратора
auths.smtp_auth=Тип автентифікації SMTP
auths.smtphost=SMTP хост
auths.smtpport=SMTP порт
auths.allowed_domains=Дозволені домени
auths.enable_tls=Увімкнути TLS-шифрування
auths.skip_tls_verify=Пропустити перевірку TLS
auths.oauth2_clientSecret=Ключ клієнта
auths.oauth2_tokenURL=URL токену
auths.oauth2_authURL=URL авторизації
auths.oauth2_profileURL=URL профілю
auths.oauth2_emailURL=URL електронної пошти
auths.enable_auto_register=Увімкнути автоматичну реєстрацію
auths.tips=Поради
config.server_config=Конфігурація сервера
config.app_name=Назва сайту
config.app_ver=Версія Gitea
config.app_url=Базова URL-адреса Gitea
config.run_mode=Режим виконання
config.git_version=Версія Git
config.repo_root_path=Кореневий шлях репозиторія
config.lfs_root_path=Кореневої шлях LFS
config.static_file_root_path=Повний шлях до статичного файлу
config.log_file_root_path=Шлях до лог файлу
config.script_type=Тип скрипта
config.ssh_config=Конфігурація SSH
config.ssh_enabled=Увімкнено
config.ssh_port=Порт
config.db_config=Конфігурація бази даних
config.db_type=Тип
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.disable_key_size_check=Вимкнути перевірку мінімального розміру ключа
config.enable_captcha=Увімкнути CAPTCHA
config.webhook_config=Конфігурація web-хуків
config.mailer_enabled=Увімкнено
config.mailer_disable_helo=Вимкнути HELO
config.mailer_name=Ім'я
config.mailer_host=Хост
config.mailer_user=Користувач
config.oauth_config=Конфігурація OAuth
config.oauth_enabled=Увімкнено
config.cache_config=Конфігурація кешу
config.cache_adapter=Адаптер кешу
config.cache_interval=Інтервал кешування
config.cache_conn=Підключення до кешу
config.session_config=Конфігурація сесії
config.session_provider=Провайдер сесії
config.cookie_name=Ім'я файлу cookie
config.session_life_time=Час життя сесії
config.https_only=Тільки HTTPS
config.cookie_life_time=Час життя cookie-файлу
config.picture_service=Сервіс зображень
config.disable_gravatar=Вимкнути Gravatar
config.enable_federated_avatar=Увімкнути зовнішні аватари
config.git_config=Конфігурація git
config.git_disable_diff_highlight=Вимкнути підсвітку синтаксису diff
config.git_gc_args=Аргументи GC
config.git_migrate_timeout=Тайм-аут міграції
config.git_mirror_timeout=Тайм-аут оновлення дзеркала
config.git_clone_timeout=Тайм-аут операції клонування
config.git_pull_timeout=Тайм-аут операції Pull
config.git_gc_timeout=Тайм-аут операції GC
config.log_config=Конфігурація журналу
monitor.cron=Завдання cron
monitor.name=Ім'я
monitor.schedule=Розклад
monitor.next=Наступного разу
monitor.previous=Попереднього разу
monitor.process=Запущені процеси
monitor.desc=Опис
monitor.start=Час початку
monitor.execute_time=Час виконання
notices.system_notice_list=Сповіщення системи
notices.actions=Дії
notices.select_all=Вибрати все
notices.delete_selected=Видалити обране
notices.delete_all=Видалити усі cповіщення
notices.type=Тип
notices.type_1=Репозиторій
notices.desc=Опис
notices.op=Оп.
[action]
create_repo=створено репозиторій <a href="%s">%s</a>
rename_repo=репозиторій перейменовано з <code>%[1]s</code> на <a href="%[2]s">%[3]s</a>
commit_repo=запушено до <a href="%[1]s/src/%[2]s">%[3]s</a> у <a href="%[1]s">%[4]s</a>
create_issue=`відкрито проблему <a href="%s/issues/%s">%s#%[2]s</a>`
close_issue=`закрито проблему <a href="%s/issues/%s">%s#%[2]s</a>`
reopen_issue=`повторно відкрито проблему <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request=`створено запити на злиття <a href="%s/pulls/%s">%s#%[2]s</a>`
reopen_pull_request=`повторно відкрито запит на злиття <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue=`відкоментовано проблему <a href="%s/issues/%s">%s#%[2]s</a>`
merge_pull_request=`запит на злиття злито <a href="%s/pulls/%s">%s#%[2]s</a>`
transfer_repo=перенесено репозиторій <code>%s</code> у <a href="%s">%s</a>
delete_tag=видалено мітку %[2]s з <a href="%[1]s">%[3]s</a>
delete_branch=видалено гілку %[2]s з <a href="%[1]s">%[3]s</a>
[tool]
ago=%s тому
now=зараз
1s=1 секунда
1m=1 хвилина
1h=1 година
1d=1 день
1w=1 тиждень
1mon=1 місяць
1y=1 рік
seconds=%d секунди
minutes=%d хвилини
hours=%d години
days=%d дні
weeks=%d тижднів
months=%d місяці
years=%d роки
raw_seconds=секунди
raw_minutes=хвилини
[dropzone]
file_too_big=Розмір файлу ({{filesize}} MB), що більше ніж максимальний розмір: ({{maxFilesize}} MB).
remove_file=Видалити файл
[notification]
notifications=Сповіщення
unread=Непрочитані
read=Прочитані
mark_as_read=Позначити як прочитане
mark_as_unread=Позначити як непрочитане
mark_all_as_read=Позначити всі як прочитані
[gpg]

View File

@ -967,6 +967,7 @@ remove_file=移除文件
notifications=通知
unread=未读消息
read=已读消息
no_unread=没有未读通知。
pin=Pin 通知
mark_as_read=标记为已读
mark_as_unread=标记为未读

File diff suppressed because one or more lines are too long

View File

@ -1138,6 +1138,16 @@ function initAdmin() {
}
}
function onUsePagedSearchChange() {
if ($('#use_paged_search').prop('checked')) {
$('.search-page-size').show()
.find('input').attr('required', 'required');
} else {
$('.search-page-size').hide()
.find('input').removeAttr('required');
}
}
function onOAuth2Change() {
$('.open_id_connect_auto_discovery_url, .oauth2_use_custom_url').hide();
$('.open_id_connect_auto_discovery_url input[required]').removeAttr('required');
@ -1191,7 +1201,7 @@ function initAdmin() {
// New authentication
if ($('.admin.new.authentication').length > 0) {
$('#auth_type').change(function () {
$('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls').hide();
$('.ldap, .dldap, .smtp, .pam, .oauth2, .has-tls .search-page-size').hide();
$('.ldap input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required]').removeAttr('required');
@ -1223,9 +1233,13 @@ function initAdmin() {
if (authType == '2' || authType == '5') {
onSecurityProtocolChange()
}
if (authType == '2') {
onUsePagedSearchChange();
}
});
$('#auth_type').change();
$('#security_protocol').change(onSecurityProtocolChange);
$('#use_paged_search').change(onUsePagedSearchChange);
$('#oauth2_provider').change(onOAuth2Change);
$('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);
}
@ -1234,6 +1248,9 @@ function initAdmin() {
var authType = $('#auth_type').val();
if (authType == '2' || authType == '5') {
$('#security_protocol').change(onSecurityProtocolChange);
if (authType == '2') {
$('#use_paged_search').change(onUsePagedSearchChange);
}
} else if (authType == '6') {
$('#oauth2_provider').change(onOAuth2Change);
$('#oauth2_use_custom_url').change(onOAuth2UseCustomURLChange);
@ -2193,4 +2210,15 @@ function initTopicbar() {
},
},
});
}
}
function toggleDuedateForm() {
$('#add_deadline_form').fadeToggle(150);
}
function deleteDueDate(url) {
$.post(url, {
'_csrf': csrf,
},function( data ) {
window.location.reload();
});
}

View File

@ -237,7 +237,8 @@
&.octicon-mail-reply {
margin-right: 10px;
}
&.octicon-file-directory, &.octicon-file-submodule {
&.octicon-file-directory, &.octicon-file-submodule,
&.octicon-file-symlink-directory {
color: #1e70bf;
}
}
@ -1544,6 +1545,9 @@
margin-top: -5px;
margin-right: 5px;
}
.overdue{
color: red;
}
}
}
}

127
public/swagger.v1.json vendored
View File

@ -1565,6 +1565,46 @@
}
}
},
"/repos/{owner}/{repo}/hooks/{id}/tests": {
"post": {
"produces": [
"application/json"
],
"tags": [
"repository"
],
"summary": "Test a push webhook",
"operationId": "repoTestHook",
"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 test",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
}
}
}
},
"/repos/{owner}/{repo}/issue/{index}/comments": {
"get": {
"produces": [
@ -5539,6 +5579,13 @@
"type": "string",
"x-go-name": "Assignee"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Assignees"
},
"body": {
"type": "string",
"x-go-name": "Body"
@ -5547,6 +5594,11 @@
"type": "boolean",
"x-go-name": "Closed"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"labels": {
"description": "list of label ids",
"type": "array",
@ -5675,6 +5727,13 @@
"type": "string",
"x-go-name": "Assignee"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Assignees"
},
"base": {
"type": "string",
"x-go-name": "Base"
@ -5683,6 +5742,11 @@
"type": "string",
"x-go-name": "Body"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"head": {
"type": "string",
"x-go-name": "Head"
@ -5984,10 +6048,22 @@
"type": "string",
"x-go-name": "Assignee"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Assignees"
},
"body": {
"type": "string",
"x-go-name": "Body"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"milestone": {
"type": "integer",
"format": "int64",
@ -6074,10 +6150,22 @@
"type": "string",
"x-go-name": "Assignee"
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Assignees"
},
"body": {
"type": "string",
"x-go-name": "Body"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"labels": {
"type": "array",
"items": {
@ -6327,10 +6415,22 @@
"assignee": {
"$ref": "#/definitions/User"
},
"assignees": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
},
"x-go-name": "Assignees"
},
"body": {
"type": "string",
"x-go-name": "Body"
},
"closed_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Closed"
},
"comments": {
"type": "integer",
"format": "int64",
@ -6341,6 +6441,11 @@
"format": "date-time",
"x-go-name": "Created"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"id": {
"type": "integer",
"format": "int64",
@ -6738,6 +6843,13 @@
"assignee": {
"$ref": "#/definitions/User"
},
"assignees": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
},
"x-go-name": "Assignees"
},
"base": {
"$ref": "#/definitions/PRBranchInfo"
},
@ -6745,6 +6857,11 @@
"type": "string",
"x-go-name": "Body"
},
"closed_at": {
"type": "string",
"format": "date-time",
"x-go-name": "Closed"
},
"comments": {
"type": "integer",
"format": "int64",
@ -6759,6 +6876,11 @@
"type": "string",
"x-go-name": "DiffURL"
},
"due_date": {
"type": "string",
"format": "date-time",
"x-go-name": "Deadline"
},
"head": {
"$ref": "#/definitions/PRBranchInfo"
},
@ -7196,6 +7318,11 @@
"format": "int64",
"x-go-name": "ID"
},
"language": {
"description": "User locale",
"type": "string",
"x-go-name": "Language"
},
"login": {
"description": "the user's username",
"type": "string",

View File

@ -91,6 +91,10 @@ func NewAuthSource(ctx *context.Context) {
}
func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
var pageSize uint32
if form.UsePagedSearch {
pageSize = uint32(form.SearchPageSize)
}
return &models.LDAPConfig{
Source: &ldap.Source{
Name: form.Name,
@ -107,6 +111,7 @@ func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
AttributeSurname: form.AttributeSurname,
AttributeMail: form.AttributeMail,
AttributesInBind: form.AttributesInBind,
SearchPageSize: pageSize,
Filter: form.Filter,
AdminFilter: form.AdminFilter,
Enabled: true,

View File

@ -382,9 +382,12 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/hooks", func() {
m.Combo("").Get(repo.ListHooks).
Post(bind(api.CreateHookOption{}), repo.CreateHook)
m.Combo("/:id").Get(repo.GetHook).
Patch(bind(api.EditHookOption{}), repo.EditHook).
Delete(repo.DeleteHook)
m.Group("/:id", func() {
m.Combo("").Get(repo.GetHook).
Patch(bind(api.EditHookOption{}), repo.EditHook).
Delete(repo.DeleteHook)
m.Post("/tests", context.RepoRef(), repo.TestHook)
})
}, reqToken(), reqRepoWriter())
m.Group("/collaborators", func() {
m.Get("", repo.ListCollaborators)

View File

@ -123,13 +123,10 @@ func EditTeam(ctx *context.APIContext, form api.EditTeamOption) {
// responses:
// "200":
// "$ref": "#/responses/Team"
team := &models.Team{
ID: ctx.Org.Team.ID,
OrgID: ctx.Org.Team.OrgID,
Name: form.Name,
Description: form.Description,
Authorize: models.ParseAccessMode(form.Permission),
}
team := ctx.Org.Team
team.Name = form.Name
team.Description = form.Description
team.Authorize = models.ParseAccessMode(form.Permission)
if err := models.UpdateTeam(team, true); err != nil {
ctx.Error(500, "EditTeam", err)
return

View File

@ -5,11 +5,11 @@
package repo
import (
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/utils"
api "code.gitea.io/sdk/gitea"
)
@ -82,6 +82,62 @@ func GetHook(ctx *context.APIContext) {
ctx.JSON(200, convert.ToHook(repo.RepoLink, hook))
}
// TestHook tests a hook
func TestHook(ctx *context.APIContext) {
// swagger:operation POST /repos/{owner}/{repo}/hooks/{id}/tests repository repoTestHook
// ---
// summary: Test a push webhook
// produces:
// - application/json
// parameters:
// - name: owner
// in: path
// description: owner of the repo
// type: string
// required: true
// - name: repo
// in: path
// description: name of the repo
// type: string
// required: true
// - name: id
// in: path
// description: id of the hook to test
// type: integer
// required: true
// responses:
// "204":
// "$ref": "#/responses/empty"
if ctx.Repo.Commit == nil {
// if repo does not have any commits, then don't send a webhook
ctx.Status(204)
return
}
hookID := ctx.ParamsInt64(":id")
hook, err := utils.GetRepoHook(ctx, ctx.Repo.Repository.ID, hookID)
if err != nil {
return
}
if err := models.PrepareWebhook(hook, ctx.Repo.Repository, models.HookEventPush, &api.PushPayload{
Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch,
Before: ctx.Repo.Commit.ID.String(),
After: ctx.Repo.Commit.ID.String(),
Commits: []*api.PayloadCommit{
convert.ToCommit(ctx.Repo.Repository, ctx.Repo.Commit),
},
Repo: ctx.Repo.Repository.APIFormat(models.AccessModeNone),
Pusher: ctx.User.APIFormat(),
Sender: ctx.User.APIFormat(),
}); err != nil {
ctx.Error(500, "PrepareWebhook: ", err)
return
}
go models.HookQueue.Add(ctx.Repo.Repository.ID)
ctx.Status(204)
}
// CreateHook create a hook for a repository
func CreateHook(ctx *context.APIContext, form api.CreateHookOption) {
// swagger:operation POST /repos/{owner}/{repo}/hooks repository repoCreateHook

View File

@ -0,0 +1,33 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repo
import (
"net/http"
"testing"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/test"
"github.com/stretchr/testify/assert"
)
func TestTestHook(t *testing.T) {
models.PrepareTestEnv(t)
ctx := test.MockContext(t, "user2/repo1/wiki/_pages")
ctx.SetParams(":id", "1")
test.LoadRepo(t, ctx, 1)
test.LoadRepoCommit(t, ctx)
test.LoadUser(t, ctx, 2)
TestHook(&context.APIContext{Context: ctx, Org: nil})
assert.EqualValues(t, http.StatusNoContent, ctx.Resp.Status())
models.AssertExistsAndLoadBean(t, &models.HookTask{
RepoID: 1,
HookID: 1,
}, models.Cond("is_delivered=?", false))
}

View File

@ -163,12 +163,19 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
// responses:
// "201":
// "$ref": "#/responses/Issue"
var deadlineUnix util.TimeStamp
if form.Deadline != nil {
deadlineUnix = util.TimeStamp(form.Deadline.Unix())
}
issue := &models.Issue{
RepoID: ctx.Repo.Repository.ID,
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
Content: form.Body,
RepoID: ctx.Repo.Repository.ID,
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
Content: form.Body,
DeadlineUnix: deadlineUnix,
}
if ctx.Repo.IsWriter() {
@ -265,6 +272,16 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
issue.Content = *form.Body
}
var deadlineUnix util.TimeStamp
if form.Deadline != nil && !form.Deadline.IsZero() {
deadlineUnix = util.TimeStamp(form.Deadline.Unix())
}
if err := models.UpdateIssueDeadline(issue, deadlineUnix, ctx.User); err != nil {
ctx.Error(500, "UpdateIssueDeadline", err)
return
}
if ctx.Repo.IsWriter() && form.Assignee != nil &&
(issue.Assignee == nil || issue.Assignee.LowerName != strings.ToLower(*form.Assignee)) {
if len(*form.Assignee) == 0 {

View File

@ -0,0 +1,16 @@
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repo
import (
"path/filepath"
"testing"
"code.gitea.io/gitea/models"
)
func TestMain(m *testing.M) {
models.MainTest(m, filepath.Join("..", "..", "..", ".."))
}

View File

@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/modules/auth"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/util"
api "code.gitea.io/sdk/gitea"
)
@ -236,16 +237,22 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
return
}
var deadlineUnix util.TimeStamp
if form.Deadline != nil {
deadlineUnix = util.TimeStamp(form.Deadline.Unix())
}
prIssue := &models.Issue{
RepoID: repo.ID,
Index: repo.NextIssueIndex(),
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
MilestoneID: milestoneID,
AssigneeID: assigneeID,
IsPull: true,
Content: form.Body,
RepoID: repo.ID,
Index: repo.NextIssueIndex(),
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
MilestoneID: milestoneID,
AssigneeID: assigneeID,
IsPull: true,
Content: form.Body,
DeadlineUnix: deadlineUnix,
}
pr := &models.PullRequest{
HeadRepoID: headRepo.ID,
@ -328,6 +335,16 @@ func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) {
issue.Content = form.Body
}
var deadlineUnix util.TimeStamp
if form.Deadline != nil && !form.Deadline.IsZero() {
deadlineUnix = util.TimeStamp(form.Deadline.Unix())
}
if err := models.UpdateIssueDeadline(issue, deadlineUnix, ctx.User); err != nil {
ctx.Error(500, "UpdateIssueDeadline", err)
return
}
if ctx.Repo.IsWriter() && len(form.Assignee) > 0 &&
(issue.Assignee == nil || issue.Assignee.LowerName != strings.ToLower(form.Assignee)) {
if len(form.Assignee) == 0 {

View File

@ -60,7 +60,9 @@ func GlobalInit() {
log.Fatal(4, "Failed to initialize ORM engine: %v", err)
}
models.HasEngine = true
models.InitOAuth2()
if err := models.InitOAuth2(); err != nil {
log.Fatal(4, "Failed to initialize OAuth2 support: %v", err)
}
models.LoadRepoConfig()
models.NewRepoContext()

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