Skip to content

Conversation

@jnan88
Copy link
Owner

@jnan88 jnan88 commented Aug 26, 2021

Please check the following:

  1. Make sure you are targeting the main branch, pull requests on release branches are only allowed for bug fixes.
  2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md
  3. Describe what your pull request does and which issue you're targeting (if any)

You MUST delete the content above including this line before posting, otherwise your pull request will be invalid.

lunny and others added 29 commits September 1, 2025 19:13
- ~Upgrade golang to 1.25~ blocked by the issue
go-swagger/go-swagger#3220
- Upgrade minor versions of most dependencies
- Upgrade github.com/google/go-github version to v74
- Fix meilisearch because of sdk interface change
- Use github.com/Necoro/html2text which is a fork instead of html2text
because of jaytaylor/html2text#67 which
resulted in complie failure.
- Fix some deprecated methods of gitlab go client.
As per bitnami/containers#83267, my
understanding is that the `docker.io/bitnami` images will be deleted on
September 29.

To prevent this failure mode, use the images on the `bitnamilegacy` org
instead which are snapshots from when they stopped updating them.
Long-term, we should replace these images with official ones.
Co-authored-by: 6543 <[email protected]>
Co-authored-by: silverwind <[email protected]>
imagemin-zopfli brings a lot of [vulnerable
dependencies](https://github.com/go-gitea/gitea/security/dependabot) and
it is unmaintained. The removal brings a size increase to these images,
but I think ultimately this size does not matter enough. I verified this
passes `pnpm audit` now.
Default behaviour rejected all rows (Records) with more or fewer columns
(Fields) than the first row, preventing them from parsing at all and
silently hiding them. While RFC4180 section 2.4 says each line _should_
contain the same number of fields, enforcing this on the viewer is
unhelpful.
This pull request disables that validation, allowing the viewer to
render lines with fewer columns than the maximum number within the file.
As it's a simple HTML table, this works without additional changes (i.e.
no need to manually determine the maximum number of columns), but the
default appearance of rows with fewer columns may be undesirable to some
people, especially when using CSS that has `td {border-right: none}`.
<img width="1408" height="156" alt="Screenshot without cell right
borders"
src="https://github.com/user-attachments/assets/d4c19bbc-3fd2-4fd1-83a6-1125e953e95b"
/>
<img width="1397" height="158" alt="Screenshot with cell right borders"
src="https://github.com/user-attachments/assets/86aaafcb-d7e8-4228-99a8-7527c823a07c"
/>

Fixes #16559, #30358.

Unfortunately, retaining empty lines is less trivial, so the line
numbers on the leftmost column will still not match the source file
whenever those are present, though a future PR could address that.
- Moved mail templates to new directories.
- Added new devtest ymls.
- Embedded styles as much as possible.
- Added new translation keys for actions email.

---------

Signed-off-by: NorthRealm <[email protected]>
Co-authored-by: delvh <[email protected]>
add `/.pnpm-store` to .gitignore to not drive git diff crazy with 10k+
changes after .pnpm-store update, introduced by #35274
username field is not required by discord and used to override the
default username. sending it as blank causes a 400 error. it should be
omitted instead when it's not set.

Ref:
https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

Closes #35411
Use the WASM module of [`resvg-js`](https://github.com/thx/resvg-js) to
replace `fabric` and the problematic native `canvas` dependency. WASM
works cross-platform so we can include it in the main `package.json`.
…35421)

