Commit Graph

19023 Commits (fe656586f56bd9d84cfebce6a18de6d062e11fea)
 

Author SHA1 Message Date
Lunny Xiao fe656586f5 Merge branch 'add-file-tree-to-file-view-page' of github.com:kerwin612/gitea into kerwin612-add-file-tree-to-file-view-page 2 months ago
Lunny Xiao bdd78dfdcb
Use the old infrustructure about getting refullname 2 months ago
Kerwin Bryant 4f90719901
Merge branch 'main' into add-file-tree-to-file-view-page 2 months ago
GiteaBot 58ac17c005 [skip ci] Updated translations via Crowdin 2 months ago
silverwind 98d7e04767
Switch back to `vue-tsc` (#33248)
It supports Typescript 5.7 now, so we can switch back to the official
version.
2 months ago
Michael B. a90af22003
Let API create and edit system webhooks, attempt 2 (#33180)
This PR fixes inconsistencies between system and default webhooks in the
Gitea API. (See also #26418)
- A system webhook is a webhook that captures events for all
repositories.
- A default webhook is copied to a new repository when it is created. 

Before this PR `POST /api/v1/admin/hooks/` creates default webhooks (if
not configured otherwise) and `GET /api/v1/admin/hooks/` returns system
webhooks.

The PR introduces an optional query parameter to `GET
/api/v1/admin/hooks/` to enable selecting if either default, system or
both kind of webhooks should be retrieved. By default the flag is set to
return system webhooks keep current behaviour.

## Examples

### System Webhooks

#### Create

```
POST /api/v1/admin/hooks/

{
  "type": "gitea",
  "active": false,
  "branch_filter": "*",
  "events": [ "create", "..." ],
  "config": {
    "url": "http://...",
    "content_type": "json",
    "secret": "secret",
    "is_system_webhook": true // <-- controls hook type
  }
}
```

#### List
```
GET/api/v1/admin/hooks?type=system //type argument is optional here since it's the default
```

#### Others
The other relevant endpoints work as expected by referencing the hook by
id
```
GET /api/v1/admin/hooks/:id
PATCH /api/v1/admin/hooks/:id
DELETE /api/v1/admin/hooks/:id
```


### Default Webhooks

#### Create
```
POST /api/v1/admin/hooks/

{
  "type": "gitea",
  "active": false,
  "branch_filter": "*",
  "events": [ "create", "..." ],
  "config": {
    "url": "http://...",
    "content_type": "json",
    "secret": "secret",
    "is_system_webhook": false // optional, as false is the default value
  }
}
```

#### List
```
GET/api/v1/admin/hooks?type=default
```

#### Others
The other relevant endpoints work as expected by referencing the hook by
id
```
GET /api/v1/admin/hooks/:id
PATCH /api/v1/admin/hooks/:id
DELETE /api/v1/admin/hooks/:id
```
2 months ago
wxiaoguang 348b7074c8
Fix incorrect ref "blob" (#33240)
1. "blob" is not a "ref", it shouldn't (and not unable to) be handled by
`RepoRefByType`
2. the `/blob/{sha}` handle should use the path param "sha" directly
2 months ago
Lunny Xiao 4890434b1e
some improvements 2 months ago
Lunny Xiao 0b441325a9 Merge branch 'main' into kerwin612-add-file-tree-to-file-view-page 2 months ago
Kerwin Bryant a55548feb2 fix 2 months ago
Kerwin Bryant fe212908b1 fix 2 months ago
wxiaoguang 2ea929a952
Refactor RefName (#33234)
And fix some FIXMEs
2 months ago
Kerwin Bryant dc63b48493 fix 2 months ago
Lunny Xiao cac5f1cbf3 Merge branch 'add-file-tree-to-file-view-page' of github.com:kerwin612/gitea into kerwin612-add-file-tree-to-file-view-page 2 months ago
Lunny Xiao ab98bfba9d
Fix bug 2 months ago
Kerwin Bryant c0e2fd2e7d fix 2 months ago
Lunny Xiao 67a749f52c
Some renames and use type instead of isFile 2 months ago
Lunny Xiao 3c863223c5
Fix bug 2 months ago
Lunny Xiao 616fe58df0
Remove unused code 2 months ago
Lunny Xiao eff3568d31 Merge branch 'main' into kerwin612-add-file-tree-to-file-view-page 2 months ago
wxiaoguang 81352542fd
Refactor context RefName and RepoAssignment (#33226)
The `ctx.Repo.RefName` was used to be a "short name", it causes a lot of
ambiguity.

This PR does some refactoring and use `RefFullName` to replace the
legacy `RefName`, and simplify RepoAssignment
2 months ago
GiteaBot 604365efd7 [skip ci] Updated translations via Crowdin 2 months ago
wxiaoguang c0751ef116
Fix upload file form (#33230)
Fix #33228
2 months ago
Lunny Xiao be4e961240
Fix mirror bug (#33224)
Fix #33200

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
wxiaoguang 9024b79933
Remove unused CSS styles and move some styles to proper files (#33217) 2 months ago
wxiaoguang a068462ac0
Refactor context repository (#33202) 2 months ago
GiteaBot a7e750414c [skip ci] Updated translations via Crowdin 2 months ago
Lunny Xiao fd7d393c67
Fix unpin hint on the pinned pull requests (#33207) 2 months ago
TheFox0x7 8c6d7076b7
fix(cache): cache test triggered by non memory cache (#33220)
Change SlowCacheThreshold to 30 milliseconds so it doesn't trigger on
non memory cache

Closes: https://github.com/go-gitea/gitea/issues/33190
Closes: https://github.com/go-gitea/gitea/issues/32657
2 months ago
Kerwin Bryant d4a99e53c8 fix 2 months ago
Kerwin Bryant 62ecf34b99
Merge branch 'main' into add-file-tree-to-file-view-page 2 months ago
Kerwin Bryant c2670dbb81 fix 2 months ago
Kerwin Bryant 0cafe2a39d fix 2 months ago
Kerwin Bryant 9b95582f5d fix 2 months ago
yp05327 5c150ce9b0
Update README.md (#33149)
~~Waiting for the upload of screenshots~~
I have a good idea about the screenshots. I will do it later.

---------

Co-authored-by: Gary Wang <git@blumia.net>
2 months ago
Harry Vince d7ec23febf
Fix editor markdown not incrementing in a numbered list (#33187)
Amended the logic for newPrefix in the MarkdownEditor to resolve
incorrect number ordering.

Fixes #33184

Attached screenshot of fixed input similar to issue 
<img width="175" alt="Screenshot 2025-01-09 at 23 59 24"
src="https://github.com/user-attachments/assets/dfa23cf1-f3db-4b5e-99d2-a71bbcb289a8"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
Lunny Xiao 818ad6a3ed Merge branch 'add-file-tree-to-file-view-page' of github.com:kerwin612/gitea into kerwin612-add-file-tree-to-file-view-page 2 months ago
Lunny Xiao f769c8bf43
Make template simpler 2 months ago
Kerwin Bryant 6441fe5a73 Merge remote-tracking branch 'refs/remotes/kerwin612/add-file-tree-to-file-view-page' into add-file-tree-to-file-view-page 2 months ago
Kerwin Bryant 67342378d3 Merge branch 'upstream_main' into add-file-tree-to-file-view-page 2 months ago
Kerwin Bryant 3e679d67b3 fix 2 months ago
Lunny Xiao d3083d2198
Some small refactors (#33144) 2 months ago
Chai-Shi e5f3c16587
Fix sync fork for consistency (#33147)
Fixes #33145

An integration test could be added.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
Kerwin Bryant be7a6b6057
Merge branch 'main' into add-file-tree-to-file-view-page 2 months ago
techknowlogick 189e7409b7
Use updated path to s6-svscan after alpine upgrade (#33185)
Fix #33163

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
Kerwin Bryant 34dc5b1c1d Merge branch 'main' into add-file-tree-to-file-view-page 2 months ago
Kerwin Bryant 335375fd76 merge main 2 months ago
wxiaoguang 65aae0912a
Fix raw file API ref handling (#33172)
Fix #33164 and add more tests
2 months ago
GiteaBot 8f8ad8e272 [skip ci] Updated translations via Crowdin 2 months ago
wxiaoguang 5b31077b68
Fix ACME panic (#33178)
Fix #33177, Manually tested:

````
1.7364311850484018e+09	info	maintenance	started background certificate maintenance	{"cache": "0x1400ca64180"}
1.736431185054049e+09	info	obtain	acquiring lock	{"identifier": "example.com"}
1.736431185058073e+09	info	obtain	lock acquired	{"identifier": "example.com"}
1.736431185058133e+09	info	obtain	obtaining certificate	{"identifier": "example.com"}
````
2 months ago