diff --git a/.dockerignore b/.dockerignore index 1ce2a87611e81..2a4142088908e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -76,7 +76,6 @@ cpu.out /yarn-error.log /npm-debug.log* /public/js -/public/serviceworker.js /public/css /public/fonts /public/img/webpack diff --git a/.github/file-filters.yml b/.github/file-filters.yml deleted file mode 100644 index 26231c936423e..0000000000000 --- a/.github/file-filters.yml +++ /dev/null @@ -1,15 +0,0 @@ -docs: &docs - - "**/*.md" - - "docs/**" - -backend: &backend - - "**/*.go" - - "**/*.tmpl" - - "go.mod" - - "go.sum" - -frontend: &frontend - - "**/*.js" - - "web_src/**" - - "package.json" - - "package-lock.json" diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 2efd6767197d1..9a9c54720b453 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -1,32 +1,53 @@ -name: files changed +name: files-changed on: workflow_call: outputs: - docs: - description: "whether docs files changed" - value: ${{ jobs.files-changed.outputs.docs }} backend: description: "whether backend files changed" - value: ${{ jobs.files-changed.outputs.backend }} + value: ${{ jobs.detect.outputs.backend }} frontend: description: "whether frontend files changed" - value: ${{ jobs.files-changed.outputs.frontend }} + value: ${{ jobs.detect.outputs.frontend }} + docs: + description: "whether docs files changed" + value: ${{ jobs.detect.outputs.docs }} + actions: + description: "whether actions files changed" + value: ${{ jobs.detect.outputs.actions }} jobs: - files-changed: + detect: name: detect which files changed runs-on: ubuntu-latest timeout-minutes: 3 # Map a step output to a job output outputs: - docs: ${{ steps.changes.outputs.docs }} backend: ${{ steps.changes.outputs.backend }} frontend: ${{ steps.changes.outputs.frontend }} + docs: ${{ steps.changes.outputs.docs }} + actions: ${{ steps.changes.outputs.actions }} steps: - uses: actions/checkout@v3 - - name: Check for backend file changes - uses: dorny/paths-filter@v2 + - uses: dorny/paths-filter@v2 id: changes with: - filters: .github/file-filters.yml + filters: | + backend: + - "**/*.go" + - "**/*.tmpl" + - "go.mod" + - "go.sum" + + frontend: + - "**/*.js" + - "web_src/**" + - "package.json" + - "package-lock.json" + + docs: + - "**/*.md" + - "docs/**" + + actions: + - ".github/workflows/*" diff --git a/.github/workflows/pull-compliance-docs.yml b/.github/workflows/pull-compliance-docs.yml deleted file mode 100644 index 0f6720a64dccf..0000000000000 --- a/.github/workflows/pull-compliance-docs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: compliance-docs - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - files-changed: - uses: ./.github/workflows/files-changed.yml - - compliance-docs: - if: needs.files-changed.outputs.docs == 'true' - needs: files-changed - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: make deps-frontend - - run: make lint-md - - run: make docs # test if build could succeed diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index e108379b3096a..b7c1ab8a33c82 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -25,6 +25,7 @@ jobs: - run: make lint-backend env: TAGS: bindata sqlite sqlite_unlock_notify + lint-go-windows: if: needs.files-changed.outputs.backend == 'true' needs: files-changed @@ -41,6 +42,7 @@ jobs: TAGS: bindata sqlite sqlite_unlock_notify GOOS: windows GOARCH: amd64 + lint-go-gogit: if: needs.files-changed.outputs.backend == 'true' needs: files-changed @@ -55,6 +57,7 @@ jobs: - run: make lint-go env: TAGS: bindata gogit sqlite sqlite_unlock_notify + checks-backend: if: needs.files-changed.outputs.backend == 'true' needs: files-changed @@ -67,6 +70,7 @@ jobs: check-latest: true - run: make deps-backend deps-tools - run: make --always-make checks-backend # ensure the "go-licenses" make target runs + frontend: if: needs.files-changed.outputs.frontend == 'true' needs: files-changed @@ -79,6 +83,7 @@ jobs: - run: make deps-frontend - run: make lint-frontend - run: make checks-frontend + backend: if: needs.files-changed.outputs.backend == 'true' needs: files-changed @@ -113,3 +118,25 @@ jobs: env: GOOS: linux GOARCH: 386 + + docs: + if: needs.files-changed.outputs.docs == 'true' + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - run: make deps-frontend + - run: make lint-md + - run: make docs # test if build could succeed + + actions: + if: needs.files-changed.outputs.actions == 'true' + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + - run: make lint-actions diff --git a/.gitignore b/.gitignore index ad141c30cd9ad..7ae3455d469b7 100644 --- a/.gitignore +++ b/.gitignore @@ -77,7 +77,6 @@ cpu.out /yarn-error.log /npm-debug.log* /public/js -/public/serviceworker.js /public/css /public/fonts /public/img/webpack diff --git a/.ignore b/.ignore index a315e5b5b94cc..cd869d51cb924 100644 --- a/.ignore +++ b/.ignore @@ -1,5 +1,6 @@ *.min.css *.min.js +/assets/*.json /modules/options/bindata.go /modules/public/bindata.go /modules/templates/bindata.go diff --git a/Makefile b/Makefile index 16841796b78e3..664839273b55b 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ FOMANTIC_WORK_DIR := web_src/fomantic WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f) WEBPACK_CONFIGS := webpack.config.js WEBPACK_DEST := public/js/index.js public/css/index.css -WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack public/serviceworker.js +WEBPACK_DEST_ENTRIES := public/js public/css public/fonts public/img/webpack BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST)) diff --git a/assets/go-licenses.json b/assets/go-licenses.json index 49f18e7de70ae..3718741cc7f12 100644 --- a/assets/go-licenses.json +++ b/assets/go-licenses.json @@ -525,8 +525,8 @@ "licenseText": "Copyright (c) 2011 The Snappy-Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" }, { - "name": "github.com/google/go-github/v51/github", - "path": "github.com/google/go-github/v51/github/LICENSE", + "name": "github.com/google/go-github/v52/github", + "path": "github.com/google/go-github/v52/github/LICENSE", "licenseText": "Copyright (c) 2013 The go-github AUTHORS. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" }, { diff --git a/contrib/backport/backport.go b/contrib/backport/backport.go index 358f4ed3c814b..3027722583a91 100644 --- a/contrib/backport/backport.go +++ b/contrib/backport/backport.go @@ -17,7 +17,7 @@ import ( "strings" "syscall" - "github.com/google/go-github/v51/github" + "github.com/google/go-github/v52/github" "github.com/urfave/cli" "gopkg.in/yaml.v3" ) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 6b8eed1efc6f1..23dfefa0131b2 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1044,7 +1044,7 @@ LEVEL = Info ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; List of reasons why a Pull Request or Issue can be locked ;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam -;; Maximum number of pinned Issues +;; Maximum number of pinned Issues per repo ;; Set to 0 to disable pinning Issues ;MAX_PINNED = 3 @@ -1208,9 +1208,6 @@ LEVEL = Info ;; Whether to search within description at repository search on explore page. ;SEARCH_REPO_DESCRIPTION = true ;; -;; Whether to enable a Service Worker to cache frontend assets -;USE_SERVICE_WORKER = false -;; ;; Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used. ;; A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic). ;ONLY_SHOW_RELEVANT_REPOS = false diff --git a/docs/content/doc/administration/config-cheat-sheet.en-us.md b/docs/content/doc/administration/config-cheat-sheet.en-us.md index 4f58dc17734f0..e3612f37598c8 100644 --- a/docs/content/doc/administration/config-cheat-sheet.en-us.md +++ b/docs/content/doc/administration/config-cheat-sheet.en-us.md @@ -141,7 +141,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build ### Repository - Issue (`repository.issue`) - `LOCK_REASONS`: **Too heated,Off-topic,Resolved,Spam**: A list of reasons why a Pull Request or Issue can be locked -- `MAX_PINNED`: **3**: Maximum number of pinned Issues. Set to 0 to disable pinning Issues. +- `MAX_PINNED`: **3**: Maximum number of pinned Issues per Repo. Set to 0 to disable pinning Issues. ### Repository - Upload (`repository.upload`) @@ -230,7 +230,6 @@ The following configuration set `Content-Type: application/vnd.android.package-a add it to this config. - `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used. - `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page. -- `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets. - `ONLY_SHOW_RELEVANT_REPOS`: **false** Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used. A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic). diff --git a/docs/content/page/index.en-us.md b/docs/content/page/index.en-us.md index 16c7498d9c6a0..f986faf3a3c64 100644 --- a/docs/content/page/index.en-us.md +++ b/docs/content/page/index.en-us.md @@ -301,4 +301,4 @@ You can try it out using [the online demo](https://try.gitea.io/). ## Integrated support - Please visit [AWESOME GITEA] (https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support + Please visit [Awesome Gitea](https://gitea.com/gitea/awesome-gitea/) to get more third-party integrated support diff --git a/go.mod b/go.mod index b77e350f0ba1a..e92c08836e23b 100644 --- a/go.mod +++ b/go.mod @@ -55,7 +55,7 @@ require ( github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 github.com/golang-jwt/jwt/v4 v4.5.0 - github.com/google/go-github/v51 v51.0.0 + github.com/google/go-github/v52 v52.0.0 github.com/google/pprof v0.0.0-20230502171905-255e3b9b56de github.com/google/uuid v1.3.0 github.com/gorilla/feeds v1.1.1 @@ -107,10 +107,10 @@ require ( github.com/yuin/goldmark v1.5.4 github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87 github.com/yuin/goldmark-meta v1.1.0 - golang.org/x/crypto v0.8.0 + golang.org/x/crypto v0.9.0 golang.org/x/image v0.7.0 golang.org/x/net v0.10.0 - golang.org/x/oauth2 v0.7.0 + golang.org/x/oauth2 v0.8.0 golang.org/x/sys v0.8.0 golang.org/x/text v0.9.0 golang.org/x/tools v0.8.0 @@ -136,7 +136,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1 // indirect github.com/RoaringBitmap/roaring v1.2.3 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/andybalholm/brotli v1.0.5 // indirect diff --git a/go.sum b/go.sum index 8e5b728aac9de..0a3e409690e3b 100644 --- a/go.sum +++ b/go.sum @@ -105,8 +105,8 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756 h1:L6S7kR7SlhQKplIBpkra3s6yhcZV51lhRnXmYc4HohI= -github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE= +github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1 h1:JMDGhoQvXNTqH6Y3MC0IUw6tcZvaUdujNqzK2HYWZc8= +github.com/ProtonMail/go-crypto v0.0.0-20230528122434-6f98819771a1/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -227,6 +227,7 @@ github.com/bufbuild/connect-go v1.7.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrI github.com/buildkite/terminal-to-html/v3 v3.7.0 h1:chdLUSpiOj/A4v3dzxyOqixXI6aw7IDA6Dk77FXsvNU= github.com/buildkite/terminal-to-html/v3 v3.7.0/go.mod h1:g0ME1XqbkBSgXR9YmlIHcJIjzaMyWW+HbsG0rPb5puo= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/caddyserver/certmagic v0.17.2 h1:o30seC1T/dBqBCNNGNHWwj2i5/I/FMjBbTAhjADP3nE= github.com/caddyserver/certmagic v0.17.2/go.mod h1:ouWUuC490GOLJzkyN35eXfV8bSbwMwSf4bdhkIxtdQE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -564,8 +565,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v51 v51.0.0 h1:KCjsbgPV28VoRftdP+K2mQL16jniUsLAJknsOVKwHyU= -github.com/google/go-github/v51 v51.0.0/go.mod h1:kZj/rn/c1lSUbr/PFWl2hhusPV7a5XNYKcwPrd5L3Us= +github.com/google/go-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M= +github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-tpm v0.1.2-0.20190725015402-ae6dd98980d4/go.mod h1:H9HbmUG2YgV/PHITkO7p6wxEEj/v5nlsVWIwumwH2NI= @@ -1318,10 +1319,11 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1430,8 +1432,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/models/actions/runner.go b/models/actions/runner.go index f1638eb0baa9c..bf703c444b681 100644 --- a/models/actions/runner.go +++ b/models/actions/runner.go @@ -69,7 +69,11 @@ func (r *ActionRunner) BelongsToOwnerType() types.OwnerType { return types.OwnerTypeRepository } if r.OwnerID != 0 { - return types.OwnerTypeOrganization + if r.Owner.Type == user_model.UserTypeOrganization { + return types.OwnerTypeOrganization + } else if r.Owner.Type == user_model.UserTypeIndividual { + return types.OwnerTypeIndividual + } } return types.OwnerTypeSystemGlobal } diff --git a/models/issues/issue.go b/models/issues/issue.go index 5015824e9b34b..eab18f4892ce9 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -687,6 +687,8 @@ func (issue *Issue) HasOriginalAuthor() bool { return issue.OriginalAuthor != "" && issue.OriginalAuthorID != 0 } +var ErrIssueMaxPinReached = util.NewInvalidArgumentErrorf("the max number of pinned issues has been readched") + // IsPinned returns if a Issue is pinned func (issue *Issue) IsPinned() bool { return issue.PinOrder != 0 @@ -707,7 +709,7 @@ func (issue *Issue) Pin(ctx context.Context, user *user_model.User) error { // Check if the maximum allowed Pins reached if maxPin >= setting.Repository.Issue.MaxPinned { - return fmt.Errorf("You have reached the max number of pinned Issues") + return ErrIssueMaxPinReached } _, err = db.GetEngine(ctx).Table("issue"). @@ -856,10 +858,15 @@ func GetPinnedIssues(ctx context.Context, repoID int64, isPull bool) ([]*Issue, // IsNewPinnedAllowed returns if a new Issue or Pull request can be pinned func IsNewPinAllowed(ctx context.Context, repoID int64, isPull bool) (bool, error) { var maxPin int - _, err := db.GetEngine(ctx).SQL("SELECT MAX(pin_order) FROM issue WHERE repo_id = ? AND is_pull = ?", repoID, isPull).Get(&maxPin) + _, err := db.GetEngine(ctx).SQL("SELECT COUNT(pin_order) FROM issue WHERE repo_id = ? AND is_pull = ? AND pin_order > 0", repoID, isPull).Get(&maxPin) if err != nil { return false, err } return maxPin < setting.Repository.Issue.MaxPinned, nil } + +// IsErrIssueMaxPinReached returns if the error is, that the User can't pin more Issues +func IsErrIssueMaxPinReached(err error) bool { + return err == ErrIssueMaxPinReached +} diff --git a/modules/git/ref.go b/modules/git/ref.go index d3d1320e5065c..73095f8dbee35 100644 --- a/modules/git/ref.go +++ b/modules/git/ref.go @@ -53,6 +53,11 @@ func (ref *Reference) Commit() (*Commit, error) { return ref.repo.getCommit(ref.Object) } +// ShortName returns the short name of the reference +func (ref *Reference) ShortName() string { + return RefName(ref.Name).ShortName() +} + // RefGroup returns the group type of the reference func (ref *Reference) RefGroup() string { return RefName(ref.Name).RefGroup() diff --git a/modules/setting/ui.go b/modules/setting/ui.go index aa2c64019bfcb..41438db40d5e7 100644 --- a/modules/setting/ui.go +++ b/modules/setting/ui.go @@ -32,7 +32,6 @@ var UI = struct { CustomEmojis []string CustomEmojisMap map[string]string `ini:"-"` SearchRepoDescription bool - UseServiceWorker bool OnlyShowRelevantRepos bool Notification struct { @@ -136,7 +135,6 @@ func loadUIFrom(rootCfg ConfigProvider) { UI.ShowUserEmail = sec.Key("SHOW_USER_EMAIL").MustBool(true) UI.DefaultShowFullName = sec.Key("DEFAULT_SHOW_FULL_NAME").MustBool(false) UI.SearchRepoDescription = sec.Key("SEARCH_REPO_DESCRIPTION").MustBool(true) - UI.UseServiceWorker = sec.Key("USE_SERVICE_WORKER").MustBool(false) // OnlyShowRelevantRepos=false is important for many private/enterprise instances, // because many private repositories do not have "description/topic", users just want to search by their names. diff --git a/modules/templates/helper.go b/modules/templates/helper.go index cae7452306e0f..2f2ef44049794 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -127,9 +127,6 @@ func NewFuncMap() template.FuncMap { "MetaKeywords": func() string { return setting.UI.Meta.Keywords }, - "UseServiceWorker": func() bool { - return setting.UI.UseServiceWorker - }, "EnableTimetracking": func() bool { return setting.Service.EnableTimetracking }, diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index e4fb50bbcb364..bf6e4b75247f3 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -125,6 +125,10 @@ concept_user_individual = Individual concept_code_repository = Repository concept_user_organization = Organization +show_timestamps = Show timestamps +show_log_seconds = Show seconds +show_full_screen = Show full screen + [aria] navbar = Navigation Bar footer = Footer diff --git a/package-lock.json b/package-lock.json index 1620267030544..5e077b8a98ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,8 +51,6 @@ "vue3-calendar-heatmap": "2.0.5", "webpack": "5.84.1", "webpack-cli": "5.1.1", - "workbox-routing": "6.6.0", - "workbox-strategies": "6.6.0", "wrap-ansi": "8.1.0" }, "devDependencies": { @@ -11045,27 +11043,6 @@ "node": ">=0.10.0" } }, - "node_modules/workbox-core": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.6.0.tgz", - "integrity": "sha512-GDtFRF7Yg3DD859PMbPAYPeJyg5gJYXuBQAC+wyrWuuXgpfoOrIQIvFRZnQ7+czTIQjIr1DhLEGFzZanAT/3bQ==" - }, - "node_modules/workbox-routing": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.6.0.tgz", - "integrity": "sha512-x8gdN7VDBiLC03izAZRfU+WKUXJnbqt6PG9Uh0XuPRzJPpZGLKce/FkOX95dWHRpOHWLEq8RXzjW0O+POSkKvw==", - "dependencies": { - "workbox-core": "6.6.0" - } - }, - "node_modules/workbox-strategies": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.6.0.tgz", - "integrity": "sha512-eC07XGuINAKUWDnZeIPdRdVja4JQtTuc35TZ8SwMb1ztjp7Ddq2CJ4yqLvWzFWGlYI7CG/YGqaETntTxBGdKgQ==", - "dependencies": { - "workbox-core": "6.6.0" - } - }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", diff --git a/package.json b/package.json index 72563f8bf7956..73ce86f333fc0 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,6 @@ "vue3-calendar-heatmap": "2.0.5", "webpack": "5.84.1", "webpack-cli": "5.1.1", - "workbox-routing": "6.6.0", - "workbox-strategies": "6.6.0", "wrap-ansi": "8.1.0" }, "devDependencies": { diff --git a/routers/api/v1/repo/issue_pin.go b/routers/api/v1/repo/issue_pin.go index c96ede45f51b4..1e774d4afa07a 100644 --- a/routers/api/v1/repo/issue_pin.go +++ b/routers/api/v1/repo/issue_pin.go @@ -45,6 +45,8 @@ func PinIssue(ctx *context.APIContext) { if err != nil { if issues_model.IsErrIssueNotExist(err) { ctx.NotFound() + } else if issues_model.IsErrIssueMaxPinReached(err) { + ctx.Error(http.StatusBadRequest, "MaxPinReached", err) } else { ctx.Error(http.StatusInternalServerError, "GetIssueByIndex", err) } @@ -55,11 +57,13 @@ func PinIssue(ctx *context.APIContext) { err = issue.LoadRepo(ctx) if err != nil { ctx.Error(http.StatusInternalServerError, "LoadRepo", err) + return } err = issue.Pin(ctx, ctx.Doer) if err != nil { ctx.Error(http.StatusInternalServerError, "PinIssue", err) + return } ctx.Status(http.StatusNoContent) @@ -108,11 +112,13 @@ func UnpinIssue(ctx *context.APIContext) { err = issue.LoadRepo(ctx) if err != nil { ctx.Error(http.StatusInternalServerError, "LoadRepo", err) + return } err = issue.Unpin(ctx, ctx.Doer) if err != nil { ctx.Error(http.StatusInternalServerError, "UnpinIssue", err) + return } ctx.Status(http.StatusNoContent) @@ -166,6 +172,7 @@ func MoveIssuePin(ctx *context.APIContext) { err = issue.MovePin(ctx, int(ctx.ParamsInt64(":position"))) if err != nil { ctx.Error(http.StatusInternalServerError, "MovePin", err) + return } ctx.Status(http.StatusNoContent) @@ -193,12 +200,12 @@ func ListPinnedIssues(ctx *context.APIContext) { // "200": // "$ref": "#/responses/IssueList" issues, err := issues_model.GetPinnedIssues(ctx, ctx.Repo.Repository.ID, false) - - if err == nil { - ctx.JSON(http.StatusOK, convert.ToAPIIssueList(ctx, issues)) - } else { + if err != nil { ctx.Error(http.StatusInternalServerError, "LoadPinnedIssues", err) + return } + + ctx.JSON(http.StatusOK, convert.ToAPIIssueList(ctx, issues)) } // ListPinnedPullRequests returns a list of all pinned PRs @@ -225,6 +232,7 @@ func ListPinnedPullRequests(ctx *context.APIContext) { issues, err := issues_model.GetPinnedIssues(ctx, ctx.Repo.Repository.ID, true) if err != nil { ctx.Error(http.StatusInternalServerError, "LoadPinnedPullRequests", err) + return } apiPrs := make([]*api.PullRequest, len(issues)) diff --git a/routers/web/repo/issue_pin.go b/routers/web/repo/issue_pin.go index 13f2d02fe8450..6586372fc5310 100644 --- a/routers/web/repo/issue_pin.go +++ b/routers/web/repo/issue_pin.go @@ -9,6 +9,7 @@ import ( issues_model "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" ) // IssuePinOrUnpin pin or unpin a Issue @@ -19,12 +20,14 @@ func IssuePinOrUnpin(ctx *context.Context) { err := issue.LoadRepo(ctx) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } err = issue.PinOrUnpin(ctx, ctx.Doer) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } @@ -33,9 +36,10 @@ func IssuePinOrUnpin(ctx *context.Context) { // IssueUnpin unpins a Issue func IssueUnpin(ctx *context.Context) { - issue, err := issues_model.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) + issue, err := issues_model.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { - ctx.Status(http.StatusNoContent) + ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } @@ -43,12 +47,15 @@ func IssueUnpin(ctx *context.Context) { err = issue.LoadRepo(ctx) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } err = issue.Unpin(ctx, ctx.Doer) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) + return } ctx.Status(http.StatusNoContent) @@ -69,18 +76,21 @@ func IssuePinMove(ctx *context.Context) { form := &movePinIssueForm{} if err := json.NewDecoder(ctx.Req.Body).Decode(&form); err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } issue, err := issues_model.GetIssueByID(ctx, form.ID) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } err = issue.MovePin(ctx, form.Position) if err != nil { ctx.Status(http.StatusInternalServerError) + log.Error(err.Error()) return } diff --git a/routers/web/repo/setting/runners.go b/routers/web/repo/setting/runners.go index e8ad6358261c0..2c192e9790a69 100644 --- a/routers/web/repo/setting/runners.go +++ b/routers/web/repo/setting/runners.go @@ -21,9 +21,11 @@ const ( tplRepoRunners base.TplName = "repo/settings/actions" tplOrgRunners base.TplName = "org/settings/actions" tplAdminRunners base.TplName = "admin/actions" + tplUserRunners base.TplName = "user/settings/actions" tplRepoRunnerEdit base.TplName = "repo/settings/runner_edit" tplOrgRunnerEdit base.TplName = "org/settings/runners_edit" tplAdminRunnerEdit base.TplName = "admin/runners/edit" + tplUserRunnerEdit base.TplName = "user/settings/runner_edit" ) type runnersCtx struct { @@ -32,6 +34,7 @@ type runnersCtx struct { IsRepo bool IsOrg bool IsAdmin bool + IsUser bool RunnersTemplate base.TplName RunnerEditTemplate base.TplName RedirectLink string @@ -71,6 +74,17 @@ func getRunnersCtx(ctx *context.Context) (*runnersCtx, error) { }, nil } + if ctx.Data["PageIsUserSettings"] == true { + return &runnersCtx{ + OwnerID: ctx.Doer.ID, + RepoID: 0, + IsUser: true, + RunnersTemplate: tplUserRunners, + RunnerEditTemplate: tplUserRunnerEdit, + RedirectLink: setting.AppSubURL + "/user/settings/actions/runners/", + }, nil + } + return nil, errors.New("unable to set Runners context") } @@ -102,7 +116,7 @@ func Runners(ctx *context.Context) { if rCtx.IsRepo { opts.RepoID = rCtx.RepoID opts.WithAvailable = true - } else if rCtx.IsOrg { + } else if rCtx.IsOrg || rCtx.IsUser { opts.OwnerID = rCtx.OwnerID opts.WithAvailable = true } diff --git a/routers/web/user/setting/secrets.go b/routers/web/user/setting/runner.go similarity index 80% rename from routers/web/user/setting/secrets.go rename to routers/web/user/setting/runner.go index eb09477bdb005..451fd0ca97afa 100644 --- a/routers/web/user/setting/secrets.go +++ b/routers/web/user/setting/runner.go @@ -9,5 +9,5 @@ import ( ) func RedirectToDefaultSetting(ctx *context.Context) { - ctx.Redirect(setting.AppSubURL + "/user/settings/actions/secrets") + ctx.Redirect(setting.AppSubURL + "/user/settings/actions/runners") } diff --git a/routers/web/web.go b/routers/web/web.go index a38638c48340f..ef47b6679fdb0 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -492,6 +492,7 @@ func registerRoutes(m *web.Route) { m.Group("/actions", func() { m.Get("", user_setting.RedirectToDefaultSetting) + addSettingsRunnersRoutes() addSettingsSecretsRoutes() }, actions.MustEnableActions) @@ -1025,8 +1026,8 @@ func registerRoutes(m *web.Route) { m.Post("/resolve_conversation", reqRepoIssuesOrPullsReader, repo.UpdateResolveConversation) m.Post("/attachments", repo.UploadIssueAttachment) m.Post("/attachments/remove", repo.DeleteAttachment) - m.Delete("/unpin/{id}", reqRepoAdmin, repo.IssueUnpin) - m.Post("/pin_move", reqRepoAdmin, repo.IssuePinMove) + m.Delete("/unpin/{index}", reqRepoAdmin, repo.IssueUnpin) + m.Post("/move_pin", reqRepoAdmin, repo.IssuePinMove) }, context.RepoMustNotBeArchived()) m.Group("/comments/{id}", func() { m.Post("", repo.UpdateCommentContent) diff --git a/services/migrations/error.go b/services/migrations/error.go index 5f0388a497765..a89105a00741f 100644 --- a/services/migrations/error.go +++ b/services/migrations/error.go @@ -7,7 +7,7 @@ package migrations import ( "errors" - "github.com/google/go-github/v51/github" + "github.com/google/go-github/v52/github" ) // ErrRepoNotCreated returns the error that repository not created diff --git a/services/migrations/github.go b/services/migrations/github.go index ca6e037b68cd6..cc8bb534078f4 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -20,7 +20,7 @@ import ( "code.gitea.io/gitea/modules/proxy" "code.gitea.io/gitea/modules/structs" - "github.com/google/go-github/v51/github" + "github.com/google/go-github/v52/github" "golang.org/x/oauth2" ) @@ -256,11 +256,11 @@ func (g *GithubDownloaderV3) GetMilestones() ([]*base.Milestone, error) { milestones = append(milestones, &base.Milestone{ Title: m.GetTitle(), Description: m.GetDescription(), - Deadline: convertGithubTimestampToTime(m.DueOn), + Deadline: m.DueOn.GetTime(), State: state, Created: m.GetCreatedAt().Time, - Updated: convertGithubTimestampToTime(m.UpdatedAt), - Closed: convertGithubTimestampToTime(m.ClosedAt), + Updated: m.UpdatedAt.GetTime(), + Closed: m.ClosedAt.GetTime(), }) } if len(ms) < perPage { @@ -715,11 +715,11 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq State: pr.GetState(), Created: pr.GetCreatedAt().Time, Updated: pr.GetUpdatedAt().Time, - Closed: convertGithubTimestampToTime(pr.ClosedAt), + Closed: pr.ClosedAt.GetTime(), Labels: labels, Merged: pr.MergedAt != nil, MergeCommitSHA: pr.GetMergeCommitSHA(), - MergedTime: convertGithubTimestampToTime(pr.MergedAt), + MergedTime: pr.MergedAt.GetTime(), IsLocked: pr.ActiveLockReason != nil, Head: base.PullRequestBranch{ Ref: pr.GetHead().GetRef(), @@ -878,10 +878,3 @@ func (g *GithubDownloaderV3) GetReviews(reviewable base.Reviewable) ([]*base.Rev } return allReviews, nil } - -func convertGithubTimestampToTime(t *github.Timestamp) *time.Time { - if t == nil { - return nil - } - return &t.Time -} diff --git a/templates/admin/cron.tmpl b/templates/admin/cron.tmpl index fe3c88aec1d68..c15461943512c 100644 --- a/templates/admin/cron.tmpl +++ b/templates/admin/cron.tmpl @@ -5,7 +5,7 @@
- +
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 91a84aebf5514..e7d986ee17b88 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -19,7 +19,7 @@
{{.CsrfTokenHtml}} -
+
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 00d21f24b0010..4e982234de644 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -166,7 +166,7 @@ -
+
@@ -179,7 +179,7 @@
-
+
@@ -197,17 +197,17 @@ {{svg "octicon-trash"}} {{.locale.Tr "settings.delete_account_title"}}
-
-

