mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-19 22:11:00 +00:00
Compare commits
18 Commits
v1.10.5
...
v1.12.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6657644a9 | ||
|
|
11f7fc5621 | ||
|
|
8a0da9ea78 | ||
|
|
671d603684 | ||
|
|
a9f4489bbc | ||
|
|
b8551f8532 | ||
|
|
33c5e5e7fa | ||
|
|
1966f421b3 | ||
|
|
de63ac046e | ||
|
|
b40428a50a | ||
|
|
4901096842 | ||
|
|
9d3e69e867 | ||
|
|
0c2148c037 | ||
|
|
a5281895c7 | ||
|
|
57c7a7aa72 | ||
|
|
4a4fc73ee1 | ||
|
|
f7a6763c58 | ||
|
|
123d386059 |
@@ -36,6 +36,8 @@ rules:
|
|||||||
max-len: [0]
|
max-len: [0]
|
||||||
newline-per-chained-call: [0]
|
newline-per-chained-call: [0]
|
||||||
no-alert: [0]
|
no-alert: [0]
|
||||||
|
no-cond-assign: [2, except-parens]
|
||||||
|
no-console: [1, {allow: [info, warn, error]}]
|
||||||
no-continue: [0]
|
no-continue: [0]
|
||||||
no-mixed-operators: [0]
|
no-mixed-operators: [0]
|
||||||
no-multi-assign: [0]
|
no-multi-assign: [0]
|
||||||
|
|||||||
45
CHANGELOG.md
45
CHANGELOG.md
@@ -4,6 +4,51 @@ 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
|
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).
|
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
|
|
||||||
|
## [1.11.2](https://github.com/go-gitea/gitea/releases/tag/v1.11.2) - 2020-03-06
|
||||||
|
|
||||||
|
* BREAKING
|
||||||
|
* Various fixes in login sources (#10428) (#10429)
|
||||||
|
* SECURITY
|
||||||
|
* Ensure only own addresses are updated (#10397) (#10399)
|
||||||
|
* Logout POST action (#10582) (#10585)
|
||||||
|
* Org action fixes and form cleanup (#10512) (#10514)
|
||||||
|
* Change action GETs to POST (#10462) (#10464)
|
||||||
|
* Fix admin notices (#10480) (#10483)
|
||||||
|
* Change admin dashboard to POST (#10465) (#10466)
|
||||||
|
* Update markbates/goth (#10444) (#10445)
|
||||||
|
* Update crypto vendors (#10385) (#10398)
|
||||||
|
* BUGFIXES
|
||||||
|
* Allow users with write permissions to modify issue descriptions and comments. (#10623) (#10626)
|
||||||
|
* Handle deleted base branch in PR (#10618) (#10619)
|
||||||
|
* Delete dependencies when deleting a repository (#10608) (#10616)
|
||||||
|
* Ensure executable bit is kept on the web editor (#10607) (#10614)
|
||||||
|
* Update mergebase in pr checker (#10586) (#10605)
|
||||||
|
* Fix release attachments being deleted while upgrading (#10572) (#10573)
|
||||||
|
* Fix redirection path if Slack webhook channel is invalid (#10566)
|
||||||
|
* Fix head.tmpl og:image picture location (#10531) (#10556)
|
||||||
|
* Fix 404 after activating secondary email (#10547) (#10553)
|
||||||
|
* Show Signer in commit lists and add basic trust (#10425 & #10511) (#10524)
|
||||||
|
* Fix potential bugs (#10513) (#10518)
|
||||||
|
* Use \[:space:\] instead of \\s (#10508) (#10509)
|
||||||
|
* Avoid mailing users that have explicitly unwatched an issue (#10475) (#10500)
|
||||||
|
* Handle push rejection message in Merge & Web Editor (#10373) (#10497)
|
||||||
|
* Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368) (#10493)
|
||||||
|
* Fix double PR notification from API (#10482) (#10486)
|
||||||
|
* Show the username as a fallback on feeds if full name is blank (#10461)
|
||||||
|
* Trigger webhooks on issue label-change via API too (#10421) (#10439)
|
||||||
|
* Fix git reference type in webhooks (#10427) (#10432)
|
||||||
|
* Prevent panic on merge to PR (#10403) (#10408)
|
||||||
|
* Fix wrong num closed issues on repository when close issue via commit… (#10364) (#10380)
|
||||||
|
* Reading pull attachments should depend on read UnitTypePullRequests (#10346) (#10354)
|
||||||
|
* Set max-width on review-box comment box (#10348) (#10353)
|
||||||
|
* Prevent nil pointer in GetPullRequestCommitStatusState (#10342) (#10344)
|
||||||
|
* Fix protected branch status check settings (#10341) (#10343)
|
||||||
|
* Truncate long commit message header (#10301) (#10319)
|
||||||
|
* Set the initial commit status to Success otherwise it will always be Pending (#10317) (#10318)
|
||||||
|
* Don't manually replace whitespace during render (#10291) (#10315)
|
||||||
|
* ENHANCEMENT
|
||||||
|
* Admin page for managing user e-mail activation (#10557) (#10579)
|
||||||
|
|
||||||
## [1.11.1](https://github.com/go-gitea/gitea/releases/tag/v1.11.1) - 2020-02-15
|
## [1.11.1](https://github.com/go-gitea/gitea/releases/tag/v1.11.1) - 2020-02-15
|
||||||
|
|
||||||
* BUGFIXES
|
* BUGFIXES
|
||||||
|
|||||||
29
Makefile
29
Makefile
@@ -7,6 +7,7 @@ GO ?= go
|
|||||||
SED_INPLACE := sed -i
|
SED_INPLACE := sed -i
|
||||||
SHASUM ?= shasum -a 256
|
SHASUM ?= shasum -a 256
|
||||||
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
|
||||||
|
COMMA := ,
|
||||||
|
|
||||||
ifeq ($(HAS_GO), GO)
|
ifeq ($(HAS_GO), GO)
|
||||||
GOPATH ?= $(shell $(GO) env GOPATH)
|
GOPATH ?= $(shell $(GO) env GOPATH)
|
||||||
@@ -16,22 +17,14 @@ endif
|
|||||||
|
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
EXECUTABLE ?= gitea.exe
|
EXECUTABLE ?= gitea.exe
|
||||||
FIND_PWD_REGEXP := find . -regextype posix-egrep
|
|
||||||
else
|
else
|
||||||
EXECUTABLE ?= gitea
|
EXECUTABLE ?= gitea
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
FIND_PWD_REGEXP := find . -regextype posix-egrep
|
|
||||||
BUSYBOX := $(shell find --help 2>&1 | grep -o BusyBox)
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
SED_INPLACE := sed -i ''
|
SED_INPLACE := sed -i ''
|
||||||
FIND_PWD_REGEXP := find -E .
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S),FreeBSD)
|
ifeq ($(UNAME_S),FreeBSD)
|
||||||
SED_INPLACE := sed -i ''
|
SED_INPLACE := sed -i ''
|
||||||
FIND_PWD_REGEXP := find -E .
|
|
||||||
endif
|
|
||||||
ifeq ($(BUSYBOX),BusyBox)
|
|
||||||
FIND_PWD_REGEXP := find .
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -71,9 +64,6 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
|
|||||||
|
|
||||||
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))
|
PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))
|
||||||
|
|
||||||
GO_SOURCES ?= $(shell $(FIND_PWD_REGEXP) -regex '\./(node_modules|docs|public|options|contrib|data)' -prune -o -name "*.go" -type f -print)
|
|
||||||
GO_SOURCES_OWN := $(filter-out ./vendor/% %/bindata.go, $(GO_SOURCES))
|
|
||||||
|
|
||||||
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
|
WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
|
||||||
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc
|
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc
|
||||||
WEBPACK_DEST := public/js/index.js public/css/index.css
|
WEBPACK_DEST := public/js/index.js public/css/index.css
|
||||||
@@ -82,13 +72,24 @@ WEBPACK_DEST_DIRS := public/js public/css
|
|||||||
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
|
||||||
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))
|
||||||
|
|
||||||
|
TAGS ?=
|
||||||
|
TAGS_SPLIT := $(subst $(COMMA), ,$(TAGS))
|
||||||
|
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
|
||||||
|
|
||||||
|
GO_DIRS := cmd integrations models modules routers scripts services vendor
|
||||||
|
GO_SOURCES := $(wildcard *.go)
|
||||||
|
GO_SOURCES += $(shell find $(GO_DIRS) -type f -name "*.go" -not -path modules/options/bindata.go -not -path modules/public/bindata.go -not -path modules/templates/bindata.go)
|
||||||
|
|
||||||
|
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
|
||||||
|
GO_SOURCES += $(BINDATA_DEST)
|
||||||
|
endif
|
||||||
|
|
||||||
|
GO_SOURCES_OWN := $(filter-out vendor/% %/bindata.go, $(GO_SOURCES))
|
||||||
|
|
||||||
FOMANTIC_CONFIGS := semantic.json web_src/fomantic/theme.config.less web_src/fomantic/_site/globals/site.variables
|
FOMANTIC_CONFIGS := semantic.json web_src/fomantic/theme.config.less web_src/fomantic/_site/globals/site.variables
|
||||||
FOMANTIC_DEST := public/fomantic/semantic.min.js public/fomantic/semantic.min.css
|
FOMANTIC_DEST := public/fomantic/semantic.min.js public/fomantic/semantic.min.css
|
||||||
FOMANTIC_DEST_DIR := public/fomantic
|
FOMANTIC_DEST_DIR := public/fomantic
|
||||||
|
|
||||||
TAGS ?=
|
|
||||||
TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags
|
|
||||||
|
|
||||||
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1
|
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger@v0.20.1
|
||||||
SWAGGER := GO111MODULE=on $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
|
SWAGGER := GO111MODULE=on $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
|
||||||
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
|
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
|
||||||
|
|||||||
@@ -870,7 +870,9 @@ MAX_GIT_DIFF_FILES = 100
|
|||||||
; see more on http://git-scm.com/docs/git-gc/
|
; see more on http://git-scm.com/docs/git-gc/
|
||||||
GC_ARGS =
|
GC_ARGS =
|
||||||
; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
||||||
EnableAutoGitWireProtocol = true
|
ENABLE_AUTO_GIT_WIRE_PROTOCOL = true
|
||||||
|
; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
||||||
|
PULL_REQUEST_PUSH_MESSAGE = true
|
||||||
|
|
||||||
; Operation timeout in seconds
|
; Operation timeout in seconds
|
||||||
[git.timeout]
|
[git.timeout]
|
||||||
|
|||||||
@@ -1,166 +1,164 @@
|
|||||||
|
/* global Fuse, Mark */
|
||||||
|
|
||||||
function ready(fn) {
|
function ready(fn) {
|
||||||
if (document.readyState != 'loading') {
|
if (document.readyState !== 'loading') {
|
||||||
fn();
|
fn();
|
||||||
} else {
|
} else {
|
||||||
document.addEventListener('DOMContentLoaded', fn);
|
document.addEventListener('DOMContentLoaded', fn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ready(doSearch);
|
ready(doSearch);
|
||||||
|
|
||||||
const summaryInclude = 60;
|
const summaryInclude = 60;
|
||||||
const fuseOptions = {
|
const fuseOptions = {
|
||||||
shouldSort: true,
|
shouldSort: true,
|
||||||
includeMatches: true,
|
includeMatches: true,
|
||||||
matchAllTokens: true,
|
matchAllTokens: true,
|
||||||
threshold: 0.0, // for parsing diacritics
|
threshold: 0.0, // for parsing diacritics
|
||||||
tokenize: true,
|
tokenize: true,
|
||||||
location: 0,
|
location: 0,
|
||||||
distance: 100,
|
distance: 100,
|
||||||
maxPatternLength: 32,
|
maxPatternLength: 32,
|
||||||
minMatchCharLength: 1,
|
minMatchCharLength: 1,
|
||||||
keys: [{
|
keys: [{
|
||||||
name: "title",
|
name: 'title',
|
||||||
weight: 0.8
|
weight: 0.8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "contents",
|
name: 'contents',
|
||||||
weight: 0.5
|
weight: 0.5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "tags",
|
name: 'tags',
|
||||||
weight: 0.3
|
weight: 0.3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "categories",
|
name: 'categories',
|
||||||
weight: 0.3
|
weight: 0.3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
function param(name) {
|
function param(name) {
|
||||||
return decodeURIComponent((location.search.split(name + '=')[1] || '').split('&')[0]).replace(/\+/g, ' ');
|
return decodeURIComponent((window.location.search.split(`${name}=`)[1] || '').split('&')[0]).replace(/\+/g, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
let searchQuery = param("s");
|
const searchQuery = param('s');
|
||||||
|
|
||||||
function doSearch() {
|
function doSearch() {
|
||||||
if (searchQuery) {
|
if (searchQuery) {
|
||||||
document.getElementById("search-query").value = searchQuery;
|
document.getElementById('search-query').value = searchQuery;
|
||||||
executeSearch(searchQuery);
|
executeSearch(searchQuery);
|
||||||
} else {
|
} else {
|
||||||
const para = document.createElement("P");
|
const para = document.createElement('P');
|
||||||
para.innerText = "Please enter a word or phrase above";
|
para.innerText = 'Please enter a word or phrase above';
|
||||||
document.getElementById("search-results").appendChild(para);
|
document.getElementById('search-results').appendChild(para);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJSON(url, fn) {
|
function getJSON(url, fn) {
|
||||||
const request = new XMLHttpRequest();
|
const request = new XMLHttpRequest();
|
||||||
request.open('GET', url, true);
|
request.open('GET', url, true);
|
||||||
request.onload = function () {
|
request.onload = function () {
|
||||||
if (request.status >= 200 && request.status < 400) {
|
if (request.status >= 200 && request.status < 400) {
|
||||||
const data = JSON.parse(request.responseText);
|
const data = JSON.parse(request.responseText);
|
||||||
fn(data);
|
fn(data);
|
||||||
} else {
|
} else {
|
||||||
console.log("Target reached on " + url + " with error " + request.status);
|
console.error(`Target reached on ${url} with error ${request.status}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
request.onerror = function () {
|
request.onerror = function () {
|
||||||
console.log("Connection error " + request.status);
|
console.error(`Connection error ${request.status}`);
|
||||||
};
|
};
|
||||||
request.send();
|
request.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
function executeSearch(searchQuery) {
|
function executeSearch(searchQuery) {
|
||||||
getJSON("/" + document.LANG + "/index.json", function (data) {
|
getJSON(`/${document.LANG}/index.json`, (data) => {
|
||||||
const pages = data;
|
const pages = data;
|
||||||
const fuse = new Fuse(pages, fuseOptions);
|
const fuse = new Fuse(pages, fuseOptions);
|
||||||
const result = fuse.search(searchQuery);
|
const result = fuse.search(searchQuery);
|
||||||
console.log({
|
document.getElementById('search-results').innerHTML = '';
|
||||||
"matches": result
|
if (result.length > 0) {
|
||||||
});
|
populateResults(result);
|
||||||
document.getElementById("search-results").innerHTML = "";
|
} else {
|
||||||
if (result.length > 0) {
|
const para = document.createElement('P');
|
||||||
populateResults(result);
|
para.innerText = 'No matches found';
|
||||||
} else {
|
document.getElementById('search-results').appendChild(para);
|
||||||
const para = document.createElement("P");
|
}
|
||||||
para.innerText = "No matches found";
|
});
|
||||||
document.getElementById("search-results").appendChild(para);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateResults(result) {
|
function populateResults(result) {
|
||||||
result.forEach(function (value, key) {
|
result.forEach((value, key) => {
|
||||||
const content = value.item.contents;
|
const content = value.item.contents;
|
||||||
let snippet = "";
|
let snippet = '';
|
||||||
const snippetHighlights = [];
|
const snippetHighlights = [];
|
||||||
if (fuseOptions.tokenize) {
|
if (fuseOptions.tokenize) {
|
||||||
snippetHighlights.push(searchQuery);
|
snippetHighlights.push(searchQuery);
|
||||||
value.matches.forEach(function (mvalue) {
|
value.matches.forEach((mvalue) => {
|
||||||
if (mvalue.key === "tags" || mvalue.key === "categories") {
|
if (mvalue.key === 'tags' || mvalue.key === 'categories') {
|
||||||
snippetHighlights.push(mvalue.value);
|
snippetHighlights.push(mvalue.value);
|
||||||
} else if (mvalue.key === "contents") {
|
} else if (mvalue.key === 'contents') {
|
||||||
const ind = content.toLowerCase().indexOf(searchQuery.toLowerCase());
|
const ind = content.toLowerCase().indexOf(searchQuery.toLowerCase());
|
||||||
const start = ind - summaryInclude > 0 ? ind - summaryInclude : 0;
|
const start = ind - summaryInclude > 0 ? ind - summaryInclude : 0;
|
||||||
const end = ind + searchQuery.length + summaryInclude < content.length ? ind + searchQuery.length + summaryInclude : content.length;
|
const end = ind + searchQuery.length + summaryInclude < content.length ? ind + searchQuery.length + summaryInclude : content.length;
|
||||||
snippet += content.substring(start, end);
|
snippet += content.substring(start, end);
|
||||||
if (ind > -1) {
|
if (ind > -1) {
|
||||||
snippetHighlights.push(content.substring(ind, ind + searchQuery.length))
|
snippetHighlights.push(content.substring(ind, ind + searchQuery.length));
|
||||||
} else {
|
} else {
|
||||||
snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0], mvalue.indices[0][1] - mvalue.indices[0][0] + 1));
|
snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0], mvalue.indices[0][1] - mvalue.indices[0][0] + 1));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (snippet.length < 1) {
|
if (snippet.length < 1) {
|
||||||
snippet += content.substring(0, summaryInclude * 2);
|
snippet += content.substring(0, summaryInclude * 2);
|
||||||
}
|
}
|
||||||
//pull template from hugo templarte definition
|
// pull template from hugo template definition
|
||||||
const templateDefinition = document.getElementById("search-result-template").innerHTML;
|
const templateDefinition = document.getElementById('search-result-template').innerHTML;
|
||||||
//replace values
|
// replace values
|
||||||
const output = render(templateDefinition, {
|
const output = render(templateDefinition, {
|
||||||
key: key,
|
key,
|
||||||
title: value.item.title,
|
title: value.item.title,
|
||||||
link: value.item.permalink,
|
link: value.item.permalink,
|
||||||
tags: value.item.tags,
|
tags: value.item.tags,
|
||||||
categories: value.item.categories,
|
categories: value.item.categories,
|
||||||
snippet: snippet
|
snippet
|
||||||
});
|
|
||||||
document.getElementById("search-results").appendChild(htmlToElement(output));
|
|
||||||
|
|
||||||
snippetHighlights.forEach(function (snipvalue) {
|
|
||||||
new Mark(document.getElementById("summary-" + key)).mark(snipvalue);
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
document.getElementById('search-results').appendChild(htmlToElement(output));
|
||||||
|
|
||||||
|
snippetHighlights.forEach((snipvalue) => {
|
||||||
|
new Mark(document.getElementById(`summary-${key}`)).mark(snipvalue);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function render(templateString, data) {
|
function render(templateString, data) {
|
||||||
let conditionalMatches, copy;
|
let conditionalMatches, copy;
|
||||||
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g;
|
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g;
|
||||||
//since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop
|
// since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop
|
||||||
copy = templateString;
|
copy = templateString;
|
||||||
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) {
|
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) {
|
||||||
if (data[conditionalMatches[1]]) {
|
if (data[conditionalMatches[1]]) {
|
||||||
//valid key, remove conditionals, leave content.
|
// valid key, remove conditionals, leave content.
|
||||||
copy = copy.replace(conditionalMatches[0], conditionalMatches[2]);
|
copy = copy.replace(conditionalMatches[0], conditionalMatches[2]);
|
||||||
} else {
|
} else {
|
||||||
//not valid, remove entire section
|
// not valid, remove entire section
|
||||||
copy = copy.replace(conditionalMatches[0], '');
|
copy = copy.replace(conditionalMatches[0], '');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
templateString = copy;
|
}
|
||||||
//now any conditionals removed we can do simple substitution
|
templateString = copy;
|
||||||
let key, find, re;
|
// now any conditionals removed we can do simple substitution
|
||||||
for (key in data) {
|
let key, find, re;
|
||||||
find = '\\$\\{\\s*' + key + '\\s*\\}';
|
for (key of Object.keys(data)) {
|
||||||
re = new RegExp(find, 'g');
|
find = `\\$\\{\\s*${key}\\s*\\}`;
|
||||||
templateString = templateString.replace(re, data[key]);
|
re = new RegExp(find, 'g');
|
||||||
}
|
templateString = templateString.replace(re, data[key]);
|
||||||
return templateString;
|
}
|
||||||
|
return templateString;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -169,8 +167,8 @@ function render(templateString, data) {
|
|||||||
* @return {Element}
|
* @return {Element}
|
||||||
*/
|
*/
|
||||||
function htmlToElement(html) {
|
function htmlToElement(html) {
|
||||||
const template = document.createElement('template');
|
const template = document.createElement('template');
|
||||||
html = html.trim(); // Never return a text node of whitespace as the result
|
html = html.trim(); // Never return a text node of whitespace as the result
|
||||||
template.innerHTML = html;
|
template.innerHTML = html;
|
||||||
return template.content.firstChild;
|
return template.content.firstChild;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ params:
|
|||||||
description: Git with a cup of tea
|
description: Git with a cup of tea
|
||||||
author: The Gitea Authors
|
author: The Gitea Authors
|
||||||
website: https://docs.gitea.io
|
website: https://docs.gitea.io
|
||||||
version: 1.11.0
|
version: 1.11.2
|
||||||
minGoVersion: 1.11
|
minGoVersion: 1.11
|
||||||
goVersion: 1.13
|
goVersion: 1.13
|
||||||
minNodeVersion: 10
|
minNodeVersion: 10
|
||||||
|
|||||||
@@ -541,6 +541,7 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false`
|
|||||||
- `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view.
|
- `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view.
|
||||||
- `GC_ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/
|
- `GC_ARGS`: **\<empty\>**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/
|
||||||
- `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
- `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1
|
||||||
|
- `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled)
|
||||||
- `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed.
|
- `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed.
|
||||||
- `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay.
|
- `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay.
|
||||||
|
|
||||||
|
|||||||
@@ -15,24 +15,24 @@ menu:
|
|||||||
|
|
||||||
# Webhooks
|
# Webhooks
|
||||||
|
|
||||||
Gitea supports web hooks for repository events. This can be found in the settings
|
Gitea supports web hooks for repository events. This can be configured in the settings
|
||||||
page `/:username/:reponame/settings/hooks`. All event pushes are POST requests.
|
page `/:username/:reponame/settings/hooks` by a repository admin. Webhooks can also be configured on a per-organization and whole system basis.
|
||||||
The methods currently supported are:
|
All event pushes are POST requests. The methods currently supported are:
|
||||||
|
|
||||||
- Gitea
|
- Gitea (can also be a GET request)
|
||||||
- Gogs
|
- Gogs
|
||||||
- Slack
|
- Slack
|
||||||
- Discord
|
- Discord
|
||||||
- Dingtalk
|
- Dingtalk
|
||||||
- Telegram
|
- Telegram
|
||||||
- Microsoft Teams
|
- Microsoft Teams
|
||||||
|
- Feishu
|
||||||
|
|
||||||
### Event information
|
### Event information
|
||||||
|
|
||||||
The following is an example of event information that will be sent by Gitea to
|
The following is an example of event information that will be sent by Gitea to
|
||||||
a Payload URL:
|
a Payload URL:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
|
X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
|
||||||
X-GitHub-Event: push
|
X-GitHub-Event: push
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -96,7 +96,7 @@ require (
|
|||||||
github.com/unknwon/paginater v0.0.0-20151104151617-7748a72e0141
|
github.com/unknwon/paginater v0.0.0-20151104151617-7748a72e0141
|
||||||
github.com/urfave/cli v1.20.0
|
github.com/urfave/cli v1.20.0
|
||||||
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
|
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
|
||||||
github.com/yuin/goldmark v1.1.24
|
github.com/yuin/goldmark v1.1.25
|
||||||
go.etcd.io/bbolt v1.3.3 // indirect
|
go.etcd.io/bbolt v1.3.3 // indirect
|
||||||
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d
|
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d
|
||||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
|
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -574,8 +574,8 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
|
|||||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||||
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53 h1:HsIQ6yAjfjQ3IxPGrTusxp6Qxn92gNVq2x5CbvQvx3w=
|
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53 h1:HsIQ6yAjfjQ3IxPGrTusxp6Qxn92gNVq2x5CbvQvx3w=
|
||||||
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53/go.mod h1:f6elajwZV+xceiaqgRL090YzLEDGSbqr3poGL3ZgXYo=
|
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53/go.mod h1:f6elajwZV+xceiaqgRL090YzLEDGSbqr3poGL3ZgXYo=
|
||||||
github.com/yuin/goldmark v1.1.24 h1:K4FemPDr4x/ZcqldoXWnexTLfdMIy2eEfXxsLnotTRI=
|
github.com/yuin/goldmark v1.1.25 h1:isv+Q6HQAmmL2Ofcmg8QauBmDPlUUnSoNhEcC940Rds=
|
||||||
github.com/yuin/goldmark v1.1.24/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
|
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
|
||||||
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
|
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
|
||||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ var migrations = []Migration{
|
|||||||
NewMigration("remove dependencies from deleted repositories", purgeUnusedDependencies),
|
NewMigration("remove dependencies from deleted repositories", purgeUnusedDependencies),
|
||||||
// v130 -> v131
|
// v130 -> v131
|
||||||
NewMigration("Expand webhooks for more granularity", expandWebhooks),
|
NewMigration("Expand webhooks for more granularity", expandWebhooks),
|
||||||
|
// v131 -> v132
|
||||||
|
NewMigration("Add IsSystemWebhook column to webhooks table", addSystemWebhookColumn),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Migrate database to current version
|
// Migrate database to current version
|
||||||
|
|||||||
@@ -7,17 +7,23 @@ package migrations
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
|
"code.gitea.io/gitea/modules/setting"
|
||||||
|
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func expandWebhooks(x *xorm.Engine) error {
|
func expandWebhooks(x *xorm.Engine) error {
|
||||||
|
|
||||||
type ChooseEvents struct {
|
type HookEvents struct {
|
||||||
|
Create bool `json:"create"`
|
||||||
|
Delete bool `json:"delete"`
|
||||||
|
Fork bool `json:"fork"`
|
||||||
Issues bool `json:"issues"`
|
Issues bool `json:"issues"`
|
||||||
IssueAssign bool `json:"issue_assign"`
|
IssueAssign bool `json:"issue_assign"`
|
||||||
IssueLabel bool `json:"issue_label"`
|
IssueLabel bool `json:"issue_label"`
|
||||||
IssueMilestone bool `json:"issue_milestone"`
|
IssueMilestone bool `json:"issue_milestone"`
|
||||||
IssueComment bool `json:"issue_comment"`
|
IssueComment bool `json:"issue_comment"`
|
||||||
|
Push bool `json:"push"`
|
||||||
PullRequest bool `json:"pull_request"`
|
PullRequest bool `json:"pull_request"`
|
||||||
PullRequestAssign bool `json:"pull_request_assign"`
|
PullRequestAssign bool `json:"pull_request_assign"`
|
||||||
PullRequestLabel bool `json:"pull_request_label"`
|
PullRequestLabel bool `json:"pull_request_label"`
|
||||||
@@ -25,14 +31,17 @@ func expandWebhooks(x *xorm.Engine) error {
|
|||||||
PullRequestComment bool `json:"pull_request_comment"`
|
PullRequestComment bool `json:"pull_request_comment"`
|
||||||
PullRequestReview bool `json:"pull_request_review"`
|
PullRequestReview bool `json:"pull_request_review"`
|
||||||
PullRequestSync bool `json:"pull_request_sync"`
|
PullRequestSync bool `json:"pull_request_sync"`
|
||||||
|
Repository bool `json:"repository"`
|
||||||
|
Release bool `json:"release"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Events struct {
|
type HookEvent struct {
|
||||||
PushOnly bool `json:"push_only"`
|
PushOnly bool `json:"push_only"`
|
||||||
SendEverything bool `json:"send_everything"`
|
SendEverything bool `json:"send_everything"`
|
||||||
ChooseEvents bool `json:"choose_events"`
|
ChooseEvents bool `json:"choose_events"`
|
||||||
BranchFilter string `json:"branch_filter"`
|
BranchFilter string `json:"branch_filter"`
|
||||||
Events ChooseEvents `json:"events"`
|
|
||||||
|
HookEvents `json:"events"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Webhook struct {
|
type Webhook struct {
|
||||||
@@ -40,10 +49,9 @@ func expandWebhooks(x *xorm.Engine) error {
|
|||||||
Events string
|
Events string
|
||||||
}
|
}
|
||||||
|
|
||||||
var events Events
|
|
||||||
var bytes []byte
|
var bytes []byte
|
||||||
var last int
|
var last int
|
||||||
const batchSize = 50
|
batchSize := setting.Database.IterateBufferSize
|
||||||
sess := x.NewSession()
|
sess := x.NewSession()
|
||||||
defer sess.Close()
|
defer sess.Close()
|
||||||
for {
|
for {
|
||||||
@@ -63,24 +71,29 @@ func expandWebhooks(x *xorm.Engine) error {
|
|||||||
last += len(results)
|
last += len(results)
|
||||||
|
|
||||||
for _, res := range results {
|
for _, res := range results {
|
||||||
|
var events HookEvent
|
||||||
if err = json.Unmarshal([]byte(res.Events), &events); err != nil {
|
if err = json.Unmarshal([]byte(res.Events), &events); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if events.Events.Issues {
|
if !events.ChooseEvents {
|
||||||
events.Events.IssueAssign = true
|
continue
|
||||||
events.Events.IssueLabel = true
|
|
||||||
events.Events.IssueMilestone = true
|
|
||||||
events.Events.IssueComment = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if events.Events.PullRequest {
|
if events.Issues {
|
||||||
events.Events.PullRequestAssign = true
|
events.IssueAssign = true
|
||||||
events.Events.PullRequestLabel = true
|
events.IssueLabel = true
|
||||||
events.Events.PullRequestMilestone = true
|
events.IssueMilestone = true
|
||||||
events.Events.PullRequestComment = true
|
events.IssueComment = true
|
||||||
events.Events.PullRequestReview = true
|
}
|
||||||
events.Events.PullRequestSync = true
|
|
||||||
|
if events.PullRequest {
|
||||||
|
events.PullRequestAssign = true
|
||||||
|
events.PullRequestLabel = true
|
||||||
|
events.PullRequestMilestone = true
|
||||||
|
events.PullRequestComment = true
|
||||||
|
events.PullRequestReview = true
|
||||||
|
events.PullRequestSync = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if bytes, err = json.Marshal(&events); err != nil {
|
if bytes, err = json.Marshal(&events); err != nil {
|
||||||
|
|||||||
22
models/migrations/v131.go
Normal file
22
models/migrations/v131.go
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2020 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"
|
||||||
|
|
||||||
|
"xorm.io/xorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
func addSystemWebhookColumn(x *xorm.Engine) error {
|
||||||
|
type Webhook struct {
|
||||||
|
IsSystemWebhook bool `xorm:"NOT NULL DEFAULT false"`
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := x.Sync2(new(Webhook)); err != nil {
|
||||||
|
return fmt.Errorf("Sync2: %v", err)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -99,21 +99,22 @@ const (
|
|||||||
|
|
||||||
// Webhook represents a web hook object.
|
// Webhook represents a web hook object.
|
||||||
type Webhook struct {
|
type Webhook struct {
|
||||||
ID int64 `xorm:"pk autoincr"`
|
ID int64 `xorm:"pk autoincr"`
|
||||||
RepoID int64 `xorm:"INDEX"`
|
RepoID int64 `xorm:"INDEX"` // An ID of 0 indicates either a default or system webhook
|
||||||
OrgID int64 `xorm:"INDEX"`
|
OrgID int64 `xorm:"INDEX"`
|
||||||
URL string `xorm:"url TEXT"`
|
IsSystemWebhook bool
|
||||||
Signature string `xorm:"TEXT"`
|
URL string `xorm:"url TEXT"`
|
||||||
HTTPMethod string `xorm:"http_method"`
|
Signature string `xorm:"TEXT"`
|
||||||
ContentType HookContentType
|
HTTPMethod string `xorm:"http_method"`
|
||||||
Secret string `xorm:"TEXT"`
|
ContentType HookContentType
|
||||||
Events string `xorm:"TEXT"`
|
Secret string `xorm:"TEXT"`
|
||||||
*HookEvent `xorm:"-"`
|
Events string `xorm:"TEXT"`
|
||||||
IsSSL bool `xorm:"is_ssl"`
|
*HookEvent `xorm:"-"`
|
||||||
IsActive bool `xorm:"INDEX"`
|
IsSSL bool `xorm:"is_ssl"`
|
||||||
HookTaskType HookTaskType
|
IsActive bool `xorm:"INDEX"`
|
||||||
Meta string `xorm:"TEXT"` // store hook-specific attributes
|
HookTaskType HookTaskType
|
||||||
LastStatus HookStatus // Last delivery status
|
Meta string `xorm:"TEXT"` // store hook-specific attributes
|
||||||
|
LastStatus HookStatus // Last delivery status
|
||||||
|
|
||||||
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
|
||||||
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
|
||||||
@@ -401,7 +402,7 @@ func GetWebhooksByOrgID(orgID int64, listOptions ListOptions) ([]*Webhook, error
|
|||||||
func GetDefaultWebhook(id int64) (*Webhook, error) {
|
func GetDefaultWebhook(id int64) (*Webhook, error) {
|
||||||
webhook := &Webhook{ID: id}
|
webhook := &Webhook{ID: id}
|
||||||
has, err := x.
|
has, err := x.
|
||||||
Where("repo_id=? AND org_id=?", 0, 0).
|
Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, false).
|
||||||
Get(webhook)
|
Get(webhook)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -419,7 +420,33 @@ func GetDefaultWebhooks() ([]*Webhook, error) {
|
|||||||
func getDefaultWebhooks(e Engine) ([]*Webhook, error) {
|
func getDefaultWebhooks(e Engine) ([]*Webhook, error) {
|
||||||
webhooks := make([]*Webhook, 0, 5)
|
webhooks := make([]*Webhook, 0, 5)
|
||||||
return webhooks, e.
|
return webhooks, e.
|
||||||
Where("repo_id=? AND org_id=?", 0, 0).
|
Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, false).
|
||||||
|
Find(&webhooks)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSystemWebhook returns admin system webhook by given ID.
|
||||||
|
func GetSystemWebhook(id int64) (*Webhook, error) {
|
||||||
|
webhook := &Webhook{ID: id}
|
||||||
|
has, err := x.
|
||||||
|
Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, true).
|
||||||
|
Get(webhook)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
} else if !has {
|
||||||
|
return nil, ErrWebhookNotExist{id}
|
||||||
|
}
|
||||||
|
return webhook, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSystemWebhooks returns all admin system webhooks.
|
||||||
|
func GetSystemWebhooks() ([]*Webhook, error) {
|
||||||
|
return getSystemWebhooks(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSystemWebhooks(e Engine) ([]*Webhook, error) {
|
||||||
|
webhooks := make([]*Webhook, 0, 5)
|
||||||
|
return webhooks, e.
|
||||||
|
Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, true).
|
||||||
Find(&webhooks)
|
Find(&webhooks)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,8 +498,8 @@ func DeleteWebhookByOrgID(orgID, id int64) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteDefaultWebhook deletes an admin-default webhook by given ID.
|
// DeleteDefaultSystemWebhook deletes an admin-configured default or system webhook (where Org and Repo ID both 0)
|
||||||
func DeleteDefaultWebhook(id int64) error {
|
func DeleteDefaultSystemWebhook(id int64) error {
|
||||||
sess := x.NewSession()
|
sess := x.NewSession()
|
||||||
defer sess.Close()
|
defer sess.Close()
|
||||||
if err := sess.Begin(); err != nil {
|
if err := sess.Begin(); err != nil {
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ func ReplaceSanitizer() {
|
|||||||
// Allow classes for anchors
|
// Allow classes for anchors
|
||||||
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`ref-issue`)).OnElements("a")
|
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`ref-issue`)).OnElements("a")
|
||||||
|
|
||||||
|
// Allow classes for task lists
|
||||||
|
sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`task-list`)).OnElements("ul")
|
||||||
|
|
||||||
// Allow generally safe attributes
|
// Allow generally safe attributes
|
||||||
generalSafeAttrs := []string{"abbr", "accept", "accept-charset",
|
generalSafeAttrs := []string{"abbr", "accept", "accept-charset",
|
||||||
"accesskey", "action", "align", "alt",
|
"accesskey", "action", "align", "alt",
|
||||||
|
|||||||
@@ -698,7 +698,7 @@ func createCommitRepoActions(repo *models.Repository, gitRepo *git.Repository, o
|
|||||||
return nil, fmt.Errorf("Old and new revisions are both %s", git.EmptySHA)
|
return nil, fmt.Errorf("Old and new revisions are both %s", git.EmptySHA)
|
||||||
}
|
}
|
||||||
var commits = &repo_module.PushCommits{}
|
var commits = &repo_module.PushCommits{}
|
||||||
if opts.IsNewTag() {
|
if opts.IsTag() {
|
||||||
// If is tag reference
|
// If is tag reference
|
||||||
tagName := opts.TagName()
|
tagName := opts.TagName()
|
||||||
if opts.IsDelRef() {
|
if opts.IsDelRef() {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ var (
|
|||||||
VerbosePushDelay time.Duration
|
VerbosePushDelay time.Duration
|
||||||
GCArgs []string `ini:"GC_ARGS" delim:" "`
|
GCArgs []string `ini:"GC_ARGS" delim:" "`
|
||||||
EnableAutoGitWireProtocol bool
|
EnableAutoGitWireProtocol bool
|
||||||
|
PullRequestPushMessage bool
|
||||||
Timeout struct {
|
Timeout struct {
|
||||||
Default int
|
Default int
|
||||||
Migrate int
|
Migrate int
|
||||||
@@ -42,6 +43,7 @@ var (
|
|||||||
VerbosePushDelay: 5 * time.Second,
|
VerbosePushDelay: 5 * time.Second,
|
||||||
GCArgs: []string{},
|
GCArgs: []string{},
|
||||||
EnableAutoGitWireProtocol: true,
|
EnableAutoGitWireProtocol: true,
|
||||||
|
PullRequestPushMessage: true,
|
||||||
Timeout: struct {
|
Timeout: struct {
|
||||||
Default int
|
Default int
|
||||||
Migrate int
|
Migrate int
|
||||||
|
|||||||
@@ -181,6 +181,13 @@ func prepareWebhooks(repo *models.Repository, event models.HookEventType, p api.
|
|||||||
ws = append(ws, orgHooks...)
|
ws = append(ws, orgHooks...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add any admin-defined system webhooks
|
||||||
|
systemHooks, err := models.GetSystemWebhooks()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("GetSystemWebhooks: %v", err)
|
||||||
|
}
|
||||||
|
ws = append(ws, systemHooks...)
|
||||||
|
|
||||||
if len(ws) == 0 {
|
if len(ws) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -622,6 +622,7 @@ repos.issues=Задачи
|
|||||||
repos.size=Големина
|
repos.size=Големина
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Име
|
auths.name=Име
|
||||||
auths.type=Тип
|
auths.type=Тип
|
||||||
auths.enabled=Активно
|
auths.enabled=Активно
|
||||||
|
|||||||
@@ -1820,6 +1820,7 @@ hooks.desc=Webové háčky automaticky vytvářejí HTTP POST dotazy na server p
|
|||||||
hooks.add_webhook=Přidat výchozí webový háček
|
hooks.add_webhook=Přidat výchozí webový háček
|
||||||
hooks.update_webhook=Aktualizovat výchozí webový háček
|
hooks.update_webhook=Aktualizovat výchozí webový háček
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Správa zdroje ověřování
|
auths.auth_manage_panel=Správa zdroje ověřování
|
||||||
auths.new=Přidat zdroj ověřování
|
auths.new=Přidat zdroj ověřování
|
||||||
auths.name=Název
|
auths.name=Název
|
||||||
|
|||||||
@@ -1837,6 +1837,7 @@ hooks.desc=Webhooks stellen automatisch HTTP POST-Anfragen an einen Server, wenn
|
|||||||
hooks.add_webhook=Standard-Webhook hinzufügen
|
hooks.add_webhook=Standard-Webhook hinzufügen
|
||||||
hooks.update_webhook=Standard-Webhook aktualisieren
|
hooks.update_webhook=Standard-Webhook aktualisieren
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Authentifikationsquellen verwalten
|
auths.auth_manage_panel=Authentifikationsquellen verwalten
|
||||||
auths.new=Authentifizierungsquelle hinzufügen
|
auths.new=Authentifizierungsquelle hinzufügen
|
||||||
auths.name=Name
|
auths.name=Name
|
||||||
|
|||||||
@@ -1753,6 +1753,7 @@ users = User Accounts
|
|||||||
organizations = Organizations
|
organizations = Organizations
|
||||||
repositories = Repositories
|
repositories = Repositories
|
||||||
hooks = Default Webhooks
|
hooks = Default Webhooks
|
||||||
|
systemhooks = System Webhooks
|
||||||
authentication = Authentication Sources
|
authentication = Authentication Sources
|
||||||
emails = User Emails
|
emails = User Emails
|
||||||
config = Configuration
|
config = Configuration
|
||||||
@@ -1889,6 +1890,10 @@ hooks.desc = Webhooks automatically make HTTP POST requests to a server when cer
|
|||||||
hooks.add_webhook = Add Default Webhook
|
hooks.add_webhook = Add Default Webhook
|
||||||
hooks.update_webhook = Update Default Webhook
|
hooks.update_webhook = Update Default Webhook
|
||||||
|
|
||||||
|
systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined will act on all repositories on the system, so please consider any performance implications this may have. Read more in the <a target="_blank" rel="noopener" href="https://docs.gitea.io/en-us/webhooks/">webhooks guide</a>.
|
||||||
|
systemhooks.add_webhook = Add System Webhook
|
||||||
|
systemhooks.update_webhook = Update System Webhook
|
||||||
|
|
||||||
auths.auth_manage_panel = Authentication Source Management
|
auths.auth_manage_panel = Authentication Source Management
|
||||||
auths.new = Add Authentication Source
|
auths.new = Add Authentication Source
|
||||||
auths.name = Name
|
auths.name = Name
|
||||||
|
|||||||
@@ -1826,6 +1826,7 @@ hooks.desc=Los Webhooks automáticamente hacen peticiones HTTP POST a un servido
|
|||||||
hooks.add_webhook=Añadir Webhook por defecto
|
hooks.add_webhook=Añadir Webhook por defecto
|
||||||
hooks.update_webhook=Actualizar Webhook por defecto
|
hooks.update_webhook=Actualizar Webhook por defecto
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Gestión de origen de autenticación
|
auths.auth_manage_panel=Gestión de origen de autenticación
|
||||||
auths.new=Añadir origen de autenticación
|
auths.new=Añadir origen de autenticación
|
||||||
auths.name=Nombre
|
auths.name=Nombre
|
||||||
|
|||||||
@@ -1789,6 +1789,7 @@ hooks.desc=هوک تحت وب به صورت خودکار درخواست POST HTT
|
|||||||
hooks.add_webhook=افزودن هوک تحت وب پیش فرض
|
hooks.add_webhook=افزودن هوک تحت وب پیش فرض
|
||||||
hooks.update_webhook=به روز رسانی هوک تحت وب پیش فرض
|
hooks.update_webhook=به روز رسانی هوک تحت وب پیش فرض
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=مدیریت منابع احراز هویت
|
auths.auth_manage_panel=مدیریت منابع احراز هویت
|
||||||
auths.new=افزودن منبع احراز هویت
|
auths.new=افزودن منبع احراز هویت
|
||||||
auths.name=نام
|
auths.name=نام
|
||||||
|
|||||||
@@ -680,6 +680,7 @@ repos.issues=Ongelmat
|
|||||||
repos.size=Koko
|
repos.size=Koko
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Nimi
|
auths.name=Nimi
|
||||||
auths.type=Tyyppi
|
auths.type=Tyyppi
|
||||||
auths.enabled=Käytössä
|
auths.enabled=Käytössä
|
||||||
|
|||||||
@@ -1784,6 +1784,7 @@ hooks.desc=Les Webhooks font automatiquement une requête HTTP POST à un serveu
|
|||||||
hooks.add_webhook=Ajouter un Webhook par défaut
|
hooks.add_webhook=Ajouter un Webhook par défaut
|
||||||
hooks.update_webhook=Modifier un Webhook par défaut
|
hooks.update_webhook=Modifier un Webhook par défaut
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Gestion des sources d'authentification
|
auths.auth_manage_panel=Gestion des sources d'authentification
|
||||||
auths.new=Ajouter une source d'authentification
|
auths.new=Ajouter une source d'authentification
|
||||||
auths.name=Nom
|
auths.name=Nom
|
||||||
|
|||||||
@@ -778,6 +778,7 @@ repos.issues=Hibajegyek
|
|||||||
repos.size=Méret
|
repos.size=Méret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Név
|
auths.name=Név
|
||||||
auths.type=Típus
|
auths.type=Típus
|
||||||
auths.enabled=Engedélyezett
|
auths.enabled=Engedélyezett
|
||||||
|
|||||||
@@ -936,6 +936,7 @@ repos.issues=Masalah
|
|||||||
repos.size=Ukuran
|
repos.size=Ukuran
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Nama
|
auths.name=Nama
|
||||||
auths.type=Jenis
|
auths.type=Jenis
|
||||||
auths.enabled=Aktif
|
auths.enabled=Aktif
|
||||||
|
|||||||
@@ -1312,6 +1312,7 @@ repos.issues=Problemi
|
|||||||
repos.size=Dimensione
|
repos.size=Dimensione
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Gestione fonti di autenticazione
|
auths.auth_manage_panel=Gestione fonti di autenticazione
|
||||||
auths.new=Aggiungi fonte di autenticazione
|
auths.new=Aggiungi fonte di autenticazione
|
||||||
auths.name=Nome
|
auths.name=Nome
|
||||||
|
|||||||
@@ -439,7 +439,11 @@ manage_openid=OpenIDアドレスの管理
|
|||||||
email_desc=あなたのプライマリー・メールアドレスは、通知やその他の操作に使用されます。
|
email_desc=あなたのプライマリー・メールアドレスは、通知やその他の操作に使用されます。
|
||||||
theme_desc=この設定がサイト全体のデフォルトのテーマとなります。
|
theme_desc=この設定がサイト全体のデフォルトのテーマとなります。
|
||||||
primary=プライマリー
|
primary=プライマリー
|
||||||
|
activated=アクティベート済み
|
||||||
|
requires_activation=アクティベーションが必要
|
||||||
primary_email=プライマリーにする
|
primary_email=プライマリーにする
|
||||||
|
activate_email=アクティベーションを送信
|
||||||
|
activations_pending=アクティベーション待ち
|
||||||
delete_email=削除
|
delete_email=削除
|
||||||
email_deletion=メールアドレスの削除
|
email_deletion=メールアドレスの削除
|
||||||
email_deletion_desc=メールアドレスと関連する情報はアカウントから削除されます。 このメールアドレスを使ったGitのコミットはそのまま残ります。 続行しますか?
|
email_deletion_desc=メールアドレスと関連する情報はアカウントから削除されます。 このメールアドレスを使ったGitのコミットはそのまま残ります。 続行しますか?
|
||||||
@@ -808,6 +812,8 @@ commits.date=日付
|
|||||||
commits.older=古い
|
commits.older=古い
|
||||||
commits.newer=新しい
|
commits.newer=新しい
|
||||||
commits.signed_by=署名者
|
commits.signed_by=署名者
|
||||||
|
commits.signed_by_untrusted_user=部外の署名者
|
||||||
|
commits.signed_by_untrusted_user_unmatched=コミッターと一致しない部外の署名者
|
||||||
commits.gpg_key_id=GPGキーID
|
commits.gpg_key_id=GPGキーID
|
||||||
|
|
||||||
ext_issues=外部課題
|
ext_issues=外部課題
|
||||||
@@ -937,6 +943,8 @@ issues.label_deletion_desc=ラベルを削除すると、そのラベルはす
|
|||||||
issues.label_deletion_success=ラベルを削除しました。
|
issues.label_deletion_success=ラベルを削除しました。
|
||||||
issues.label.filter_sort.alphabetically=アルファベット順
|
issues.label.filter_sort.alphabetically=アルファベット順
|
||||||
issues.label.filter_sort.reverse_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.num_participants=%d 人の参加者
|
||||||
issues.attachment.open_tab=`クリックして新しいタブで "%s" を見る`
|
issues.attachment.open_tab=`クリックして新しいタブで "%s" を見る`
|
||||||
issues.attachment.download=`クリックして "%s" をダウンロード`
|
issues.attachment.download=`クリックして "%s" をダウンロード`
|
||||||
@@ -1071,8 +1079,12 @@ pulls.blocked_by_rejection=このプルリクエストは公式レビューア
|
|||||||
pulls.can_auto_merge_desc=このプルリクエストは自動的にマージできます。
|
pulls.can_auto_merge_desc=このプルリクエストは自動的にマージできます。
|
||||||
pulls.cannot_auto_merge_desc=コンフリクトが存在するため、このプルリクエストは自動的にマージできません。
|
pulls.cannot_auto_merge_desc=コンフリクトが存在するため、このプルリクエストは自動的にマージできません。
|
||||||
pulls.cannot_auto_merge_helper=コンフリクトを解消するため手動でマージしてください。
|
pulls.cannot_auto_merge_helper=コンフリクトを解消するため手動でマージしてください。
|
||||||
pulls.num_conflicting_files_1=%dファイルがコンフリクト
|
pulls.num_conflicting_files_1=コンフリクトファイル %d
|
||||||
pulls.num_conflicting_files_n=%dファイルがコンフリクト
|
pulls.num_conflicting_files_n=%dファイルがコンフリクト
|
||||||
|
pulls.approve_count_1=承認 %d
|
||||||
|
pulls.approve_count_n=承認 %d
|
||||||
|
pulls.reject_count_1=変更要請 %d
|
||||||
|
pulls.reject_count_n=変更要請 %d
|
||||||
|
|
||||||
pulls.no_merge_desc=リポジトリのマージオプションがすべて無効になっているため、このプルリクエストをマージすることはできせん。
|
pulls.no_merge_desc=リポジトリのマージオプションがすべて無効になっているため、このプルリクエストをマージすることはできせん。
|
||||||
pulls.no_merge_helper=リポジトリ設定でマージを有効にするか、手動でマージしてください。
|
pulls.no_merge_helper=リポジトリ設定でマージを有効にするか、手動でマージしてください。
|
||||||
@@ -1367,20 +1379,45 @@ settings.event_desc=トリガー:
|
|||||||
settings.event_push_only=プッシュのイベント
|
settings.event_push_only=プッシュのイベント
|
||||||
settings.event_send_everything=すべてのイベント
|
settings.event_send_everything=すべてのイベント
|
||||||
settings.event_choose=イベントを指定…
|
settings.event_choose=イベントを指定…
|
||||||
|
settings.event_header_repository=リポジトリのイベント
|
||||||
settings.event_create=作成
|
settings.event_create=作成
|
||||||
settings.event_create_desc=ブランチやタグが作成されたとき。
|
settings.event_create_desc=ブランチやタグが作成されたとき。
|
||||||
settings.event_delete=削除
|
settings.event_delete=削除
|
||||||
|
settings.event_delete_desc=ブランチやタグが削除されたとき。
|
||||||
settings.event_fork=フォーク
|
settings.event_fork=フォーク
|
||||||
|
settings.event_fork_desc=リポジトリがフォークされたとき。
|
||||||
settings.event_release=リリース
|
settings.event_release=リリース
|
||||||
settings.event_release_desc=リポジトリでリリースが作成・更新・削除されたとき。
|
settings.event_release_desc=リポジトリでリリースが作成・更新・削除されたとき。
|
||||||
settings.event_push=プッシュ
|
settings.event_push=プッシュ
|
||||||
settings.event_push_desc=Gitがリポジトリにプッシュを行ったとき。
|
settings.event_push_desc=Gitがリポジトリにプッシュを行ったとき。
|
||||||
settings.event_repository=リポジトリ
|
settings.event_repository=リポジトリ
|
||||||
settings.event_repository_desc=リポジトリが作成または削除されたとき。
|
settings.event_repository_desc=リポジトリが作成・削除されたとき。
|
||||||
|
settings.event_header_issue=課題のイベント
|
||||||
settings.event_issues=課題
|
settings.event_issues=課題
|
||||||
|
settings.event_issues_desc=課題がオープン・クローズ・再オープン・編集されたとき。
|
||||||
|
settings.event_issue_assign=課題のアサイン
|
||||||
|
settings.event_issue_assign_desc=課題の担当者が割り当てられたとき、解除されたとき。
|
||||||
|
settings.event_issue_label=課題のラベル
|
||||||
|
settings.event_issue_label_desc=課題のラベルが更新・クリアされたとき。
|
||||||
|
settings.event_issue_milestone=課題のマイルストーン
|
||||||
|
settings.event_issue_milestone_desc=課題のマイルストーンが設定・解除されたとき。
|
||||||
settings.event_issue_comment=課題へのコメント
|
settings.event_issue_comment=課題へのコメント
|
||||||
settings.event_issue_comment_desc=課題へのコメントが作成・編集・削除されたとき。
|
settings.event_issue_comment_desc=課題へのコメントが作成・編集・削除されたとき。
|
||||||
|
settings.event_header_pull_request=プルリクエストのイベント
|
||||||
settings.event_pull_request=プルリクエスト
|
settings.event_pull_request=プルリクエスト
|
||||||
|
settings.event_pull_request_desc=プルリクエストがオープン・クローズ・再オープン・編集されたとき。
|
||||||
|
settings.event_pull_request_assign=プルリクエストのアサイン
|
||||||
|
settings.event_pull_request_assign_desc=プルリクエストの担当者が割り当て・解除されたとき。
|
||||||
|
settings.event_pull_request_label=プルリクエストのラベル
|
||||||
|
settings.event_pull_request_label_desc=プルリクエストのラベルが更新・クリアされたとき。
|
||||||
|
settings.event_pull_request_milestone=プルリクエストのマイルストーン
|
||||||
|
settings.event_pull_request_milestone_desc=プルリクエストのマイルストーンが設定・解除されたとき。
|
||||||
|
settings.event_pull_request_comment=プルリクエストへのコメント
|
||||||
|
settings.event_pull_request_comment_desc=プルリクエストへのコメントが作成・編集・削除されたとき。
|
||||||
|
settings.event_pull_request_review=プルリクエストのレビュー
|
||||||
|
settings.event_pull_request_review_desc=プルリクエストの承認・拒否、またはレビューコメントが付いたとき。
|
||||||
|
settings.event_pull_request_sync=プルリクエストの同期
|
||||||
|
settings.event_pull_request_sync_desc=プルリクエストが同期されたとき。
|
||||||
settings.branch_filter=ブランチ フィルター
|
settings.branch_filter=ブランチ フィルター
|
||||||
settings.branch_filter_desc=プッシュ、ブランチ作成、ブランチ削除のイベントを通知するブランチを、globパターンで指定するホワイトリストです。 空か<code>*</code>のときは、すべてのブランチのイベントを通知します。 文法は <a href="https://godoc.org/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> を参照してください。 例: <code>master</code> 、 <code>{master,release*}</code>
|
settings.branch_filter_desc=プッシュ、ブランチ作成、ブランチ削除のイベントを通知するブランチを、globパターンで指定するホワイトリストです。 空か<code>*</code>のときは、すべてのブランチのイベントを通知します。 文法は <a href="https://godoc.org/github.com/gobwas/glob#Compile">github.com/gobwas/glob</a> を参照してください。 例: <code>master</code> 、 <code>{master,release*}</code>
|
||||||
settings.active=有効
|
settings.active=有効
|
||||||
@@ -1716,6 +1753,7 @@ organizations=組織
|
|||||||
repositories=リポジトリ
|
repositories=リポジトリ
|
||||||
hooks=デフォルトのWebhooks
|
hooks=デフォルトのWebhooks
|
||||||
authentication=認証ソース
|
authentication=認証ソース
|
||||||
|
emails=ユーザーメールアドレス
|
||||||
config=設定
|
config=設定
|
||||||
notices=システム通知
|
notices=システム通知
|
||||||
monitor=モニタリング
|
monitor=モニタリング
|
||||||
@@ -1785,6 +1823,7 @@ dashboard.gc_times=GC実行回数
|
|||||||
users.user_manage_panel=ユーザーアカウント管理
|
users.user_manage_panel=ユーザーアカウント管理
|
||||||
users.new_account=ユーザーアカウントを作成
|
users.new_account=ユーザーアカウントを作成
|
||||||
users.name=ユーザー名
|
users.name=ユーザー名
|
||||||
|
users.full_name=フルネーム
|
||||||
users.activated=アクティベート済み
|
users.activated=アクティベート済み
|
||||||
users.admin=管理者
|
users.admin=管理者
|
||||||
users.restricted=制限あり
|
users.restricted=制限あり
|
||||||
@@ -1816,6 +1855,18 @@ users.still_own_repo=このユーザーはまだ1つ以上のリポジトリを
|
|||||||
users.still_has_org=このユーザーは組織のメンバーになっています。 先に組織からこのユーザーを削除してください。
|
users.still_has_org=このユーザーは組織のメンバーになっています。 先に組織からこのユーザーを削除してください。
|
||||||
users.deletion_success=ユーザーアカウントを削除しました。
|
users.deletion_success=ユーザーアカウントを削除しました。
|
||||||
|
|
||||||
|
emails.email_manage_panel=ユーザーメールアドレスの管理
|
||||||
|
emails.primary=プライマリー
|
||||||
|
emails.activated=アクティベート済み
|
||||||
|
emails.filter_sort.email=メールアドレス
|
||||||
|
emails.filter_sort.email_reverse=メールアドレス (逆順)
|
||||||
|
emails.filter_sort.name=ユーザー名
|
||||||
|
emails.filter_sort.name_reverse=ユーザー名 (逆順)
|
||||||
|
emails.updated=メール設定を更新しました
|
||||||
|
emails.not_updated=メール設定の更新に失敗しました: %v
|
||||||
|
emails.duplicate_active=メールアドレスは別のユーザーが既に使用中です。
|
||||||
|
emails.change_email_header=メール設定の更新
|
||||||
|
emails.change_email_text=このメールアドレスを設定してよろしいですか?
|
||||||
|
|
||||||
orgs.org_manage_panel=組織の管理
|
orgs.org_manage_panel=組織の管理
|
||||||
orgs.name=名称
|
orgs.name=名称
|
||||||
@@ -1837,6 +1888,7 @@ hooks.desc=Webhookは特定のGiteaイベントトリガーが発生した際、
|
|||||||
hooks.add_webhook=デフォルトのWebhookを追加
|
hooks.add_webhook=デフォルトのWebhookを追加
|
||||||
hooks.update_webhook=デフォルトのWebhookを更新
|
hooks.update_webhook=デフォルトのWebhookを更新
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=認証ソースの管理
|
auths.auth_manage_panel=認証ソースの管理
|
||||||
auths.new=認証ソースを追加
|
auths.new=認証ソースを追加
|
||||||
auths.name=名称
|
auths.name=名称
|
||||||
@@ -1867,6 +1919,8 @@ auths.use_paged_search=ページ化検索を使用
|
|||||||
auths.search_page_size=ページサイズ
|
auths.search_page_size=ページサイズ
|
||||||
auths.filter=Userフィルター
|
auths.filter=Userフィルター
|
||||||
auths.admin_filter=Adminフィルター
|
auths.admin_filter=Adminフィルター
|
||||||
|
auths.restricted_filter=制限付きフィルター
|
||||||
|
auths.restricted_filter_helper=どのユーザーも制限付きにしない場合は空にしてください。 アスタリスク('*')を指定すると、Adminフィルターにマッチしないユーザーはすべて制限付きとなります。
|
||||||
auths.ms_ad_sa=MS AD 検索属性
|
auths.ms_ad_sa=MS AD 検索属性
|
||||||
auths.smtp_auth=SMTP認証タイプ
|
auths.smtp_auth=SMTP認証タイプ
|
||||||
auths.smtphost=SMTPホスト
|
auths.smtphost=SMTPホスト
|
||||||
@@ -1901,6 +1955,7 @@ auths.tips.oauth2.general=OAuth2認証
|
|||||||
auths.tips.oauth2.general.tip=新しいOAuth2認証を登録する際、コールバック/リダイレクトURLは以下の通りにしてください: <ホスト>/user/oauth2/<認証名>/callback
|
auths.tips.oauth2.general.tip=新しいOAuth2認証を登録する際、コールバック/リダイレクトURLは以下の通りにしてください: <ホスト>/user/oauth2/<認証名>/callback
|
||||||
auths.tip.oauth2_provider=OAuth2プロバイダー
|
auths.tip.oauth2_provider=OAuth2プロバイダー
|
||||||
auths.tip.bitbucket=新しいOAuthコンシューマーを https://bitbucket.org/account/user/<あなたのユーザー名>/oauth-consumers/new から登録し、"アカウント" に "読み取り" 権限を追加してください。
|
auths.tip.bitbucket=新しいOAuthコンシューマーを https://bitbucket.org/account/user/<あなたのユーザー名>/oauth-consumers/new から登録し、"アカウント" に "読み取り" 権限を追加してください。
|
||||||
|
auths.tip.nextcloud=新しいOAuthコンシューマーを、インスタンスのメニュー "Settings -> Security -> OAuth 2.0 client" から登録してください。
|
||||||
auths.tip.dropbox=新しいアプリケーションを https://www.dropbox.com/developers/apps から登録してください。
|
auths.tip.dropbox=新しいアプリケーションを https://www.dropbox.com/developers/apps から登録してください。
|
||||||
auths.tip.facebook=新しいアプリケーションを https://developers.facebook.com/apps で登録し、"Facebook Login"を追加してください。
|
auths.tip.facebook=新しいアプリケーションを https://developers.facebook.com/apps で登録し、"Facebook Login"を追加してください。
|
||||||
auths.tip.github=新しいOAuthアプリケーションを https://github.com/settings/applications/new から登録してください。
|
auths.tip.github=新しいOAuthアプリケーションを https://github.com/settings/applications/new から登録してください。
|
||||||
@@ -1910,6 +1965,7 @@ auths.tip.openid_connect=OpenID Connect DiscoveryのURL (<server>/.well-known/op
|
|||||||
auths.tip.twitter=https://dev.twitter.com/apps へアクセスしてアプリケーションを作成し、“Allow this application to be used to Sign in with Twitter”オプションを有効にしてください。
|
auths.tip.twitter=https://dev.twitter.com/apps へアクセスしてアプリケーションを作成し、“Allow this application to be used to Sign in with Twitter”オプションを有効にしてください。
|
||||||
auths.tip.discord=新しいアプリケーションを https://discordapp.com/developers/applications/me から登録してください。
|
auths.tip.discord=新しいアプリケーションを https://discordapp.com/developers/applications/me から登録してください。
|
||||||
auths.tip.gitea=新しいOAuthアプリケーションを登録してください。 利用ガイドは https://docs.gitea.io/en-us/oauth2-provider/
|
auths.tip.gitea=新しいOAuthアプリケーションを登録してください。 利用ガイドは https://docs.gitea.io/en-us/oauth2-provider/
|
||||||
|
auths.tip.yandex=https://oauth.yandex.com/client/new で新しいアプリケーションを作成してください。 "Yandex.Passport API" セクションで次の項目を許可します: "Access to email address"、"Access to user avatar"、"Access to username, first name and surname, gender"
|
||||||
auths.edit=認証ソースの編集
|
auths.edit=認証ソースの編集
|
||||||
auths.activated=認証ソースはアクティベート済み
|
auths.activated=認証ソースはアクティベート済み
|
||||||
auths.new_success=新しい認証 '%s' を追加しました。
|
auths.new_success=新しい認証 '%s' を追加しました。
|
||||||
|
|||||||
@@ -1340,6 +1340,7 @@ repos.issues=이슈
|
|||||||
repos.size=크기
|
repos.size=크기
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=인증 소스 관리
|
auths.auth_manage_panel=인증 소스 관리
|
||||||
auths.new=인증 소스 추가
|
auths.new=인증 소스 추가
|
||||||
auths.name=이름
|
auths.name=이름
|
||||||
|
|||||||
@@ -1830,6 +1830,7 @@ hooks.desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem not
|
|||||||
hooks.add_webhook=Pievienot noklusēto tīmekļa āķi
|
hooks.add_webhook=Pievienot noklusēto tīmekļa āķi
|
||||||
hooks.update_webhook=Mainīt noklusēto tīmekļa āķi
|
hooks.update_webhook=Mainīt noklusēto tīmekļa āķi
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Autentifikācijas avotu pārvaldība
|
auths.auth_manage_panel=Autentifikācijas avotu pārvaldība
|
||||||
auths.new=Pievienot autentifikācijas avotu
|
auths.new=Pievienot autentifikācijas avotu
|
||||||
auths.name=Nosaukums
|
auths.name=Nosaukums
|
||||||
|
|||||||
@@ -794,6 +794,7 @@ repos.issues=ഇഷ്യൂകള്
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[action]
|
[action]
|
||||||
|
|
||||||
|
|||||||
@@ -1243,6 +1243,7 @@ repos.issues=Kwesties
|
|||||||
repos.size=Grootte
|
repos.size=Grootte
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Naam
|
auths.name=Naam
|
||||||
auths.type=Type
|
auths.type=Type
|
||||||
auths.enabled=Ingeschakeld
|
auths.enabled=Ingeschakeld
|
||||||
|
|||||||
@@ -1790,6 +1790,7 @@ hooks.desc=Webhooki automatycznie tworzą zapytania HTTP POST do serwera, kiedy
|
|||||||
hooks.add_webhook=Dodaj domyślny Webhook
|
hooks.add_webhook=Dodaj domyślny Webhook
|
||||||
hooks.update_webhook=Zaktualizuj domyślny Webhook
|
hooks.update_webhook=Zaktualizuj domyślny Webhook
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Zarządzanie źródłami uwierzytelniania
|
auths.auth_manage_panel=Zarządzanie źródłami uwierzytelniania
|
||||||
auths.new=Dodaj źródło uwierzytelniania
|
auths.new=Dodaj źródło uwierzytelniania
|
||||||
auths.name=Nazwa
|
auths.name=Nazwa
|
||||||
|
|||||||
@@ -1837,6 +1837,7 @@ hooks.desc=Os webhooks fazem solicitações HTTP POST automaticamente para um se
|
|||||||
hooks.add_webhook=Adicionar Webhook padrão
|
hooks.add_webhook=Adicionar Webhook padrão
|
||||||
hooks.update_webhook=Atualizar Webhook padrão
|
hooks.update_webhook=Atualizar Webhook padrão
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Gerenciamento de fonte de autenticação
|
auths.auth_manage_panel=Gerenciamento de fonte de autenticação
|
||||||
auths.new=Adicionar fonte de autenticação
|
auths.new=Adicionar fonte de autenticação
|
||||||
auths.name=Nome
|
auths.name=Nome
|
||||||
|
|||||||
@@ -1701,6 +1701,7 @@ repos.size=Размер
|
|||||||
hooks.add_webhook=Добавить стандартный Веб-хук
|
hooks.add_webhook=Добавить стандартный Веб-хук
|
||||||
hooks.update_webhook=Обновить стандартный Веб-хук
|
hooks.update_webhook=Обновить стандартный Веб-хук
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Управление аутентификацией
|
auths.auth_manage_panel=Управление аутентификацией
|
||||||
auths.new=Добавить новый источник
|
auths.new=Добавить новый источник
|
||||||
auths.name=Имя
|
auths.name=Имя
|
||||||
|
|||||||
@@ -556,6 +556,7 @@ repos.stars=Фаворити
|
|||||||
repos.issues=Задаци
|
repos.issues=Задаци
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=Име
|
auths.name=Име
|
||||||
auths.type=Тип
|
auths.type=Тип
|
||||||
auths.enabled=Омогућено
|
auths.enabled=Омогућено
|
||||||
|
|||||||
@@ -1348,6 +1348,7 @@ repos.issues=Ärenden
|
|||||||
repos.size=Storlek
|
repos.size=Storlek
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Hantering av autentiseringkälla
|
auths.auth_manage_panel=Hantering av autentiseringkälla
|
||||||
auths.new=Lägg till autensieringskälla
|
auths.new=Lägg till autensieringskälla
|
||||||
auths.name=Namn
|
auths.name=Namn
|
||||||
|
|||||||
@@ -1800,6 +1800,7 @@ hooks.desc=Web İstemcileri, belirli Gitea olayları tetiklendiğinde otomatik o
|
|||||||
hooks.add_webhook=Varsayılan Web İstemcisi Ekle
|
hooks.add_webhook=Varsayılan Web İstemcisi Ekle
|
||||||
hooks.update_webhook=Varsayılan Web İstemcisini Güncelle
|
hooks.update_webhook=Varsayılan Web İstemcisini Güncelle
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Kimlik Doğrulama Kaynak Yönetimi
|
auths.auth_manage_panel=Kimlik Doğrulama Kaynak Yönetimi
|
||||||
auths.new=Kimlik Doğrulama Kaynağı Ekle
|
auths.new=Kimlik Doğrulama Kaynağı Ekle
|
||||||
auths.name=İsim
|
auths.name=İsim
|
||||||
|
|||||||
@@ -1785,6 +1785,7 @@ hooks.desc=Веб-хуки автоматично створюють HTTP POST-
|
|||||||
hooks.add_webhook=Додати типовий веб-хук
|
hooks.add_webhook=Додати типовий веб-хук
|
||||||
hooks.update_webhook=Змінити типовий веб-хук
|
hooks.update_webhook=Змінити типовий веб-хук
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=Керування джерелом автентифікації
|
auths.auth_manage_panel=Керування джерелом автентифікації
|
||||||
auths.new=Додати джерело автентифікації
|
auths.new=Додати джерело автентифікації
|
||||||
auths.name=Ім'я
|
auths.name=Ім'я
|
||||||
|
|||||||
@@ -1830,6 +1830,7 @@ hooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发
|
|||||||
hooks.add_webhook=新增默认Web钩子
|
hooks.add_webhook=新增默认Web钩子
|
||||||
hooks.update_webhook=更新默认Web钩子
|
hooks.update_webhook=更新默认Web钩子
|
||||||
|
|
||||||
|
|
||||||
auths.auth_manage_panel=认证源管理
|
auths.auth_manage_panel=认证源管理
|
||||||
auths.new=添加认证源
|
auths.new=添加认证源
|
||||||
auths.name=名称
|
auths.name=名称
|
||||||
|
|||||||
@@ -663,6 +663,7 @@ repos.issues=問題數
|
|||||||
repos.size=大小
|
repos.size=大小
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.name=認證名稱
|
auths.name=認證名稱
|
||||||
auths.type=認證類型
|
auths.type=認證類型
|
||||||
auths.enabled=已啟用
|
auths.enabled=已啟用
|
||||||
|
|||||||
@@ -1148,6 +1148,7 @@ repos.issues=問題數
|
|||||||
repos.size=由小到大
|
repos.size=由小到大
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auths.new=新增認證來源
|
auths.new=新增認證來源
|
||||||
auths.name=認證名稱
|
auths.name=認證名稱
|
||||||
auths.type=認證類型
|
auths.type=認證類型
|
||||||
|
|||||||
156
package-lock.json
generated
156
package-lock.json
generated
@@ -3028,6 +3028,136 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"copy-webpack-plugin": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-P15M5ZC8dyCjQHWwd4Ia/dm0SgVvZJMYeykVIVYXbGyqO4dWB5oyPHp9i7wjwo5LhtlhKbiBCdS2NvM07Wlybg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"cacache": "^12.0.3",
|
||||||
|
"find-cache-dir": "^2.1.0",
|
||||||
|
"glob-parent": "^3.1.0",
|
||||||
|
"globby": "^7.1.1",
|
||||||
|
"is-glob": "^4.0.1",
|
||||||
|
"loader-utils": "^1.2.3",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"normalize-path": "^3.0.0",
|
||||||
|
"p-limit": "^2.2.1",
|
||||||
|
"schema-utils": "^1.0.0",
|
||||||
|
"serialize-javascript": "^2.1.2",
|
||||||
|
"webpack-log": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"cacache": {
|
||||||
|
"version": "12.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz",
|
||||||
|
"integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"bluebird": "^3.5.5",
|
||||||
|
"chownr": "^1.1.1",
|
||||||
|
"figgy-pudding": "^3.5.1",
|
||||||
|
"glob": "^7.1.4",
|
||||||
|
"graceful-fs": "^4.1.15",
|
||||||
|
"infer-owner": "^1.0.3",
|
||||||
|
"lru-cache": "^5.1.1",
|
||||||
|
"mississippi": "^3.0.0",
|
||||||
|
"mkdirp": "^0.5.1",
|
||||||
|
"move-concurrently": "^1.0.1",
|
||||||
|
"promise-inflight": "^1.0.1",
|
||||||
|
"rimraf": "^2.6.3",
|
||||||
|
"ssri": "^6.0.1",
|
||||||
|
"unique-filename": "^1.1.1",
|
||||||
|
"y18n": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dir-glob": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-type": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"globby": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz",
|
||||||
|
"integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"array-union": "^1.0.1",
|
||||||
|
"dir-glob": "^2.0.0",
|
||||||
|
"glob": "^7.1.2",
|
||||||
|
"ignore": "^3.3.5",
|
||||||
|
"pify": "^3.0.0",
|
||||||
|
"slash": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ignore": {
|
||||||
|
"version": "3.3.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz",
|
||||||
|
"integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"lru-cache": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"yallist": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-type": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"pify": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema-utils": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ajv": "^6.1.0",
|
||||||
|
"ajv-errors": "^1.0.0",
|
||||||
|
"ajv-keywords": "^3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"slash": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ssri": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"figgy-pudding": "^3.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y18n": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"yallist": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"core-js": {
|
"core-js": {
|
||||||
"version": "3.6.4",
|
"version": "3.6.4",
|
||||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz",
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz",
|
||||||
@@ -3797,6 +3927,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dropzone": {
|
||||||
|
"version": "5.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/dropzone/-/dropzone-5.7.0.tgz",
|
||||||
|
"integrity": "sha512-kOltiZXH5cO/72I22JjE+w6BoT6uaVLfWdFMsi1PMKFkU6BZWpqRwjnsRm0o6ANGTBuZar5Piu7m/CbKqRPiYg=="
|
||||||
|
},
|
||||||
"duplexer2": {
|
"duplexer2": {
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz",
|
||||||
@@ -14948,8 +15083,7 @@
|
|||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "3.4.0",
|
"version": "3.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"v-tooltip": {
|
"v-tooltip": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
@@ -15636,6 +15770,24 @@
|
|||||||
"integrity": "sha512-6TDa56V/xSOw6CBVlhFm6J+xXY2oJzx7CEgH0dmex2Xe1rwb95KkLl3rXvSNpO4wyahwD3YnYqffDNR0LH1BNQ==",
|
"integrity": "sha512-6TDa56V/xSOw6CBVlhFm6J+xXY2oJzx7CEgH0dmex2Xe1rwb95KkLl3rXvSNpO4wyahwD3YnYqffDNR0LH1BNQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"webpack-log": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-colors": "^3.0.0",
|
||||||
|
"uuid": "^3.3.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-colors": {
|
||||||
|
"version": "3.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
|
||||||
|
"integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"webpack-sources": {
|
"webpack-sources": {
|
||||||
"version": "1.4.3",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@primer/octicons": "9.4.0",
|
"@primer/octicons": "9.4.0",
|
||||||
"clipboard": "2.0.4",
|
"clipboard": "2.0.4",
|
||||||
|
"dropzone": "5.7.0",
|
||||||
"fomantic-ui": "2.8.4",
|
"fomantic-ui": "2.8.4",
|
||||||
"highlight.js": "9.18.1",
|
"highlight.js": "9.18.1",
|
||||||
"jquery": "3.4.1",
|
"jquery": "3.4.1",
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
"@babel/preset-env": "7.8.4",
|
"@babel/preset-env": "7.8.4",
|
||||||
"@babel/runtime": "7.8.4",
|
"@babel/runtime": "7.8.4",
|
||||||
"babel-loader": "8.0.6",
|
"babel-loader": "8.0.6",
|
||||||
|
"copy-webpack-plugin": "5.1.1",
|
||||||
"core-js": "3.6.4",
|
"core-js": "3.6.4",
|
||||||
"css-loader": "3.4.2",
|
"css-loader": "3.4.2",
|
||||||
"cssnano": "4.1.10",
|
"cssnano": "4.1.10",
|
||||||
|
|||||||
6
public/vendor/librejs.html
vendored
6
public/vendor/librejs.html
vendored
@@ -61,9 +61,9 @@
|
|||||||
<td><a href="https://github.com/Ranks/emojify.js/archive/1.1.0.tar.gz">emojify-1.1.0.tar.gz</a></td>
|
<td><a href="https://github.com/Ranks/emojify.js/archive/1.1.0.tar.gz">emojify-1.1.0.tar.gz</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./plugins/dropzone/dropzone.js">dropzone.js</a></td>
|
<td><a href="./js/dropzone.js">dropzone.js</a></td>
|
||||||
<td><a href="https://github.com/enyo/dropzone/blob/master/LICENSE">Expat</a></td>
|
<td><a href="https://github.com/enyo/dropzone/blob/master/LICENSE">MIT</a></td>
|
||||||
<td><a href="https://github.com/enyo/dropzone/archive/v4.2.0.tar.gz">dropzone.js-4.2.0.tar.gz</a></td>
|
<td><a href="https://github.com/enyo/dropzone/archive/master.tar.gz">dropzone-master.tar.gz</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./highlight.js">highlight.js</a></td>
|
<td><a href="./highlight.js">highlight.js</a></td>
|
||||||
|
|||||||
20
public/vendor/plugins/dropzone/LICENSE
vendored
20
public/vendor/plugins/dropzone/LICENSE
vendored
@@ -1,20 +0,0 @@
|
|||||||
(c) Copyright 2012 Matias Meno
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
388
public/vendor/plugins/dropzone/dropzone.css
vendored
388
public/vendor/plugins/dropzone/dropzone.css
vendored
@@ -1,388 +0,0 @@
|
|||||||
/*
|
|
||||||
* The MIT License
|
|
||||||
* Copyright (c) 2012 Matias Meno <m@tias.me>
|
|
||||||
*/
|
|
||||||
@-webkit-keyframes passing-through {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30%, 70% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); }
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(-40px);
|
|
||||||
-moz-transform: translateY(-40px);
|
|
||||||
-ms-transform: translateY(-40px);
|
|
||||||
-o-transform: translateY(-40px);
|
|
||||||
transform: translateY(-40px); } }
|
|
||||||
@-moz-keyframes passing-through {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30%, 70% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); }
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(-40px);
|
|
||||||
-moz-transform: translateY(-40px);
|
|
||||||
-ms-transform: translateY(-40px);
|
|
||||||
-o-transform: translateY(-40px);
|
|
||||||
transform: translateY(-40px); } }
|
|
||||||
@keyframes passing-through {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30%, 70% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); }
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(-40px);
|
|
||||||
-moz-transform: translateY(-40px);
|
|
||||||
-ms-transform: translateY(-40px);
|
|
||||||
-o-transform: translateY(-40px);
|
|
||||||
transform: translateY(-40px); } }
|
|
||||||
@-webkit-keyframes slide-in {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); } }
|
|
||||||
@-moz-keyframes slide-in {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); } }
|
|
||||||
@keyframes slide-in {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transform: translateY(40px);
|
|
||||||
-moz-transform: translateY(40px);
|
|
||||||
-ms-transform: translateY(40px);
|
|
||||||
-o-transform: translateY(40px);
|
|
||||||
transform: translateY(40px); }
|
|
||||||
30% {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transform: translateY(0px);
|
|
||||||
-moz-transform: translateY(0px);
|
|
||||||
-ms-transform: translateY(0px);
|
|
||||||
-o-transform: translateY(0px);
|
|
||||||
transform: translateY(0px); } }
|
|
||||||
@-webkit-keyframes pulse {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); }
|
|
||||||
10% {
|
|
||||||
-webkit-transform: scale(1.1);
|
|
||||||
-moz-transform: scale(1.1);
|
|
||||||
-ms-transform: scale(1.1);
|
|
||||||
-o-transform: scale(1.1);
|
|
||||||
transform: scale(1.1); }
|
|
||||||
20% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); } }
|
|
||||||
@-moz-keyframes pulse {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); }
|
|
||||||
10% {
|
|
||||||
-webkit-transform: scale(1.1);
|
|
||||||
-moz-transform: scale(1.1);
|
|
||||||
-ms-transform: scale(1.1);
|
|
||||||
-o-transform: scale(1.1);
|
|
||||||
transform: scale(1.1); }
|
|
||||||
20% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); } }
|
|
||||||
@keyframes pulse {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); }
|
|
||||||
10% {
|
|
||||||
-webkit-transform: scale(1.1);
|
|
||||||
-moz-transform: scale(1.1);
|
|
||||||
-ms-transform: scale(1.1);
|
|
||||||
-o-transform: scale(1.1);
|
|
||||||
transform: scale(1.1); }
|
|
||||||
20% {
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
-moz-transform: scale(1);
|
|
||||||
-ms-transform: scale(1);
|
|
||||||
-o-transform: scale(1);
|
|
||||||
transform: scale(1); } }
|
|
||||||
.dropzone, .dropzone * {
|
|
||||||
box-sizing: border-box; }
|
|
||||||
|
|
||||||
.dropzone {
|
|
||||||
min-height: 150px;
|
|
||||||
border: 2px solid rgba(0, 0, 0, 0.3);
|
|
||||||
background: white;
|
|
||||||
padding: 20px 20px; }
|
|
||||||
.dropzone.dz-clickable {
|
|
||||||
cursor: pointer; }
|
|
||||||
.dropzone.dz-clickable * {
|
|
||||||
cursor: default; }
|
|
||||||
.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
|
|
||||||
cursor: pointer; }
|
|
||||||
.dropzone.dz-started .dz-message {
|
|
||||||
display: none; }
|
|
||||||
.dropzone.dz-drag-hover {
|
|
||||||
border-style: solid; }
|
|
||||||
.dropzone.dz-drag-hover .dz-message {
|
|
||||||
opacity: 0.5; }
|
|
||||||
.dropzone .dz-message {
|
|
||||||
text-align: center;
|
|
||||||
margin: 2em 0; }
|
|
||||||
.dropzone .dz-preview {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
margin: 16px;
|
|
||||||
min-height: 100px; }
|
|
||||||
.dropzone .dz-preview:hover {
|
|
||||||
z-index: 1000; }
|
|
||||||
.dropzone .dz-preview:hover .dz-details {
|
|
||||||
opacity: 1; }
|
|
||||||
.dropzone .dz-preview.dz-file-preview .dz-image {
|
|
||||||
border-radius: 20px;
|
|
||||||
background: #999;
|
|
||||||
background: linear-gradient(to bottom, #eee, #ddd); }
|
|
||||||
.dropzone .dz-preview.dz-file-preview .dz-details {
|
|
||||||
opacity: 1; }
|
|
||||||
.dropzone .dz-preview.dz-image-preview {
|
|
||||||
background: white; }
|
|
||||||
.dropzone .dz-preview.dz-image-preview .dz-details {
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
-ms-transition: opacity 0.2s linear;
|
|
||||||
-o-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear; }
|
|
||||||
.dropzone .dz-preview .dz-remove {
|
|
||||||
font-size: 14px;
|
|
||||||
text-align: center;
|
|
||||||
display: block;
|
|
||||||
cursor: pointer;
|
|
||||||
border: none; }
|
|
||||||
.dropzone .dz-preview .dz-remove:hover {
|
|
||||||
text-decoration: underline; }
|
|
||||||
.dropzone .dz-preview:hover .dz-details {
|
|
||||||
opacity: 1; }
|
|
||||||
.dropzone .dz-preview .dz-details {
|
|
||||||
z-index: 20;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
opacity: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
min-width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
padding: 2em 1em;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(0, 0, 0, 0.9);
|
|
||||||
line-height: 150%; }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-size {
|
|
||||||
margin-bottom: 1em;
|
|
||||||
font-size: 16px; }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-filename {
|
|
||||||
white-space: nowrap; }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-filename:hover span {
|
|
||||||
border: 1px solid rgba(200, 200, 200, 0.8);
|
|
||||||
background-color: rgba(255, 255, 255, 0.8); }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis; }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
|
|
||||||
border: 1px solid transparent; }
|
|
||||||
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
|
|
||||||
background-color: rgba(255, 255, 255, 0.4);
|
|
||||||
padding: 0 0.4em;
|
|
||||||
border-radius: 3px; }
|
|
||||||
.dropzone .dz-preview:hover .dz-image img {
|
|
||||||
-webkit-transform: scale(1.05, 1.05);
|
|
||||||
-moz-transform: scale(1.05, 1.05);
|
|
||||||
-ms-transform: scale(1.05, 1.05);
|
|
||||||
-o-transform: scale(1.05, 1.05);
|
|
||||||
transform: scale(1.05, 1.05);
|
|
||||||
-webkit-filter: blur(8px);
|
|
||||||
filter: blur(8px); }
|
|
||||||
.dropzone .dz-preview .dz-image {
|
|
||||||
border-radius: 20px;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 120px;
|
|
||||||
height: 120px;
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
z-index: 10; }
|
|
||||||
.dropzone .dz-preview .dz-image img {
|
|
||||||
display: block; }
|
|
||||||
.dropzone .dz-preview.dz-success .dz-success-mark {
|
|
||||||
-webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
|
|
||||||
.dropzone .dz-preview.dz-error .dz-error-mark {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
-o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
|
||||||
animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
|
|
||||||
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0;
|
|
||||||
z-index: 500;
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -27px;
|
|
||||||
margin-top: -27px; }
|
|
||||||
.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
|
|
||||||
display: block;
|
|
||||||
width: 54px;
|
|
||||||
height: 54px; }
|
|
||||||
.dropzone .dz-preview.dz-processing .dz-progress {
|
|
||||||
opacity: 1;
|
|
||||||
-webkit-transition: all 0.2s linear;
|
|
||||||
-moz-transition: all 0.2s linear;
|
|
||||||
-ms-transition: all 0.2s linear;
|
|
||||||
-o-transition: all 0.2s linear;
|
|
||||||
transition: all 0.2s linear; }
|
|
||||||
.dropzone .dz-preview.dz-complete .dz-progress {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.4s ease-in;
|
|
||||||
-moz-transition: opacity 0.4s ease-in;
|
|
||||||
-ms-transition: opacity 0.4s ease-in;
|
|
||||||
-o-transition: opacity 0.4s ease-in;
|
|
||||||
transition: opacity 0.4s ease-in; }
|
|
||||||
.dropzone .dz-preview:not(.dz-processing) .dz-progress {
|
|
||||||
-webkit-animation: pulse 6s ease infinite;
|
|
||||||
-moz-animation: pulse 6s ease infinite;
|
|
||||||
-ms-animation: pulse 6s ease infinite;
|
|
||||||
-o-animation: pulse 6s ease infinite;
|
|
||||||
animation: pulse 6s ease infinite; }
|
|
||||||
.dropzone .dz-preview .dz-progress {
|
|
||||||
opacity: 1;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
position: absolute;
|
|
||||||
height: 16px;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
margin-top: -8px;
|
|
||||||
width: 80px;
|
|
||||||
margin-left: -40px;
|
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
-webkit-transform: scale(1);
|
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden; }
|
|
||||||
.dropzone .dz-preview .dz-progress .dz-upload {
|
|
||||||
background: #333;
|
|
||||||
background: linear-gradient(to bottom, #666, #444);
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 0;
|
|
||||||
-webkit-transition: width 300ms ease-in-out;
|
|
||||||
-moz-transition: width 300ms ease-in-out;
|
|
||||||
-ms-transition: width 300ms ease-in-out;
|
|
||||||
-o-transition: width 300ms ease-in-out;
|
|
||||||
transition: width 300ms ease-in-out; }
|
|
||||||
.dropzone .dz-preview.dz-error .dz-error-message {
|
|
||||||
display: block; }
|
|
||||||
.dropzone .dz-preview.dz-error:hover .dz-error-message {
|
|
||||||
opacity: 1;
|
|
||||||
pointer-events: auto; }
|
|
||||||
.dropzone .dz-preview .dz-error-message {
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
display: none;
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.3s ease;
|
|
||||||
-moz-transition: opacity 0.3s ease;
|
|
||||||
-ms-transition: opacity 0.3s ease;
|
|
||||||
-o-transition: opacity 0.3s ease;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 13px;
|
|
||||||
top: 130px;
|
|
||||||
left: -10px;
|
|
||||||
width: 140px;
|
|
||||||
background: #be2626;
|
|
||||||
background: linear-gradient(to bottom, #be2626, #a92222);
|
|
||||||
padding: 0.5em 1.2em;
|
|
||||||
color: white; }
|
|
||||||
.dropzone .dz-preview .dz-error-message:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: -6px;
|
|
||||||
left: 64px;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
border-left: 6px solid transparent;
|
|
||||||
border-right: 6px solid transparent;
|
|
||||||
border-bottom: 6px solid #be2626; }
|
|
||||||
1752
public/vendor/plugins/dropzone/dropzone.js
vendored
1752
public/vendor/plugins/dropzone/dropzone.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -12,20 +12,32 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// tplAdminHooks template path for render hook settings
|
// tplAdminHooks template path to render hook settings
|
||||||
tplAdminHooks base.TplName = "admin/hooks"
|
tplAdminHooks base.TplName = "admin/hooks"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultWebhooks render admin-default webhook list page
|
// DefaultOrSystemWebhooks renders both admin default and system webhook list pages
|
||||||
func DefaultWebhooks(ctx *context.Context) {
|
func DefaultOrSystemWebhooks(ctx *context.Context) {
|
||||||
ctx.Data["Title"] = ctx.Tr("admin.hooks")
|
var ws []*models.Webhook
|
||||||
ctx.Data["PageIsAdminHooks"] = true
|
var err error
|
||||||
ctx.Data["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
|
||||||
ctx.Data["Description"] = ctx.Tr("admin.hooks.desc")
|
// Are we looking at default webhooks?
|
||||||
|
if ctx.Params(":configType") == "hooks" {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("admin.hooks")
|
||||||
|
ctx.Data["Description"] = ctx.Tr("admin.hooks.desc")
|
||||||
|
ctx.Data["PageIsAdminHooks"] = true
|
||||||
|
ctx.Data["BaseLink"] = setting.AppSubURL + "/admin/hooks"
|
||||||
|
ws, err = models.GetDefaultWebhooks()
|
||||||
|
} else {
|
||||||
|
ctx.Data["Title"] = ctx.Tr("admin.systemhooks")
|
||||||
|
ctx.Data["Description"] = ctx.Tr("admin.systemhooks.desc")
|
||||||
|
ctx.Data["PageIsAdminSystemHooks"] = true
|
||||||
|
ctx.Data["BaseLink"] = setting.AppSubURL + "/admin/system-hooks"
|
||||||
|
ws, err = models.GetSystemWebhooks()
|
||||||
|
}
|
||||||
|
|
||||||
ws, err := models.GetDefaultWebhooks()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("GetWebhooksDefaults", err)
|
ctx.ServerError("GetWebhooksAdmin", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,15 +45,22 @@ func DefaultWebhooks(ctx *context.Context) {
|
|||||||
ctx.HTML(200, tplAdminHooks)
|
ctx.HTML(200, tplAdminHooks)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteDefaultWebhook response for delete admin-default webhook
|
// DeleteDefaultOrSystemWebhook handler to delete an admin-defined system or default webhook
|
||||||
func DeleteDefaultWebhook(ctx *context.Context) {
|
func DeleteDefaultOrSystemWebhook(ctx *context.Context) {
|
||||||
if err := models.DeleteDefaultWebhook(ctx.QueryInt64("id")); err != nil {
|
if err := models.DeleteDefaultSystemWebhook(ctx.QueryInt64("id")); err != nil {
|
||||||
ctx.Flash.Error("DeleteDefaultWebhook: " + err.Error())
|
ctx.Flash.Error("DeleteDefaultWebhook: " + err.Error())
|
||||||
} else {
|
} else {
|
||||||
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))
|
ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success"))
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(200, map[string]interface{}{
|
// Are we looking at default webhooks?
|
||||||
"redirect": setting.AppSubURL + "/admin/hooks",
|
if ctx.Params(":configType") == "hooks" {
|
||||||
})
|
ctx.JSON(200, map[string]interface{}{
|
||||||
|
"redirect": setting.AppSubURL + "/admin/hooks",
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ctx.JSON(200, map[string]interface{}{
|
||||||
|
"redirect": setting.AppSubURL + "/admin/system-hooks",
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
package repo
|
package repo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models"
|
"code.gitea.io/gitea/models"
|
||||||
@@ -173,19 +174,21 @@ func prepareIssueStopwatch(ctx *context.APIContext, shouldExist bool) (*models.I
|
|||||||
|
|
||||||
if !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) {
|
if !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) {
|
||||||
ctx.Status(http.StatusForbidden)
|
ctx.Status(http.StatusForbidden)
|
||||||
return nil, err
|
return nil, errors.New("Unable to write to PRs")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !ctx.Repo.CanUseTimetracker(issue, ctx.User) {
|
if !ctx.Repo.CanUseTimetracker(issue, ctx.User) {
|
||||||
ctx.Status(http.StatusForbidden)
|
ctx.Status(http.StatusForbidden)
|
||||||
return nil, err
|
return nil, errors.New("Cannot use time tracker")
|
||||||
}
|
}
|
||||||
|
|
||||||
if models.StopwatchExists(ctx.User.ID, issue.ID) != shouldExist {
|
if models.StopwatchExists(ctx.User.ID, issue.ID) != shouldExist {
|
||||||
if shouldExist {
|
if shouldExist {
|
||||||
ctx.Error(http.StatusConflict, "StopwatchExists", "cannot stop/cancel a non existent stopwatch")
|
ctx.Error(http.StatusConflict, "StopwatchExists", "cannot stop/cancel a non existent stopwatch")
|
||||||
|
err = errors.New("cannot stop/cancel a non existent stopwatch")
|
||||||
} else {
|
} else {
|
||||||
ctx.Error(http.StatusConflict, "StopwatchExists", "cannot start a stopwatch again if it already exists")
|
ctx.Error(http.StatusConflict, "StopwatchExists", "cannot start a stopwatch again if it already exists")
|
||||||
|
err = errors.New("cannot start a stopwatch again if it already exists")
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import (
|
|||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/private"
|
"code.gitea.io/gitea/modules/private"
|
||||||
"code.gitea.io/gitea/modules/repofiles"
|
"code.gitea.io/gitea/modules/repofiles"
|
||||||
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"code.gitea.io/gitea/modules/util"
|
"code.gitea.io/gitea/modules/util"
|
||||||
pull_service "code.gitea.io/gitea/services/pull"
|
pull_service "code.gitea.io/gitea/services/pull"
|
||||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||||
@@ -428,14 +429,14 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
|
|||||||
branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch)
|
branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch)
|
||||||
}
|
}
|
||||||
results = append(results, private.HookPostReceiveBranchResult{
|
results = append(results, private.HookPostReceiveBranchResult{
|
||||||
Message: true,
|
Message: setting.Git.PullRequestPushMessage && repo.AllowsPulls(),
|
||||||
Create: true,
|
Create: true,
|
||||||
Branch: branch,
|
Branch: branch,
|
||||||
URL: fmt.Sprintf("%s/compare/%s...%s", baseRepo.HTMLURL(), util.PathEscapeSegments(baseRepo.DefaultBranch), util.PathEscapeSegments(branch)),
|
URL: fmt.Sprintf("%s/compare/%s...%s", baseRepo.HTMLURL(), util.PathEscapeSegments(baseRepo.DefaultBranch), util.PathEscapeSegments(branch)),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
results = append(results, private.HookPostReceiveBranchResult{
|
results = append(results, private.HookPostReceiveBranchResult{
|
||||||
Message: true,
|
Message: setting.Git.PullRequestPushMessage && repo.AllowsPulls(),
|
||||||
Create: false,
|
Create: false,
|
||||||
Branch: branch,
|
Branch: branch,
|
||||||
URL: fmt.Sprintf("%s/pulls/%d", baseRepo.HTMLURL(), pr.Index),
|
URL: fmt.Sprintf("%s/pulls/%d", baseRepo.HTMLURL(), pr.Index),
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func renderAttachmentSettings(ctx *context.Context) {
|
func renderAttachmentSettings(ctx *context.Context) {
|
||||||
ctx.Data["RequireDropzone"] = true
|
|
||||||
ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled
|
ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled
|
||||||
ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes
|
ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes
|
||||||
ctx.Data["AttachmentMaxSize"] = setting.AttachmentMaxSize
|
ctx.Data["AttachmentMaxSize"] = setting.AttachmentMaxSize
|
||||||
|
|||||||
@@ -474,7 +474,6 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func renderUploadSettings(ctx *context.Context) {
|
func renderUploadSettings(ctx *context.Context) {
|
||||||
ctx.Data["RequireDropzone"] = true
|
|
||||||
ctx.Data["RequireTribute"] = true
|
ctx.Data["RequireTribute"] = true
|
||||||
ctx.Data["RequireSimpleMDE"] = true
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
ctx.Data["UploadAllowedTypes"] = strings.Join(setting.Repository.Upload.AllowedTypes, ",")
|
ctx.Data["UploadAllowedTypes"] = strings.Join(setting.Repository.Upload.AllowedTypes, ",")
|
||||||
|
|||||||
@@ -697,7 +697,6 @@ func ViewIssue(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.Data["RequireHighlightJS"] = true
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
ctx.Data["RequireDropzone"] = true
|
|
||||||
ctx.Data["RequireTribute"] = true
|
ctx.Data["RequireTribute"] = true
|
||||||
ctx.Data["RequireSimpleMDE"] = true
|
ctx.Data["RequireSimpleMDE"] = true
|
||||||
renderAttachmentSettings(ctx)
|
renderAttachmentSettings(ctx)
|
||||||
|
|||||||
@@ -49,14 +49,15 @@ func Webhooks(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type orgRepoCtx struct {
|
type orgRepoCtx struct {
|
||||||
OrgID int64
|
OrgID int64
|
||||||
RepoID int64
|
RepoID int64
|
||||||
IsAdmin bool
|
IsAdmin bool
|
||||||
Link string
|
IsSystemWebhook bool
|
||||||
NewTemplate base.TplName
|
Link string
|
||||||
|
NewTemplate base.TplName
|
||||||
}
|
}
|
||||||
|
|
||||||
// getOrgRepoCtx determines whether this is a repo, organization, or admin context.
|
// getOrgRepoCtx determines whether this is a repo, organization, or admin (both default and system) context.
|
||||||
func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) {
|
func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) {
|
||||||
if len(ctx.Repo.RepoLink) > 0 {
|
if len(ctx.Repo.RepoLink) > 0 {
|
||||||
return &orgRepoCtx{
|
return &orgRepoCtx{
|
||||||
@@ -75,10 +76,21 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ctx.User.IsAdmin {
|
if ctx.User.IsAdmin {
|
||||||
|
// Are we looking at default webhooks?
|
||||||
|
if ctx.Params(":configType") == "hooks" {
|
||||||
|
return &orgRepoCtx{
|
||||||
|
IsAdmin: true,
|
||||||
|
Link: path.Join(setting.AppSubURL, "/admin/hooks"),
|
||||||
|
NewTemplate: tplAdminHookNew,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Must be system webhooks instead
|
||||||
return &orgRepoCtx{
|
return &orgRepoCtx{
|
||||||
IsAdmin: true,
|
IsAdmin: true,
|
||||||
Link: path.Join(setting.AppSubURL, "/admin/hooks"),
|
IsSystemWebhook: true,
|
||||||
NewTemplate: tplAdminHookNew,
|
Link: path.Join(setting.AppSubURL, "/admin/system-hooks"),
|
||||||
|
NewTemplate: tplAdminHookNew,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +117,10 @@ func WebhooksNew(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if orCtx.IsAdmin {
|
if orCtx.IsAdmin && orCtx.IsSystemWebhook {
|
||||||
|
ctx.Data["PageIsAdminSystemHooks"] = true
|
||||||
|
ctx.Data["PageIsAdminSystemHooksNew"] = true
|
||||||
|
} else if orCtx.IsAdmin {
|
||||||
ctx.Data["PageIsAdminHooks"] = true
|
ctx.Data["PageIsAdminHooks"] = true
|
||||||
ctx.Data["PageIsAdminHooksNew"] = true
|
ctx.Data["PageIsAdminHooksNew"] = true
|
||||||
} else {
|
} else {
|
||||||
@@ -159,8 +174,8 @@ func ParseHookEvent(form auth.WebhookForm) *models.HookEvent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebHooksNewPost response for creating webhook
|
// GiteaHooksNewPost response for creating Gitea webhook
|
||||||
func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
|
func GiteaHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
|
||||||
ctx.Data["Title"] = ctx.Tr("repo.settings.add_webhook")
|
ctx.Data["Title"] = ctx.Tr("repo.settings.add_webhook")
|
||||||
ctx.Data["PageIsSettingsHooks"] = true
|
ctx.Data["PageIsSettingsHooks"] = true
|
||||||
ctx.Data["PageIsSettingsHooksNew"] = true
|
ctx.Data["PageIsSettingsHooksNew"] = true
|
||||||
@@ -185,15 +200,16 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
HTTPMethod: form.HTTPMethod,
|
HTTPMethod: form.HTTPMethod,
|
||||||
ContentType: contentType,
|
ContentType: contentType,
|
||||||
Secret: form.Secret,
|
Secret: form.Secret,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.GITEA,
|
HookTaskType: models.GITEA,
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -238,14 +254,15 @@ func newGogsWebhookPost(ctx *context.Context, form auth.NewGogshookForm, kind mo
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: contentType,
|
ContentType: contentType,
|
||||||
Secret: form.Secret,
|
Secret: form.Secret,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: kind,
|
HookTaskType: kind,
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -287,14 +304,15 @@ func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.DISCORD,
|
HookTaskType: models.DISCORD,
|
||||||
Meta: string(meta),
|
Meta: string(meta),
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -327,14 +345,15 @@ func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.DINGTALK,
|
HookTaskType: models.DINGTALK,
|
||||||
Meta: "",
|
Meta: "",
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -376,14 +395,15 @@ func TelegramHooksNewPost(ctx *context.Context, form auth.NewTelegramHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: fmt.Sprintf("https://api.telegram.org/bot%s/sendMessage?chat_id=%s", form.BotToken, form.ChatID),
|
URL: fmt.Sprintf("https://api.telegram.org/bot%s/sendMessage?chat_id=%s", form.BotToken, form.ChatID),
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.TELEGRAM,
|
HookTaskType: models.TELEGRAM,
|
||||||
Meta: string(meta),
|
Meta: string(meta),
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -416,14 +436,15 @@ func MSTeamsHooksNewPost(ctx *context.Context, form auth.NewMSTeamsHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.MSTEAMS,
|
HookTaskType: models.MSTEAMS,
|
||||||
Meta: "",
|
Meta: "",
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -473,14 +494,15 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.SLACK,
|
HookTaskType: models.SLACK,
|
||||||
Meta: string(meta),
|
Meta: string(meta),
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -513,14 +535,15 @@ func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
w := &models.Webhook{
|
w := &models.Webhook{
|
||||||
RepoID: orCtx.RepoID,
|
RepoID: orCtx.RepoID,
|
||||||
URL: form.PayloadURL,
|
URL: form.PayloadURL,
|
||||||
ContentType: models.ContentTypeJSON,
|
ContentType: models.ContentTypeJSON,
|
||||||
HookEvent: ParseHookEvent(form.WebhookForm),
|
HookEvent: ParseHookEvent(form.WebhookForm),
|
||||||
IsActive: form.Active,
|
IsActive: form.Active,
|
||||||
HookTaskType: models.FEISHU,
|
HookTaskType: models.FEISHU,
|
||||||
Meta: "",
|
Meta: "",
|
||||||
OrgID: orCtx.OrgID,
|
OrgID: orCtx.OrgID,
|
||||||
|
IsSystemWebhook: orCtx.IsSystemWebhook,
|
||||||
}
|
}
|
||||||
if err := w.UpdateEvent(); err != nil {
|
if err := w.UpdateEvent(); err != nil {
|
||||||
ctx.ServerError("UpdateEvent", err)
|
ctx.ServerError("UpdateEvent", err)
|
||||||
@@ -549,6 +572,8 @@ func checkWebhook(ctx *context.Context) (*orgRepoCtx, *models.Webhook) {
|
|||||||
w, err = models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
w, err = models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id"))
|
||||||
} else if orCtx.OrgID > 0 {
|
} else if orCtx.OrgID > 0 {
|
||||||
w, err = models.GetWebhookByOrgID(ctx.Org.Organization.ID, ctx.ParamsInt64(":id"))
|
w, err = models.GetWebhookByOrgID(ctx.Org.Organization.ID, ctx.ParamsInt64(":id"))
|
||||||
|
} else if orCtx.IsSystemWebhook {
|
||||||
|
w, err = models.GetSystemWebhook(ctx.ParamsInt64(":id"))
|
||||||
} else {
|
} else {
|
||||||
w, err = models.GetDefaultWebhook(ctx.ParamsInt64(":id"))
|
w, err = models.GetDefaultWebhook(ctx.ParamsInt64(":id"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -458,11 +458,11 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||||||
m.Post("/delete", admin.DeleteRepo)
|
m.Post("/delete", admin.DeleteRepo)
|
||||||
})
|
})
|
||||||
|
|
||||||
m.Group("/hooks", func() {
|
m.Group("/^:configType(hooks|system-hooks)$", func() {
|
||||||
m.Get("", admin.DefaultWebhooks)
|
m.Get("", admin.DefaultOrSystemWebhooks)
|
||||||
m.Post("/delete", admin.DeleteDefaultWebhook)
|
m.Post("/delete", admin.DeleteDefaultOrSystemWebhook)
|
||||||
m.Get("/:type/new", repo.WebhooksNew)
|
m.Get("/:type/new", repo.WebhooksNew)
|
||||||
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
|
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost)
|
||||||
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
||||||
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||||
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
||||||
@@ -569,7 +569,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||||||
m.Get("", org.Webhooks)
|
m.Get("", org.Webhooks)
|
||||||
m.Post("/delete", org.DeleteWebhook)
|
m.Post("/delete", org.DeleteWebhook)
|
||||||
m.Get("/:type/new", repo.WebhooksNew)
|
m.Get("/:type/new", repo.WebhooksNew)
|
||||||
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
|
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost)
|
||||||
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
||||||
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||||
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
||||||
@@ -635,7 +635,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||||||
m.Get("", repo.Webhooks)
|
m.Get("", repo.Webhooks)
|
||||||
m.Post("/delete", repo.DeleteWebhook)
|
m.Post("/delete", repo.DeleteWebhook)
|
||||||
m.Get("/:type/new", repo.WebhooksNew)
|
m.Get("/:type/new", repo.WebhooksNew)
|
||||||
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
|
m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost)
|
||||||
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost)
|
||||||
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||||
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost)
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ func MergeRequiredContextsCommitStatus(commitStatuses []*models.CommitStatus, re
|
|||||||
|
|
||||||
if targetStatus == "" {
|
if targetStatus == "" {
|
||||||
targetStatus = structs.CommitStatusPending
|
targetStatus = structs.CommitStatusPending
|
||||||
|
commitStatuses = append(commitStatuses, &models.CommitStatus{
|
||||||
|
State: targetStatus,
|
||||||
|
Context: ctx,
|
||||||
|
Description: "Pending",
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if targetStatus.NoBetterThan(returnedStatus) {
|
if targetStatus.NoBetterThan(returnedStatus) {
|
||||||
returnedStatus = targetStatus
|
returnedStatus = targetStatus
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
|
|
||||||
<p class="panel-header"><strong>{{.i18n.Tr "admin_panel"}}</strong></p>
|
|
||||||
<div class="panel-body">
|
|
||||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
|
||||||
<li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="{{AppSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminHooks}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/hooks">{{.i18n.Tr "admin.hooks"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminEmails}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/emails">{{.i18n.Tr "admin.emails"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li>
|
|
||||||
<li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -14,6 +14,9 @@
|
|||||||
<a class="{{if .PageIsAdminHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
|
<a class="{{if .PageIsAdminHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
|
||||||
{{.i18n.Tr "admin.hooks"}}
|
{{.i18n.Tr "admin.hooks"}}
|
||||||
</a>
|
</a>
|
||||||
|
<a class="{{if .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/system-hooks">
|
||||||
|
{{.i18n.Tr "admin.systemhooks"}}
|
||||||
|
</a>
|
||||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||||
{{.i18n.Tr "admin.authentication"}}
|
{{.i18n.Tr "admin.authentication"}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -29,9 +29,6 @@
|
|||||||
{{if .RequireDatetimepicker}}
|
{{if .RequireDatetimepicker}}
|
||||||
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script>
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .RequireDropzone}}
|
|
||||||
<script src="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js"></script>
|
|
||||||
{{end}}
|
|
||||||
{{if .RequireU2F}}
|
{{if .RequireU2F}}
|
||||||
<script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script>
|
<script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -86,8 +86,8 @@
|
|||||||
window.config = {
|
window.config = {
|
||||||
AppSubUrl: '{{AppSubUrl}}',
|
AppSubUrl: '{{AppSubUrl}}',
|
||||||
StaticUrlPrefix: '{{StaticUrlPrefix}}',
|
StaticUrlPrefix: '{{StaticUrlPrefix}}',
|
||||||
|
csrf: '{{.CsrfToken}}',
|
||||||
Datetimepicker: {{if .RequireDatetimepicker}}true{{else}}false{{end}},
|
Datetimepicker: {{if .RequireDatetimepicker}}true{{else}}false{{end}},
|
||||||
Dropzone: {{if .RequireDropzone}}true{{else}}false{{end}},
|
|
||||||
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
|
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
|
||||||
Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}},
|
Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}},
|
||||||
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
|
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
|
||||||
@@ -124,9 +124,6 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
{{if .RequireDatetimepicker}}
|
{{if .RequireDatetimepicker}}
|
||||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css">
|
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css">
|
||||||
{{end}}
|
|
||||||
{{if .RequireDropzone}}
|
|
||||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css">
|
|
||||||
{{end}}
|
{{end}}
|
||||||
<style class="list-search-style"></style>
|
<style class="list-search-style"></style>
|
||||||
{{if .PageIsUserProfile}}
|
{{if .PageIsUserProfile}}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ var urlsToCache = [
|
|||||||
'{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}',
|
'{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}',
|
||||||
'{{StaticUrlPrefix}}/js/swagger.js?v={{MD5 AppVer}}',
|
'{{StaticUrlPrefix}}/js/swagger.js?v={{MD5 AppVer}}',
|
||||||
'{{StaticUrlPrefix}}/js/userheatmap.js',
|
'{{StaticUrlPrefix}}/js/userheatmap.js',
|
||||||
|
'{{StaticUrlPrefix}}/js/dropzone.js',
|
||||||
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js',
|
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js',
|
||||||
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js',
|
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js',
|
||||||
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js',
|
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js',
|
||||||
@@ -21,6 +22,7 @@ var urlsToCache = [
|
|||||||
'{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}',
|
'{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}',
|
||||||
'{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}',
|
'{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}',
|
||||||
'{{StaticUrlPrefix}}/css/userheatmap.css',
|
'{{StaticUrlPrefix}}/css/userheatmap.css',
|
||||||
|
'{{StaticUrlPrefix}}/css/dropzone.css',
|
||||||
'{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}',
|
'{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}',
|
||||||
'{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css',
|
'{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css',
|
||||||
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css',
|
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css',
|
||||||
|
|||||||
@@ -158,26 +158,6 @@
|
|||||||
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
|
{{$.i18n.Tr (printf "repo.signing.wont_sign.%s" .WontSignReason) }}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if and .Divergence (gt .Divergence.Behind 0)}}
|
|
||||||
<div class="ui very compact branch-update grid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="item text gray eleven wide left floated column">
|
|
||||||
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
|
|
||||||
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
|
|
||||||
</div>
|
|
||||||
{{if .UpdateAllowed}}
|
|
||||||
<div class="item text five wide right floated column">
|
|
||||||
<form action="{{.Link}}/update" method="post">
|
|
||||||
{{.CsrfTokenHtml}}
|
|
||||||
<button class="ui button" data-do="update">
|
|
||||||
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{if .AllowMerge}}
|
{{if .AllowMerge}}
|
||||||
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
|
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
|
||||||
{{$approvers := .Issue.PullRequest.GetApprovers}}
|
{{$approvers := .Issue.PullRequest.GetApprovers}}
|
||||||
@@ -307,6 +287,26 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if and .Divergence (gt .Divergence.Behind 0)}}
|
||||||
|
<div class="ui very compact branch-update grid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="item text gray eleven wide left floated column">
|
||||||
|
<i class="icon icon-octicon">{{svg "octicon-alert" 16}}</i>
|
||||||
|
{{$.i18n.Tr "repo.pulls.outdated_with_base_branch"}}
|
||||||
|
</div>
|
||||||
|
{{if .UpdateAllowed}}
|
||||||
|
<div class="item text five wide right floated column">
|
||||||
|
<form action="{{.Link}}/update" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<button class="ui button" data-do="update">
|
||||||
|
<span class="item text">{{$.i18n.Tr "repo.pulls.update_branch"}}</span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
|
{{/* Merge conflict without specific file. Suggest manual merge, only if all reviews and status checks OK. */}}
|
||||||
{{if .IsBlockedByApprovals}}
|
{{if .IsBlockedByApprovals}}
|
||||||
|
|||||||
4
vendor/github.com/yuin/goldmark/extension/tasklist.go
generated
vendored
4
vendor/github.com/yuin/goldmark/extension/tasklist.go
generated
vendored
@@ -92,9 +92,9 @@ func (r *TaskCheckBoxHTMLRenderer) renderTaskCheckBox(w util.BufWriter, source [
|
|||||||
w.WriteString(`<input disabled="" type="checkbox"`)
|
w.WriteString(`<input disabled="" type="checkbox"`)
|
||||||
}
|
}
|
||||||
if r.XHTML {
|
if r.XHTML {
|
||||||
w.WriteString(" />")
|
w.WriteString(" /> ")
|
||||||
} else {
|
} else {
|
||||||
w.WriteString(">")
|
w.WriteString("> ")
|
||||||
}
|
}
|
||||||
return gast.WalkContinue, nil
|
return gast.WalkContinue, nil
|
||||||
}
|
}
|
||||||
|
|||||||
29
vendor/github.com/yuin/goldmark/parser/list.go
generated
vendored
29
vendor/github.com/yuin/goldmark/parser/list.go
generated
vendored
@@ -166,20 +166,6 @@ func (b *listParser) Continue(node ast.Node, reader text.Reader, pc Context) Sta
|
|||||||
}
|
}
|
||||||
return Continue | HasChildren
|
return Continue | HasChildren
|
||||||
}
|
}
|
||||||
// Thematic Breaks take precedence over lists
|
|
||||||
if isThematicBreak(line, reader.LineOffset()) {
|
|
||||||
isHeading := false
|
|
||||||
last := pc.LastOpenedBlock().Node
|
|
||||||
if ast.IsParagraph(last) {
|
|
||||||
c, ok := matchesSetextHeadingBar(line)
|
|
||||||
if ok && c == '-' {
|
|
||||||
isHeading = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if !isHeading {
|
|
||||||
return Close
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// "offset" means a width that bar indicates.
|
// "offset" means a width that bar indicates.
|
||||||
// - aaaaaaaa
|
// - aaaaaaaa
|
||||||
@@ -200,6 +186,21 @@ func (b *listParser) Continue(node ast.Node, reader text.Reader, pc Context) Sta
|
|||||||
if !list.CanContinue(marker, typ == orderedList) {
|
if !list.CanContinue(marker, typ == orderedList) {
|
||||||
return Close
|
return Close
|
||||||
}
|
}
|
||||||
|
// Thematic Breaks take precedence over lists
|
||||||
|
if isThematicBreak(line[match[3]-1:], 0) {
|
||||||
|
isHeading := false
|
||||||
|
last := pc.LastOpenedBlock().Node
|
||||||
|
if ast.IsParagraph(last) {
|
||||||
|
c, ok := matchesSetextHeadingBar(line)
|
||||||
|
if ok && c == '-' {
|
||||||
|
isHeading = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !isHeading {
|
||||||
|
return Close
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Continue | HasChildren
|
return Continue | HasChildren
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -452,7 +452,7 @@ github.com/willf/bitset
|
|||||||
github.com/xanzy/ssh-agent
|
github.com/xanzy/ssh-agent
|
||||||
# github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
|
# github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
|
||||||
github.com/yohcop/openid-go
|
github.com/yohcop/openid-go
|
||||||
# github.com/yuin/goldmark v1.1.24
|
# github.com/yuin/goldmark v1.1.25
|
||||||
github.com/yuin/goldmark
|
github.com/yuin/goldmark
|
||||||
github.com/yuin/goldmark/ast
|
github.com/yuin/goldmark/ast
|
||||||
github.com/yuin/goldmark/extension
|
github.com/yuin/goldmark/extension
|
||||||
|
|||||||
9
web_src/js/features/dropzone.js
Normal file
9
web_src/js/features/dropzone.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export default async function createDropzone(el, opts) {
|
||||||
|
const [{ default: Dropzone }] = await Promise.all([
|
||||||
|
import(/* webpackChunkName: "dropzone" */'dropzone'),
|
||||||
|
import(/* webpackChunkName: "dropzone" */'dropzone/dist/dropzone.css'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
Dropzone.autoDiscover = false;
|
||||||
|
return new Dropzone(el, opts);
|
||||||
|
}
|
||||||
@@ -15,27 +15,22 @@ import initHighlight from './features/highlight.js';
|
|||||||
import initGitGraph from './features/gitGraph.js';
|
import initGitGraph from './features/gitGraph.js';
|
||||||
import initClipboard from './features/clipboard.js';
|
import initClipboard from './features/clipboard.js';
|
||||||
import initUserHeatmap from './features/userHeatmap.js';
|
import initUserHeatmap from './features/userHeatmap.js';
|
||||||
|
import createDropzone from './features/dropzone.js';
|
||||||
|
|
||||||
import ActivityTopAuthors from './components/ActivityTopAuthors.vue';
|
import ActivityTopAuthors from './components/ActivityTopAuthors.vue';
|
||||||
|
|
||||||
const { AppSubUrl, StaticUrlPrefix } = window.config;
|
const { AppSubUrl, StaticUrlPrefix, csrf } = window.config;
|
||||||
|
|
||||||
function htmlEncode(text) {
|
function htmlEncode(text) {
|
||||||
return jQuery('<div />').text(text).html();
|
return jQuery('<div />').text(text).html();
|
||||||
}
|
}
|
||||||
|
|
||||||
let csrf;
|
|
||||||
let previewFileModes;
|
let previewFileModes;
|
||||||
let simpleMDEditor;
|
let simpleMDEditor;
|
||||||
const commentMDEditors = {};
|
const commentMDEditors = {};
|
||||||
let codeMirrorEditor;
|
let codeMirrorEditor;
|
||||||
let hljs;
|
let hljs;
|
||||||
|
|
||||||
// Disable Dropzone auto-discover because it's manually initialized
|
|
||||||
if (typeof (Dropzone) !== 'undefined') {
|
|
||||||
Dropzone.autoDiscover = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Silence fomantic's error logging when tabs are used without a target content element
|
// Silence fomantic's error logging when tabs are used without a target content element
|
||||||
$.fn.tab.settings.silent = true;
|
$.fn.tab.settings.silent = true;
|
||||||
|
|
||||||
@@ -867,7 +862,7 @@ function initRepository() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Edit issue or comment content
|
// Edit issue or comment content
|
||||||
$('.edit-content').click(function (event) {
|
$('.edit-content').click(async function (event) {
|
||||||
$(this).closest('.dropdown').find('.menu').toggle('visible');
|
$(this).closest('.dropdown').find('.menu').toggle('visible');
|
||||||
const $segment = $(this).closest('.header').next();
|
const $segment = $(this).closest('.header').next();
|
||||||
const $editContentZone = $segment.find('.edit-content-zone');
|
const $editContentZone = $segment.find('.edit-content-zone');
|
||||||
@@ -883,12 +878,14 @@ function initRepository() {
|
|||||||
issuesTribute.attach($textarea.get());
|
issuesTribute.attach($textarea.get());
|
||||||
emojiTribute.attach($textarea.get());
|
emojiTribute.attach($textarea.get());
|
||||||
|
|
||||||
|
let dz;
|
||||||
const $dropzone = $editContentZone.find('.dropzone');
|
const $dropzone = $editContentZone.find('.dropzone');
|
||||||
$dropzone.data('saved', false);
|
|
||||||
const $files = $editContentZone.find('.comment-files');
|
const $files = $editContentZone.find('.comment-files');
|
||||||
if ($dropzone.length > 0) {
|
if ($dropzone.length > 0) {
|
||||||
|
$dropzone.data('saved', false);
|
||||||
|
|
||||||
const filenameDict = {};
|
const filenameDict = {};
|
||||||
$dropzone.dropzone({
|
dz = await createDropzone($dropzone[0], {
|
||||||
url: $dropzone.data('upload-url'),
|
url: $dropzone.data('upload-url'),
|
||||||
headers: { 'X-Csrf-Token': csrf },
|
headers: { 'X-Csrf-Token': csrf },
|
||||||
maxFiles: $dropzone.data('max-file'),
|
maxFiles: $dropzone.data('max-file'),
|
||||||
@@ -927,15 +924,14 @@ function initRepository() {
|
|||||||
});
|
});
|
||||||
this.on('reload', () => {
|
this.on('reload', () => {
|
||||||
$.getJSON($editContentZone.data('attachment-url'), (data) => {
|
$.getJSON($editContentZone.data('attachment-url'), (data) => {
|
||||||
const drop = $dropzone.get(0).dropzone;
|
dz.removeAllFiles(true);
|
||||||
drop.removeAllFiles(true);
|
|
||||||
$files.empty();
|
$files.empty();
|
||||||
$.each(data, function () {
|
$.each(data, function () {
|
||||||
const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;
|
const imgSrc = `${$dropzone.data('upload-url')}/${this.uuid}`;
|
||||||
drop.emit('addedfile', this);
|
dz.emit('addedfile', this);
|
||||||
drop.emit('thumbnail', this, imgSrc);
|
dz.emit('thumbnail', this, imgSrc);
|
||||||
drop.emit('complete', this);
|
dz.emit('complete', this);
|
||||||
drop.files.push(this);
|
dz.files.push(this);
|
||||||
filenameDict[this.name] = {
|
filenameDict[this.name] = {
|
||||||
submitted: true,
|
submitted: true,
|
||||||
uuid: this.uuid
|
uuid: this.uuid
|
||||||
@@ -948,7 +944,7 @@ function initRepository() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$dropzone.get(0).dropzone.emit('reload');
|
dz.emit('reload');
|
||||||
}
|
}
|
||||||
// Give new write/preview data-tab name to distinguish from others
|
// Give new write/preview data-tab name to distinguish from others
|
||||||
const $editContentForm = $editContentZone.find('.ui.comment.form');
|
const $editContentForm = $editContentZone.find('.ui.comment.form');
|
||||||
@@ -967,7 +963,7 @@ function initRepository() {
|
|||||||
$editContentZone.find('.cancel.button').click(() => {
|
$editContentZone.find('.cancel.button').click(() => {
|
||||||
$renderContent.show();
|
$renderContent.show();
|
||||||
$editContentZone.hide();
|
$editContentZone.hide();
|
||||||
$dropzone.get(0).dropzone.emit('reload');
|
dz.emit('reload');
|
||||||
});
|
});
|
||||||
$editContentZone.find('.save.button').click(() => {
|
$editContentZone.find('.save.button').click(() => {
|
||||||
$renderContent.show();
|
$renderContent.show();
|
||||||
@@ -1003,8 +999,8 @@ function initRepository() {
|
|||||||
} else {
|
} else {
|
||||||
$content.find('.ui.small.images').html(data.attachments);
|
$content.find('.ui.small.images').html(data.attachments);
|
||||||
}
|
}
|
||||||
$dropzone.get(0).dropzone.emit('submit');
|
dz.emit('submit');
|
||||||
$dropzone.get(0).dropzone.emit('reload');
|
dz.emit('reload');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -2366,8 +2362,6 @@ function initTemplateSearch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(async () => {
|
$(document).ready(async () => {
|
||||||
csrf = $('meta[name=_csrf]').attr('content');
|
|
||||||
|
|
||||||
// Show exact time
|
// Show exact time
|
||||||
$('.time-since').each(function () {
|
$('.time-since').each(function () {
|
||||||
$(this)
|
$(this)
|
||||||
@@ -2421,7 +2415,7 @@ $(document).ready(async () => {
|
|||||||
if ($dropzone.length > 0) {
|
if ($dropzone.length > 0) {
|
||||||
const filenameDict = {};
|
const filenameDict = {};
|
||||||
|
|
||||||
new Dropzone('#dropzone', {
|
await createDropzone('#dropzone', {
|
||||||
url: $dropzone.data('upload-url'),
|
url: $dropzone.data('upload-url'),
|
||||||
headers: { 'X-Csrf-Token': csrf },
|
headers: { 'X-Csrf-Token': csrf },
|
||||||
maxFiles: $dropzone.data('max-file'),
|
maxFiles: $dropzone.data('max-file'),
|
||||||
|
|||||||
@@ -192,6 +192,11 @@
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.task-list,
|
||||||
|
ol.task-list {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
ul ul,
|
ul ul,
|
||||||
ul ol,
|
ul ol,
|
||||||
ol ol,
|
ol ol,
|
||||||
|
|||||||
@@ -659,10 +659,14 @@
|
|||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
}
|
}
|
||||||
.branch-update.grid {
|
.branch-update.grid {
|
||||||
margin-bottom: -1.5rem;
|
|
||||||
margin-top: -.5rem;
|
|
||||||
.row {
|
.row {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
.icon {
|
||||||
|
margin-top: 1.1rem;
|
||||||
|
}
|
||||||
|
.ui.button {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const cssnano = require('cssnano');
|
const cssnano = require('cssnano');
|
||||||
const fastGlob = require('fast-glob');
|
const fastGlob = require('fast-glob');
|
||||||
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
|
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||||
@@ -191,6 +192,10 @@ module.exports = {
|
|||||||
new SpriteLoaderPlugin({
|
new SpriteLoaderPlugin({
|
||||||
plainSprite: true,
|
plainSprite: true,
|
||||||
}),
|
}),
|
||||||
|
new CopyPlugin([
|
||||||
|
// workaround for https://github.com/go-gitea/gitea/issues/10653
|
||||||
|
{ from: 'node_modules/fomantic-ui/dist/semantic.min.css', to: 'fomantic/semantic.min.css' },
|
||||||
|
]),
|
||||||
],
|
],
|
||||||
performance: {
|
performance: {
|
||||||
hints: isProduction ? 'warning' : false,
|
hints: isProduction ? 'warning' : false,
|
||||||
@@ -198,7 +203,7 @@ module.exports = {
|
|||||||
maxAssetSize: 512000,
|
maxAssetSize: 512000,
|
||||||
assetFilter: (filename) => {
|
assetFilter: (filename) => {
|
||||||
if (filename.endsWith('.map')) return false;
|
if (filename.endsWith('.map')) return false;
|
||||||
if (['js/swagger.js', 'js/highlight.js'].includes(filename)) return false;
|
if (['js/swagger.js', 'js/highlight.js', 'fomantic/semantic.min.css'].includes(filename)) return false;
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user