Skip to content

various fixes#36697

Merged
silverwind merged 9 commits intogo-gitea:mainfrom
TheFox0x7:misc-fixes
Feb 22, 2026
Merged

various fixes#36697
silverwind merged 9 commits intogo-gitea:mainfrom
TheFox0x7:misc-fixes

Conversation

@TheFox0x7
Copy link
Copy Markdown
Contributor

@TheFox0x7 TheFox0x7 commented Feb 21, 2026

fixes bad address concat causing malformed address
Introduces new config options to for release attachments and number of files to avoid sharing limits for PR/issue attachments and release ones

closes: #31638, #35812


Doc update: https://gitea.com/gitea/docs/pulls/348

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2026
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin labels Feb 21, 2026
@TheFox0x7 TheFox0x7 marked this pull request as ready for review February 21, 2026 18:07
@wxiaoguang
Copy link
Copy Markdown
Contributor

  1. comment needs to be updated: // FIXME: this size is used for both "issue attachment" and "release attachment"
  2. example config needs to be updated
  3. document needs to be updated
  4. the code doesn't seem right, wrong field name vs config name?
image

@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Feb 21, 2026

  1. there is a config section [repository.release], and there is already ALLOWED_TYPES in it, so the new options should also be there

@wxiaoguang wxiaoguang marked this pull request as draft February 21, 2026 18:32
@github-actions github-actions bot added the docs-update-needed The document needs to be updated synchronously label Feb 21, 2026
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>

MaxFiles: 5,
Enabled: true,
MaxSize: 2048,
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can set it to 100MB now

-> https://chatgpt.com/share/699a0ec8-c950-8001-99af-ff866e33f8fa

For a public instance, "issue reader" can upload issue attachments, 2G seems too much.


The 2G was set due to the FIXME: #27946 (comment)

expanded docs for release settings
@TheFox0x7 TheFox0x7 marked this pull request as ready for review February 21, 2026 22:42
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 22, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 22, 2026
@lunny lunny added this to the 1.26.0 milestone Feb 22, 2026
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
@silverwind silverwind merged commit eb59b1a into go-gitea:main Feb 22, 2026
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 23, 2026
* giteaofficial/main: (81 commits)
  Add keyboard shortcuts for repository file and code search (go-gitea#36416)
  Refactor text utility classes to Tailwind CSS (go-gitea#36703)
  Prevent redirect bypasses via backslash-encoded paths (go-gitea#36660)
  Fix force push time-line commit comments of pull request (go-gitea#36653)
  Fix get release draft permission check (go-gitea#36659)
  Move `X_FRAME_OPTIONS` setting from `cors` to `security` section (go-gitea#30256)
  Update JS and PY deps (go-gitea#36708)
  Move jobparser from act repository to Gitea (go-gitea#36699)
  Fix push time bug (go-gitea#36693)
  Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" (go-gitea#36654)
  various fixes (go-gitea#36697)
  Add AI Contribution Policy to CONTRIBUTING.md (go-gitea#36651)
  Add some validation on values provided to USER_DISABLED_FEATURES and EXTERNAL_USER_DISABLED_FEATURES (go-gitea#36688)
  Rework e2e tests (go-gitea#36634)
  Remove unused functions (go-gitea#36672)
  Add migration http transport for push/sync mirror lfs (go-gitea#36665)
  Fix track time issue id (go-gitea#36664)
  Refactor inline style attributes (go-gitea#36652)
  Update Nix flake (go-gitea#36679)
  Upgrade gogit to 5.16.5 (go-gitea#36680)
  ...

# Conflicts:
#	web_src/js/features/repo-issue-content.ts
a1012112796 added a commit to a1012112796/gitea that referenced this pull request Apr 2, 2026
…t attachment` feature

After a careful analysis of the Gitea attachment feature related code,
I found that initially, the two were simply reused directly.
At least since go-gitea#12465, people have been making them different due to various requirements.
After go-gitea#36697, I think maybe it's a time to completely separate them.

- Add a configuration item [repository.release] -> ENABLE_ATTACHMENT to
  independently control whether to enable release attachments.
- Add a configuration item section [repository.release.attachment] to
  configure an independent storage method for release attachments (optional).

Configuration examples:

Enable both `release attachment` and
`issue / pull request attachment`, configure storage independently.
```INI
[repository.release.attachment]
PATH = release-attachment
```

Enable `release attachments` independently:
```INI
[attachment]
ENABLED = false

[repository.release.attachment]
PATH = release-attachment
```

[repository.release.attachment]
PATH = release-attachment

Enable issue / pull request attachments independently:
```INI
[repository.release.attachment]
ENABLE_ATTACHMENT = false
```

Signed-off-by: a1012112796 <1012112796@qq.com>
@wxiaoguang wxiaoguang mentioned this pull request Apr 7, 2026
wxiaoguang added a commit that referenced this pull request Apr 7, 2026
* Fix #37128
    * Manually tested with various cases (issue, pr) X (close, reopen)
* Fix #36792
    * Fix the comment
* Fix #36755
    * Add a "sleep 3"
* Follow up #36697
    * Clarify the "attachment uploading" problem and function call

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-update-needed The document needs to be updated synchronously lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to start the Let's Encrypt handler on port 80 too many colons in address on IPv6 only host

5 participants