{{.locale.Tr "settings.delete_account_desc"}}

-
- {{$.CsrfTokenHtml}} -
-
- - +
+

{{.locale.Tr "settings.delete_account_desc"}}

+ {{$.CsrfTokenHtml}} +
+
+ + +
+

{{.locale.Tr "admin.users.purge_help"}}

-

{{.locale.Tr "admin.users.purge_help"}}

{{template "base/modal_actions_confirm" .}} diff --git a/templates/base/head_script.tmpl b/templates/base/head_script.tmpl index 670d146b56a04..4e1dffa474a2c 100644 --- a/templates/base/head_script.tmpl +++ b/templates/base/head_script.tmpl @@ -12,7 +12,6 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly. assetUrlPrefix: '{{AssetUrlPrefix}}', runModeIsProd: {{.RunModeIsProd}}, customEmojis: {{CustomEmojis}}, - useServiceWorker: {{UseServiceWorker}}, csrfToken: '{{.CsrfToken}}', pageData: {{.PageData}}, notificationSettings: {{NotificationSettings}}, {{/*a map provided by NewFuncMap in helper.go*/}} diff --git a/templates/repo/actions/view.tmpl b/templates/repo/actions/view.tmpl index 3a3a069cbc8a7..297232fca0c5a 100644 --- a/templates/repo/actions/view.tmpl +++ b/templates/repo/actions/view.tmpl @@ -19,6 +19,9 @@ data-locale-status-skipped="{{.locale.Tr "actions.status.skipped"}}" data-locale-status-blocked="{{.locale.Tr "actions.status.blocked"}}" data-locale-artifacts-title="{{$.locale.Tr "artifacts"}}" + data-locale-show-timestamps="{{.locale.Tr "show_timestamps"}}" + data-locale-show-log-seconds="{{.locale.Tr "show_log_seconds"}}" + data-locale-show-full-screen="{{.locale.Tr "show_full_screen"}}" >
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 132f999808cc6..490465ea12fb1 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -45,33 +45,31 @@ {{end}} - +
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index dab6652d2172e..05aa86fd79884 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -6,7 +6,7 @@ {{if .PinnedIssues}}
{{range .PinnedIssues}} -
+
{{if eq $.Project.CardType 1}}
{{range (index $.issuesAttachmentMap .ID)}} @@ -21,7 +21,7 @@
{{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{if $.IsRepoAdmin}} - + {{svg "octicon-x" 16}} {{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 18a5b044639a4..e54c8a23a2141 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -330,7 +330,7 @@
-
+

{{.locale.Tr "repo.settings.external_wiki_url_desc"}}

@@ -362,7 +362,7 @@
-
+
{{if .Repository.CanEnableTimetracker}}
@@ -398,7 +398,7 @@
-
+
diff --git a/templates/user/settings/actions.tmpl b/templates/user/settings/actions.tmpl index 4d56523587bc8..57cdae446966c 100644 --- a/templates/user/settings/actions.tmpl +++ b/templates/user/settings/actions.tmpl @@ -2,6 +2,8 @@
{{if eq .PageType "secrets"}} {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} {{end}}
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl index b79308419bfc6..26f49820293b1 100644 --- a/templates/user/settings/navbar.tmpl +++ b/templates/user/settings/navbar.tmpl @@ -23,6 +23,9 @@
{{.locale.Tr "actions.actions"}}
-
+
@@ -118,7 +118,7 @@
-
+
diff --git a/templates/user/settings/runner_edit.tmpl b/templates/user/settings/runner_edit.tmpl new file mode 100644 index 0000000000000..90c58c16da625 --- /dev/null +++ b/templates/user/settings/runner_edit.tmpl @@ -0,0 +1,5 @@ +{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings runners")}} +
+ {{template "shared/actions/runner_edit" .}} +
+{{template "user/settings/layout_footer" .}} diff --git a/web_src/css/base.css b/web_src/css/base.css index 204a9f0ce9969..3c32eb6045c4d 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -74,12 +74,15 @@ --color-secondary-alpha-90: #dededee1; --color-secondary-hover: var(--color-secondary-dark-1); --color-secondary-active: var(--color-secondary-dark-2); - /* console colors */ - --color-console-fg: #ffffff; - --color-console-bg: #252a2f; - --color-console-border: #ffffff16; + /* console colors - used for actions console and console files */ + --color-console-fg: #eeeff2; + --color-console-fg-subtle: #959cab; + --color-console-bg: #262936; + --color-console-border: #383c47; --color-console-hover-bg: #ffffff16; - --color-console-active-bg: #353a3f; + --color-console-active-bg: #454a57; + --color-console-menu-bg: #383c47; + --color-console-menu-border: #5c6374; /* named colors */ --color-red: #db2828; --color-orange: #f2711c; @@ -553,7 +556,7 @@ a.label, color: var(--color-text-light-3); } -.ui.menu .item::before { +.ui.menu .item::before, .ui.vertical.menu .item::before { background: var(--color-secondary); } @@ -603,6 +606,7 @@ a.label, .ui.dropdown .menu .active.item { color: var(--color-text); background: var(--color-active); + border-radius: 0; font-weight: var(--font-weight-normal); } @@ -847,6 +851,7 @@ a.label, .ui.table > thead > tr > th { background: var(--color-box-header); + border-color: var(--color-secondary); color: var(--color-text); } diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 05f0019020e70..1f870658d5f75 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -3419,14 +3419,6 @@ tbody.commit-list { background: var(--color-card); } -.pinned-issue-card .meta a { - color: inherit; -} - -.pinned-issue-card .meta a:hover { - color: var(--color-primary); -} - .pinned-issue-icon, .pinned-issue-unpin { margin-top: 1px; diff --git a/web_src/css/themes/theme-arc-green.css b/web_src/css/themes/theme-arc-green.css index 3c2a81470fd2c..f6321c9ed7799 100644 --- a/web_src/css/themes/theme-arc-green.css +++ b/web_src/css/themes/theme-arc-green.css @@ -60,12 +60,15 @@ --color-secondary-alpha-90: #525767e1; --color-secondary-hover: var(--color-secondary-light-1); --color-secondary-active: var(--color-secondary-light-2); - /* console colors */ - --color-console-fg: #ffffff; + /* console colors - used for actions console and console files */ + --color-console-fg: #eeeff2; + --color-console-fg-subtle: #959cab; --color-console-bg: #262936; - --color-console-border: #ffffff16; + --color-console-border: #383c47; --color-console-hover-bg: #ffffff16; - --color-console-active-bg: #383c47; + --color-console-active-bg: #454a57; + --color-console-menu-bg: #383c47; + --color-console-menu-border: #5c6374; /* named colors */ --color-red: #cc4848; --color-orange: #cc580c; diff --git a/web_src/js/components/DiffFileList.vue b/web_src/js/components/DiffFileList.vue index 658357a887054..131be01811ce5 100644 --- a/web_src/js/components/DiffFileList.vue +++ b/web_src/js/components/DiffFileList.vue @@ -1,10 +1,10 @@
{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}