Skip to content

Commit 9895397

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated licenses and gitignores add built js files to eslint ignore (go-gitea#30737) Gitea with first upper case + typos (go-gitea#30739) Fix documentation build problems because of MDX syntax conflicts (go-gitea#30744) Remove disk-clean workflow (go-gitea#30741) Bump `github.com/google/go-github` to v61 (go-gitea#30738) Fix nil dereference on error (go-gitea#30740)
2 parents 207adbe + e671417 commit 9895397

File tree

15 files changed

+143
-47
lines changed

15 files changed

+143
-47
lines changed

.eslintrc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ reportUnusedDisableDirectives: true
44
ignorePatterns:
55
- /web_src/js/vendor
66
- /web_src/fomantic
7+
- /public/assets/js
78

89
parserOptions:
910
sourceType: module

.github/workflows/disk-clean.yml

-25
This file was deleted.

.github/workflows/release-nightly.yml

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
disk-clean:
13-
uses: ./.github/workflows/disk-clean.yml
1412
nightly-binary:
1513
runs-on: nscloud
1614
steps:

assets/go-licenses.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/backport/backport.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"strings"
1818
"syscall"
1919

20-
"github.com/google/go-github/v57/github"
20+
"github.com/google/go-github/v61/github"
2121
"github.com/urfave/cli/v2"
2222
"gopkg.in/yaml.v3"
2323
)

docs/content/administration/config-cheat-sheet.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ The following configuration set `Content-Type: application/vnd.android.package-a
214214
- `SITEMAP_PAGING_NUM`: **20**: Number of items that are displayed in a single subsitemap.
215215
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
216216
- `CODE_COMMENT_LINES`: **4**: Number of line of codes shown for a code comment.
217-
- `DEFAULT_THEME`: **gitea-auto**: Set the default theme for the Gitea installation, custom themes could be provided by "{CustomPath}/public/assets/css/theme-*.css".
217+
- `DEFAULT_THEME`: **gitea-auto**: Set the default theme for the Gitea installation, custom themes could be provided by `{CustomPath}/public/assets/css/theme-*.css`.
218218
- `SHOW_USER_EMAIL`: **true**: Whether the email of the user should be shown in the Explore Users page.
219-
- `THEMES`: **_empty_**: All available themes by "{CustomPath}/public/assets/css/theme-*.css". Allow users select personalized themes.
219+
- `THEMES`: **_empty_**: All available themes by `{CustomPath}/public/assets/css/theme-*.css`. Allow users select personalized themes.
220220
- `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB)
221221
- `AMBIGUOUS_UNICODE_DETECTION`: **true**: Detect ambiguous unicode characters in file contents and show warnings on the UI
222222
- `REACTIONS`: All available reactions users can choose on issues/prs and comments

docs/content/administration/config-cheat-sheet.zh-cn.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ menu:
212212
- `SITEMAP_PAGING_NUM`: **20**: 在单个子SiteMap中显示的项数。
213213
- `GRAPH_MAX_COMMIT_NUM`: **100**: 提交图中显示的最大commit数量。
214214
- `CODE_COMMENT_LINES`: **4**: 在代码评论中能够显示的最大代码行数。
215-
- `DEFAULT_THEME`: **gitea-auto**: 在Gitea安装时候设置的默认主题,自定义的主题可以通过 "{CustomPath}/public/assets/css/theme-*.css" 提供。
215+
- `DEFAULT_THEME`: **gitea-auto**: 在Gitea安装时候设置的默认主题,自定义的主题可以通过 `{CustomPath}/public/assets/css/theme-*.css` 提供。
216216
- `SHOW_USER_EMAIL`: **true**: 用户的电子邮件是否应该显示在`Explore Users`页面中。
217-
- `THEMES`: **_empty_**: 所有可用的主题(由 "{CustomPath}/public/assets/css/theme-*.css" 提供)。允许用户选择个性化的主题,
217+
- `THEMES`: **_empty_**: 所有可用的主题(由 `{CustomPath}/public/assets/css/theme-*.css` 提供)。允许用户选择个性化的主题,
218218
- `MAX_DISPLAY_FILE_SIZE`: **8388608**: 能够显示文件的最大大小(默认为8MiB)。
219219
- `REACTIONS`: 用户可以在问题(Issue)、Pull Request(PR)以及评论中选择的所有可选的反应。
220220
这些值可以是表情符号别名(例如::smile:)或Unicode表情符号。