Migrate all JS config and tools to TS and fix a number of type issues.
This required Node.js 22.18.0 or greater where [type-stripping was
enabled](https://nodejs.org/en/blog/release/v22.18.0) by default.

Given that Node 22 is the current LTS, I think it's ok to assume that
the user has a recent version of it.

Webpack currently requires the `--disable-interpret` flag to work,
should be fixed eventually with
webpack/webpack-cli#4525.
`fast-glob` is replaced by `fs.globSync`, available in Node 22.0.0 or
greater.
Applying as suggested some time ago by techknowlogick.
[List of all merged PRs so
far](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3ATheFox0x7)
This solves the [docker build
failure](https://github.com/go-gitea/gitea/actions/runs/17514788636/job/49750917680)
on `linux/riscv64` by enabling the experimental flag on Node.js before
22.18.
…5410)

Fixes #35159

Swift Package Manager expects an 'author.name' field in package
metadata, but Gitea was only providing schema.org format fields
(givenName, middleName, familyName). This caused SPM to fail with
keyNotFound error when fetching package metadata.

Changes:
- Add 'name' field to Person struct (inherited from
https://schema.org/Thing)
- Populate 'name' field in API response using existing String() method
- Maintains backward compatibility with existing schema.org fields
- Provides both formats for maximum compatibility

The fix ensures Swift Package Manager can successfully resolve packages
while preserving full schema.org compliance.
gofumpt now
[supports](https://github.com/mvdan/gofumpt/releases/tag/v0.9.0) the
[ignore](https://tip.golang.org/ref/mod#go-mod-file-ignore) directive
added in go 1.25, make use of it which speeds up `make fmt` by around
30%. Likely this also has similar speed gains in other go-related
commands which use the `./...` pattern.

The change in `build/code-batch-process.go` was introduced by `gofumpt`
because of this change:

> A new rule is introduced to "clothe" naked returns for the sake of
clarity. While there is nothing wrong with naming results in function
signatures, using lone return statements can be confusing to the reader.
…e cannot be redirected (#35420)

Fix #35419

---------

Co-authored-by: wxiaoguang <[email protected]>
#35386)

When changing the pull request target branch, the pushed commits
comments will not be changed resulted the number are inconsistent
between commits tab number and the pushed commits comments number.

This PR will remove all the previous pushed commits comments and
calculate new comments when changing the target branch.

Before:

<img width="928" height="585" alt="image"
src="https://github.com/user-attachments/assets/35e4d31f-31a1-4d14-83b0-1786721ab0d9"
/>

After:
<img width="816" height="623" alt="image"
src="https://github.com/user-attachments/assets/24b6dafe-9238-4e7e-833d-68472457afab"
/>
…35416)

fixes #30565 

When using git with a gitea hosted repository, the HTTP-Transport did
honor the user and repository redirects, which are created when renaming
a user or repo and also when transferring ownership of a repo to a
different organization. This is extremely helpful, as repo URLs remain
stable and do not have to be migrated on each client's worktree and
other places, e.g. CI at once.

The SSH transport - which I favor - did not know of these redirections
and I implemented a lookup during the `serv` command.
Tested all affected dependencies.
bytedream and others added 30 commits November 27, 2025 14:02
File changes since last review didn't decrease the viewed files counter

---
<img width="440" height="178" alt="image"
src="https://github.com/user-attachments/assets/da34fcf4-452f-4f71-8da2-97edbfc31fdd"
/>

Also reported here ->
#35803 (comment)

---------

Co-authored-by: Lunny Xiao <[email protected]>
- Update JS deps
- Regenerate SVGs
- Fix air `bin` deprecation
- Fix `monaco.languages.typescript` deprecation
- Remove `eslint-plugin-no-use-extend-native`, it's unnecessary with
typescript
- Enable new `@typescript-eslint` rules
- Disable `@typescript-eslint/no-redundant-type-constituents`, this rule
has bugs when not running under `strictNullChecks` (pending in
#35843).
- Updated error message in `incoming.go` to remove unnecessary wrapping
of the error.
- Corrected typo in error message in `wiki.go` for clarity.

---------

Co-authored-by: Giteabot <[email protected]>
#36045)

Partially fix #34710 

The bug described in #34710 can be divided into two parts: `push.paths`
and `pull_request.paths`. This PR fixes the issue related to
`pull_request.paths`. The root cause is that the check for whether the
workflow can be triggered happens **before** updating the PR’s merge
base. This causes the file-change detection to use the old merge base.
Therefore, we need to update the merge base first and then check whether
the workflow can be triggered.
Many (but not all) analyzers ran by `gopls check` are available in
`golangci-lint` as part of default-disabled `govet` linters, so I think
it's best we remove this manual linting step and let `golangci-lint`
handle it. I hand-picked two available linters that were previously
linted using gopls and this list is not exhaustive.

This will reduce CI time by about 3 minutes.
/claim #35898
Resolves #35898 

### Summary of key changes:

1. Add file name search/Go to file functionality to repo button row.
2. Add backend functionality to delete directory
3. Add context menu for directories with functionality to copy path & delete a directory
4. Move Add/Upload file dropdown to right for parity with Github UI
5. Add tree view to the edit/upload UI

---------

Co-authored-by: wxiaoguang <[email protected]>
Fix #20390 

We should use `ReplacePrimaryEmailAddress` instead of
`AdminAddOrSetPrimaryEmailAddress` when modify user's email from admin
panel. And also we need a database transaction to keep deletion and
insertion succeed at the same time.
A big step towards enabling strict mode in Typescript.

There was definitely a good share of potential bugs while refactoring
this. When in doubt, I opted to keep the potentially broken behaviour.
Notably, the `DOMEvent` type is gone, it was broken and we're better of
with type assertions on `e.target`.

---------

Signed-off-by: silverwind <[email protected]>
Signed-off-by: wxiaoguang <[email protected]>
Co-authored-by: delvh <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Follow #36058 for API edit user bug when editing email.

- The Admin Edit User API includes a breaking change. Previously, when
updating a user with an email from an unallowed domain, the request
would succeed but return a warning in the response headers. Now, the
request will fail and return an error in the response body instead.
- Removed `AdminAddOrSetPrimaryEmailAddress` because it will not be used
any where.

Fix #36058 (comment)

---------

Co-authored-by: Giteabot <[email protected]>
Replace #36032
Fix #36030

This PR use `net/smtp` instead of gomail's smtp. Now
github.com/wneessen/go-mail will be used only for generating email
message body.

---------

Co-authored-by: Giteabot <[email protected]>
- Update and autofix most issues
- Corrected variable names to `cutOk`
- Impossible condition in `services/migrations/onedev_test.go` removed
- `modules/setting/config_env.go:128:3` looks like a false-positive,
added nolint
fix #36071

looks that's because if an svg in hiden env, it's color added by
`fill="url(#a)"` will become not usefull. by ai helping, I think moving
it out of page by position is a good solution. fell free creat a new
pull request if you have a better soluton. Thanks.
<img width="2198" height="1120" alt="image"
src="https://github.com/user-attachments/assets/bbf7c171-0b7f-412a-a1bc-aea3f1629636"
/>

---------

Signed-off-by: a1012112796 <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Fix #36026 

The redirect should be checked when original user/repo doesn't exist.
…ailable. (#36060)

Resolves #35994 

Do not render code expansion arrows when `DiffBlobExcerptData` is not
available (code file preview, pull conversation diff comment).

---------

Signed-off-by: wxiaoguang <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Result of `make update-js svg && git add --all`. Tested Mermaid.

Co-authored-by: Lunny Xiao <[email protected]>
This one may be a bit opinionated but I prefer my editors to be clean of
distractions and these bracket highlights look too much like a cursor on
quick glance imho.

Before:
<img width="345" height="67" alt="Screenshot 2025-12-04 at 20 26 14"
src="https://github.com/user-attachments/assets/10b2ea19-4468-401b-9425-1caa1b64afe4"
/>

After:
<img width="319" height="69" alt="Screenshot 2025-12-04 at 20 26 25"
src="https://github.com/user-attachments/assets/edbd3291-965d-421f-85cf-8d927b2a323a"
/>
When migrating issues or pull requests from a big repository, some
issue/pull request maybe deleted when migrating. So that there will be
duplicated issues/pull requests because we are get information with
pagination. This PR introduced a map to record all migrated issue pull
request index when migrating to avoid the failure because of duplicated
records.
1. Our textarea already has some editor-like feature like tab
indentation, so I thought why not also add insertion of matching closing
quotes/brackets over selected text. This does that.
2. `textareaInsertText` is replaced with `replaceTextareaSelection`
which does the same but create a new edit history entry in the textarea
so CTRL-Z works. The button that inserts tables into the textarea can
now also be reverted via CTRL-Z, which was not possible before.
1 Move `IsRepositoryModelOrDirExist` and `CheckCreateRepository` to
service layer
2 Use `gitrepo.Pushxxx` instead of `git.Push` when possible
3 use `gitrepo.Clonexxx` instead of `gitrepo.Clone` when possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.