| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
It supports Typescript 5.7 now, so we can switch back to the official
version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
```
|
|
|
|
|
| |
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
|
|
|
| |
And fix some FIXMEs
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Fix #33228
|
|
|
|
|
| |
Fix #33200
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
~~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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes #33145
An integration test could be added.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
| |
Fix #33163
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
| |
Fix #33164 and add more tests
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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"}
````
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve #32341
~Depends on #27151~
- [x] It will display a checkbox of deleting the head branch on the pull
request view page when starting an auto-merge task.
- [x] Add permission check before deleting the branch
- [x] Add delete branch comment for those closing pull requests because
of head branch or base branch was deleted.
- [x] Merge `RetargetChildrenOnMerge` and `AddDeletePRBranchComment`
into `service.DeleteBranch`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
![image](https://github.com/user-attachments/assets/899d25a9-80e9-48d5-a820-79c911c858e9)
After:
![image](https://github.com/user-attachments/assets/cf2a7407-909a-41db-9957-19d9214af57e)
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
| |
![image](https://github.com/user-attachments/assets/340a6c2a-8575-4ef9-be75-84af8af82b93)
|
|
|
|
|
|
|
| |
Fix #33170
![image](https://github.com/user-attachments/assets/714cebdc-ee76-43e3-9ece-a189f8ecb17a)
![image](https://github.com/user-attachments/assets/cbb58425-42b4-41ee-ba3c-7efbd24607dc)
|
|
|
| |
fixes: https://github.com/go-gitea/gitea/issues/33168
|
|
|
| |
![image](https://github.com/user-attachments/assets/8b14dbb7-ec36-4596-a6aa-72c14d93309d)
|
| |
|
|
|
|
|
| |
Refactor checks to use assert/require
Use require.Eventually for waiting in elastic and meilisearch tests
Use require to exit early instead of assert
|
| |
|
|
|
|
| |
`ToGitServiceType` (#33146)
|
|
|
| |
Fix #33150
|
|
|
|
|
| |
(#33126)
Fix #32985
|
|
|
|
|
|
| |
A small refactor to improve HTMLFormat, to help to prevent low-level
mistakes.
And fix #33141, fix #33139
|
|
|
|
|
|
| |
Follow #33045. There are two updates on `Set Merged`, which should be in
one transaction.
This also introduced some refactors for changeissuestatus to make it
more clear.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds links to submodules in diffs, similar to the existing link
when viewing a repo at a specific commit. It does this by expanding diff
parsing to recognize changes to submodules, and find the specific refs
that are added, deleted or changed.
Related #25888
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks @Zettat123
Follow #33116
Fix #33051
on.pull_request.types doc:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
on.pull_request.types added in this PR:
```
assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled
```
unsupported types in Gitea:
```
// Unsupported activity types:
// converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued
```
TODO:
- [x] add test
|
|
|
|
|
|
|
|
|
| |
>=2.30.0 (#33129)
Fix #32889
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
close #33086
* Add a special value for "SSH_USER" setting: `(DOER_USERNAME)`
* Improve parseRepositoryURL and add tests (now it doesn't have hard
dependency on some setting values)
Many changes are just adding "ctx" and "doer" argument to functions.
By the way, improve app.example.ini, remove all `%(key)s` syntax, it
only makes messy and no user really cares about it.
Document: https://gitea.com/gitea/docs/pulls/138
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
slow response because of lacking database index (#33106)
This PR fixes a performance problem when reviewing a pull request in a
big instance which have many records in the `review` table.
Traditionally, we should add more indexes in that table. But since
dismissed reviews of 1 pull request will not be too many as expected in
a common repository. Filtering reviews in the memory should be more
quick .
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Underlying go library has no support for it
Fixes: https://github.com/go-gitea/gitea/issues/33121
---
I never touched frontend tests so pointers how to write them are
welcome.
This can be either fix or workaround, depending if this is something
gitea should support in the future or not. The golang side is unlikely
to get updates though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #33119
routers/web/repo/view_home.go
![image](https://github.com/user-attachments/assets/b0d6c5f5-7abc-478a-8d41-4b44dbd460aa)
Calling `updateContextRepoEmptyAndStatus` will always ask the DB to
update the updated Unix attributes.
When revisiting the repo's home page, the timestamp will be updated
unexpectedly, so I added the needsUpdate variable to check whether, in
the end, the commitment to db update is necessary if columns have not
changed at all.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
![image](https://github.com/user-attachments/assets/3f831c8c-ef87-4282-880a-c2738f3e1d17)
----
![image](https://github.com/user-attachments/assets/c4c0519b-cfa6-42b4-bd28-205ee514eb34)
----
![image](https://github.com/user-attachments/assets/8624a605-9f2b-4905-9cbc-0af073972874)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* htmx updates the input form on branch switch
* add workflow warning to dispatch modal
* use name if description of input is empty
* show error if workflow_dispatch not available on branch
Closes #33073
Closes #33099
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|