Commit graph

13571 commits

Author SHA1 Message Date
08cb2d6d34
Fix typos in FEDERATION.md 2022-07-17 11:09:10 -05:00
48deb8e1f5
Fix repo AP outbox path typo 2022-07-16 21:10:28 -05:00
f1577c2f62
Merge remote-tracking branch 'upstream/main' 2022-07-16 20:35:16 -05:00
705706bc00
Generate person outbox for only repo creates and stars 2022-07-16 20:33:28 -05:00
b491a2ec34
Update FEDERATION.md with a more accurate description of federated issues and PRs 2022-07-16 20:32:41 -05:00
CLanguagePurist
17ce5f8660 [skip ci] Updated licenses and gitignores 2022-07-17 00:20:41 +00:00
CLanguagePurist
6247a1dd5d
Comment on PrivateUsers option for gitea.service (#20383)
* Comment on PrivateUsers option for gitea.service

A user happens to encounter an issue where PrivateUsers sandboxed Gitea.service and it effectively stop systemd from applying capabilities for that gitea.service. I am opening this PR to provide comments on PrivateUsers, effectively a tiny FAQ information for end-user.
2022-07-16 14:58:56 +02:00
wxiaoguang
ce8e06f9f3 [skip ci] Updated translations via Crowdin 2022-07-16 00:20:56 +00:00
wxiaoguang
fee0e4dbea
Remove confusing TrimPrefix(... git.BranchPrefix) (#20369)
Make Repository.GetDefaultBranch return the real branch name, instead of the ref name. Then there is no need to do TrimPrefix for repo.DefaultBranch
2022-07-16 08:10:02 +08:00
Gusted
57e0bf43eb
Set target on create release with existing tag (#20381)
When you create a new release(e.g. via Tea) and specify a tag that already exists on
the repository, Gitea will instead use the `UpdateRelease`
functionality. However it currently doesn't set the Target field. This
PR fixes that.
2022-07-15 20:39:03 +02:00
zeripath
dbd3b7f9fd
Initialize cron last (#20373)
Cron will try to run certain things at startup but these depend on multiple things
being set-up. Therefore we should initialize cron last.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-07-15 16:20:05 +01:00
a1012112796
4f267ef643
Allow access to the Public Organization Member lists with minimal permissions (#20330)
Examining Organization membership should not necessarily require sign-in if the organization is public and the members are public. Therefore we should adjust `/org/{org}/members` to not require login.

Fix #7501

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: zeripath <art27@cantab.net>
2022-07-15 15:21:54 +01:00
silverwind
7d20c8323a
Fix commit status icon when in subdirectory (#20285)
When viewing a subdirectory and the latest commit to that directory in
the table, the commit status icon incorrectly showed the status of the
HEAD commit instead of the latest for that directory.
2022-07-15 14:01:32 +01:00
silverwind
4c0fce8f7b
Fix eslint parsing errors, remove eslint-plugin-html (#20323)
Introduce a separate .eslintrc in the Vue components folder to
selectively enable vue-eslint-parser there, so that the rest of the
files can use eslint's core parser which can deal with hashbangs.

The fact that the eslint-disable comments worked in HTML was a
unintended side-effect of the files being parsed via vue-eslint-parser,
so I had to disable the parsing of these files in .eslintrc.yaml to make
it work, and finally decided to remove eslint-plugin-html as it causes
more issues than it solves.
2022-07-15 17:38:18 +08:00
Baekjun Kim
e35a39e81d
Include login_name in adminCreateUser response (#20283)
`login_name` (Authentication Sign-in Name) is not included in the response of `adminUserCreate` API. 
This PR is to return user-specified `login_name` if there is one.
2022-07-15 16:52:11 +08:00
Bian Jiaping
e49ef56dde
Add allow_rebase_update, default_delete_branch_after_merge to repository api response (#20079)
`PATCH /repos/{owner}/{repo}` API allows users to update `allow_rebase_update`, `default_delete_branch_after_merge`, but `GET /repos/{owner}/{repo}` API does not return these two options, and API users has no other ways to find the state of these two options.

This PR add `allow_rebase_update`, `default_delete_branch_after_merge` to repository query api response.
2022-07-15 16:00:01 +08:00
Gusted
edd945bca3
Allow to specify colors for text in markup (#20363)
`<span style="color: red">Hello World!</span>` will now be accepted by
Bluemonday, other properties are still disallowed by Bluemonday.
2022-07-15 14:38:10 +08:00
6543
4ddae2c1b5 [skip ci] Updated translations via Crowdin 2022-07-15 00:20:57 +00:00
6543
1818149527
update xorm.io/xorm v1.3.2-0.20220714055524-c3bce556200f (#20371)
Xorm 1.3.2-0.20220714055524 contains a fix for interpreting db column sizes. Prior to this fix xorm would assume that the size of a column was within the range of an `int`. This is correct on 64bit machines where `int` is typical equivalent to `int64` however, on 32bit machines `int` tends to be `int32`. 

Unfortunately the size of a LONGTEXT field is actually `max_uint32`, thus using `strconv.Atoi` on these fields will fail and thus #20161 occurs on 32 bit arm. Xorm 1.3.2-0.20220714055524 changes this field to use int64 instead.

Fix  #20161
2022-07-14 19:40:30 +01:00
Tyrone Yeh
931c02d152
Add order by for assignee no sort issue (#20053)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-14 18:00:10 +02:00
a1012112796
f85bb6f70b
Make sure repo_dir is an empty directory or doesn't exist before 'dump-repo' (#20205) 2022-07-14 21:52:18 +08:00
Jeremy
725f9e40b3
Fix English mistakes in some Markdown documents (#20274) 2022-07-14 19:15:35 +08:00
silverwind
7740779b28
Fix versions check for busybox sh (#20358)
`printf` in busybox emits a ugly 'invalid number' error when formatting
string variables are present. Avoid that by reducing the go version
check to just two digits, which ought to be enough as patch-level go
versions are meant to be compatible. Avoid error on node-check as well.
2022-07-14 16:58:14 +08:00
silverwind
aec6b30e2a
Unbreak release pipeline (#20356)
Downgrade release pipeline to node 16 until xgo updates its base OS to a
version with a compatible glibc.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-14 16:09:26 +08:00
zeripath
bffa303020
Add option to purge users (#18064)
Add the ability to purge users when deleting them.

Close #15588

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-07-14 08:22:09 +01:00
1b4cd987b2
Merge remote-tracking branch 'upstream/main' 2022-07-13 22:36:00 -05:00
0609d7175c
Add more TODO notes 2022-07-13 22:11:24 -05:00
56717396fd
Big refactor: Improve inbox handling logic, move some IRI stuff to iri.go 2022-07-13 22:10:03 -05:00
Baoshuo Ren
175705356c
Fix icon margin in user/settings/repos (#20281) 2022-07-14 11:03:31 +08:00
Tyrone Yeh
715042c5bb
Fix org label open count, including close count issue (#20353)
Fixed using organization tags to see open issues in the tag list including closed issues count
2022-07-14 04:09:03 +02:00
zeripath
ed094dbab9 [skip ci] Updated translations via Crowdin 2022-07-14 00:21:35 +00:00
zeripath
fe09ee564d
Prevent context deadline error propagation in GetCommitsInfo (#20346)
* Prevent context deadline error propagation in GetCommitsInfo

Although `WalkGitLog` tries to test for `context.DeadlineExceededErr`
there is a small chance that the error will propagate to the reader
before it is recognised. This will cause the error to propagate up to
`renderDirectoryFiles` and cause a http status 500.

Here we check that the error passed is a `DeadlineExceededErr` via error.Is

Fix #20329

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-07-14 00:24:29 +02:00
Gusted
07ec8288bf
Add missing return for when topic isn't found (#20351)
Add missing return to DeleteTopic API when the topic is not found.
2022-07-13 18:39:19 +01:00
a63b2be21b
Merge remote-tracking branch 'upstream/main' 2022-07-13 12:14:35 -05:00
63aa270a2e
Initial implementation of federated pull requests 2022-07-13 12:14:14 -05:00
silverwind
9cd1f38f70
Upgrade to Node 18 on CI (#20340)
* Upgrade to Node 18 on CI

Should be pretty stable now.

* restart ci

Co-authored-by: 6543 <6543@obermui.de>
2022-07-13 11:45:08 -04:00
Ing. Jaroslav Šafka
8420c1bf4c
Fix checks in PR for empty commits #19603 (#20290)
* Fixes issue #19603 (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in #19738
2022-07-13 16:22:51 +08:00
Gusted
b7c6ec91ba
Use default values when provided values are empty (#20318)
* Use default values when provided values are empty

- When provided values are empty like `:3000` would imply that host is
empty, use the default value.
- Resolves #20316

* Update database.go

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-07-13 13:33:31 +08:00
wxiaoguang
f67a1030b3
Add tests for the host checking logic, clarify the behaviors (#20328)
Before, the combination of AllowedDomains/BlockedDomains/AllowLocalNetworks is confusing.

This PR adds tests for the logic, clarify the behaviors.
2022-07-13 09:07:16 +08:00
6543
d94f517643
Changelog for 1.16.9 (update) (#20341) (#20343)
* Changelog for 1.16.9 (update)
2022-07-13 00:27:35 +02:00
luzpaz
d29d6d1991
Fix various typos (#20338)
* Fix various typos

Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon`

Co-authored-by: zeripath <art27@cantab.net>
2022-07-12 23:32:37 +02:00
Chongyi Zheng
966e7bdc9b
Correctly handle draft releases without a tag (#20314)
Fixes #20313.

`errors.Is(err, git.ErrNotExist{})` is not working
2022-07-12 13:57:38 +01:00
Gusted
3aec32ad16
Add write check for creating Commit status (#20332)
- Add write code checks for creating new commit status
- Regression #5314

Co-authored-by: zeripath <art27@cantab.net>
2022-07-12 14:51:06 +02:00
silverwind
e24c238ecc
Remove blue text on migrate page (#20273)
* Remove blue text on migrate page

* remove Safe

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-07-12 17:04:15 +08:00
BurritoVoid
4ce07a00e5
Updated dead link to Madeleine.js source (#20322) 2022-07-11 23:51:14 -04:00
silverwind
734e81d48c [skip ci] Updated translations via Crowdin 2022-07-12 00:10:13 +00:00
1b39e39fc1
Add basic implementation of federated commenting 2022-07-11 18:24:15 -05:00
silverwind
c8e0fd0bcc
Add spectral linter for Swagger (#20321)
[spectral](https://github.com/stoplightio/spectral) lints
openapi/swagger files for mistakes of which it has identified a few and
which I've fixed.

I had to put it into `lint-frontend` because it depends on node_modules
so can not run on Drone during the backend target. I plan to refactor
these targets later to `lint-js` and `lint-go` so that they are
categorized based on the tool dependencies.
2022-07-11 18:07:16 -05:00
79a59bd75b
Use a replace in go.mod to point to Ta180m/activitypub fork instead of modifying the include everywhere 2022-07-11 17:27:57 -05:00
d016dbbe70
Switch to using gitea.com/Ta180m/activitypub fork of the go-ap/activitypub module since we need more Write and Load functions exported 2022-07-11 12:45:00 -05:00