docs/content/usage/repo-mirror.en-us.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The repository now gets mirrored periodically to the remote repository. You can
5858

5959
To set up a mirror from Gitea to GitHub, you need to follow these steps:
6060

61-
1. Create a [GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the *public_repo* box checked. Also check the **workflow** checkbox in case your repo using act for continuous integration.
61+
1. Create a [GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the *public_repo* box checked. Also check the **workflow** checkbox in case your repo uses GitHub Actions for continuous integration.
6262
2. Create a repository with that name on GitHub. Unlike Gitea, GitHub does not support creating repositories by pushing to the remote. You can also use an existing remote repo if it has the same commit history as your Gitea repo.
6363
3. In the settings of your Gitea repo, fill in the **Git Remote Repository URL**: `https://github.com/<your_github_group>/<your_github_project>.git`.
6464
4. Fill in the **Authorization** fields with your GitHub username and the personal access token as **Password**.
@@ -91,10 +91,10 @@ The repository pushes shortly thereafter. To force a push, select the **Synchron
9191

9292
### Mirror an existing ssh repository
9393

94-
Currently gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your gitea repository that pushes manually.
94+
Currently Gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your Gitea repository that pushes manually.
9595

96-
1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell.
97-
2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e.
96+
1. Make sure the user running Gitea has access to the git repo you are trying to mirror to from shell.
97+
2. On the web interface at the repository settings > git hooks add a post-receive hook for the mirror. I.e.
9898

9999
```
100100
#!/usr/bin/env bash

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ require (
5454
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
5555
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
5656
github.com/golang-jwt/jwt/v5 v5.2.1
57-
github.com/google/go-github/v57 v57.0.0
57+
github.com/google/go-github/v61 v61.0.0
5858
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7
5959
github.com/google/uuid v1.6.0
6060
github.com/gorilla/feeds v1.1.2

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
394394
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
395395
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
396396
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
397-
github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs=
398-
github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw=
397+
github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go=
398+
github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY=
399399
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
400400
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
401401
github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk=

options/license/Catharon

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
The Catharon Open Source LICENSE
2+
----------------------------
3+
4+
2000-Jul-04
5+
6+
Copyright (C) 2000 by Catharon Productions, Inc.
7+
8+
9+
10+
Introduction
11+
============
12+
13+
This license applies to source files distributed by Catharon
14+
Productions, Inc. in several archive packages. This license
15+
applies to all files found in such packages which do not fall
16+
under their own explicit license.
17+
18+
This license was inspired by the BSD, Artistic, and IJG
19+
(Independent JPEG Group) licenses, which all encourage inclusion
20+
and use of free software in commercial and freeware products
21+
alike. As a consequence, its main points are that:
22+
23+
o We don't promise that this software works. However, we are
24+
interested in any kind of bug reports. (`as is' distribution)
25+
26+
o You can use this software for whatever you want, in parts or
27+
full form, without having to pay us. (`royalty-free' usage)
28+
29+
o You may not pretend that you wrote this software. If you use
30+
it, or only parts of it, in a program, you must acknowledge
31+
somewhere in your documentation that you have used the
32+
Catharon Code. (`credits')
33+
34+
We specifically permit and encourage the inclusion of this
35+
software, with or without modifications, in commercial products.
36+
We disclaim all warranties covering the packages distributed by
37+
Catharon Productions, Inc. and assume no liability related to
38+
their use.
39+
40+
41+
Legal Terms
42+
===========
43+
44+
0. Definitions
45+
--------------
46+
47+
Throughout this license, the terms `Catharon Package', `package',
48+
and `Catharon Code' refer to the set of files originally
49+
distributed by Catharon Productions, Inc.
50+
51+
`You' refers to the licensee, or person using the project, where
52+
`using' is a generic term including compiling the project's source
53+
code as well as linking it to form a `program' or `executable'.
54+
This program is referred to as `a program using one of the
55+
Catharon Packages'.
56+
57+
This license applies to all files distributed in the original
58+
Catharon Package(s), including all source code, binaries and
59+
documentation, unless otherwise stated in the file in its
60+
original, unmodified form as distributed in the original archive.
61+
If you are unsure whether or not a particular file is covered by
62+
this license, you must contact us to verify this.
63+
64+
The Catharon Packages are copyright (C) 2000 by Catharon
65+
Productions, Inc. All rights reserved except as specified below.
66+
67+
1. No Warranty
68+
--------------
69+
70+
THE CATHARON PACKAGES ARE PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
71+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
72+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
73+
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
74+
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OF OR THE INABILITY TO
75+
USE THE CATHARON PACKAGE.
76+
77+
2. Redistribution
78+
-----------------
79+
80+
This license grants a worldwide, royalty-free, perpetual and
81+
irrevocable right and license to use, execute, perform, compile,
82+
display, copy, create derivative works of, distribute and
83+
sublicense the Catharon Packages (in both source and object code
84+
forms) and derivative works thereof for any purpose; and to
85+
authorize others to exercise some or all of the rights granted
86+
herein, subject to the following conditions:
87+
88+
o Redistribution of source code must retain this license file
89+
(`license.txt') unaltered; any additions, deletions or changes
90+
to the original files must be clearly indicated in
91+
accompanying documentation. The copyright notices of the
92+
unaltered, original files must be preserved in all copies of
93+
source files.
94+
95+
o Redistribution in binary form must provide a disclaimer that
96+
states that the software is based in part on the work of
97+
Catharon Productions, Inc. in the distribution documentation.
98+
99+
These conditions apply to any software derived from or based on
100+
the Catharon Packages, not just the unmodified files. If you use
101+
our work, you must acknowledge us. However, no fee need be paid
102+
to us.
103+
104+
3. Advertising
105+
--------------
106+
107+
Neither Catharon Productions, Inc. and contributors nor you shall
108+
use the name of the other for commercial, advertising, or
109+
promotional purposes without specific prior written permission.
110+
111+
We suggest, but do not require, that you use the following phrase
112+
to refer to this software in your documentation: 'this software is
113+
based in part on the Catharon Typography Project'.
114+
115+
As you have not signed this license, you are not required to
116+
accept it. However, as the Catharon Packages are copyrighted
117+
material, only this license, or another one contracted with the
118+
authors, grants you the right to use, distribute, and modify it.
119+
Therefore, by using, distributing, or modifying the Catharon
120+
Packages, you indicate that you understand and accept all the
121+
terms of this license.

routers/api/actions/artifacts.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,15 @@ func (ar artifactRoutes) downloadArtifact(ctx *ArtifactContext) {
466466
log.Error("Error getting artifact: %v", err)
467467
ctx.Error(http.StatusInternalServerError, err.Error())
468468
return
469-
} else if !exist {
469+
}
470+
if !exist {
470471
log.Error("artifact with ID %d does not exist", artifactID)
471472
ctx.Error(http.StatusNotFound, fmt.Sprintf("artifact with ID %d does not exist", artifactID))
472473
return
473474
}
474475
if artifact.RunID != runID {
475-
log.Error("Error dismatch runID and artifactID, task: %v, artifact: %v", runID, artifactID)
476-
ctx.Error(http.StatusBadRequest, err.Error())
476+
log.Error("Error mismatch runID and artifactID, task: %v, artifact: %v", runID, artifactID)
477+
ctx.Error(http.StatusBadRequest)
477478
return
478479
}
479480

routers/web/repo/actions/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func getRunJobs(ctx *context_module.Context, runIndex, jobIndex int64) (*actions
504504
return nil, nil
505505
}
506506
if len(jobs) == 0 {
507-
ctx.Error(http.StatusNotFound, err.Error())
507+
ctx.Error(http.StatusNotFound)
508508
return nil, nil
509509
}
510510

services/migrations/error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package migrations
77
import (
88
"errors"
99

10-
"github.com/google/go-github/v57/github"
10+
"github.com/google/go-github/v61/github"
1111
)
1212

1313
// ErrRepoNotCreated returns the error that repository not created

services/migrations/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"code.gitea.io/gitea/modules/proxy"
2121
"code.gitea.io/gitea/modules/structs"
2222

23-
"github.com/google/go-github/v57/github"
23+
"github.com/google/go-github/v61/github"
2424
"golang.org/x/oauth2"
2525
)
2626

0 commit comments

Comments
 (0)