forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fork updates from go-gitea/gitea main #63
Open
github-actions
wants to merge
4,427
commits into
kitspace:main
Choose a base branch
from
go-gitea:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+310,743
−350,897
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is only populated in [`ParseCompareInfo`](https://github.com/search?q=repo%3Ago-gitea%2Fgitea%20%20.Data%5B%22HeadRepo%22%5D&type=code) which is called in two handlers: * [`CompareAndPullRequestPost`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/pull.go#L1246) - a JSON post handler that doesn't render templates * [`CompareDiff`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/compare.go#L706) - which can render `diff/box.tmpl` and `diff/compare.tmpl`
…g settings. (#32307) This contains two backwards-compatible changes: * in the lfs http_client, the number of lfs oids requested per batch is loaded from lfs_client#BATCH_SIZE and defaulted to the previous value of 20 * in the lfs server/service, the max number of lfs oids allowed in a batch api request is loaded from server#LFS_MAX_BATCH_SIZE and defaults to 'nil' which equates to the previous behavior of 'infinite' This fixes #32306 --------- Signed-off-by: Royce Remer <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
close #32377 Co-authored-by: Giteabot <[email protected]>
fix regression of #29430 --- *Sponsored by Kithara Software GmbH*
#29248 didn't modify the view page. The class name is not good enough, so this is a quick fix. Before: org: ![image](https://github.com/user-attachments/assets/3e26502d-66b4-4043-ab03-003ba7391487) user: ![image](https://github.com/user-attachments/assets/9b22b90c-d63c-4228-acad-4d9fb20590ac) After: org: ![image](https://github.com/user-attachments/assets/21bf98a7-8a5b-4dc6-950a-88f529e36450) user: (no change) ![image](https://github.com/user-attachments/assets/fea0dcae-3625-44e8-bb9e-4c3733da8764) Co-authored-by: Giteabot <[email protected]>
- Update all JS dependencies excluding stylelint (because of AndyOGo/stylelint-declaration-strict-value#379). - Update all PY dependencies. - Replace `eslint-plugin-deprecation` with `@typescript-eslint/no-deprecated` rule. - Enabled `unicorn/prefer-math-min-max` and autofixed issues. - Tested all dependencies. --------- Co-authored-by: wxiaoguang <[email protected]>
- Prefer [window.location.assign](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign) over assigning to [window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) which typescript does not like. This works in all browsers including PaleMoon. - Fix all typescript issues in `web_src/js/webcomponents`, no behaviour changes. - ~~Workaround bug in `@typescript-eslint/no-unnecessary-type-assertion` rule.~~ - Omit vendored file from type checks. - `tsc` error count is reduce by 53 with these changes.
…RVE_DIRECT` enabled (#32365) Fix #28121 I did some tests and found that the `missing signature key` error is caused by an incorrect `Content-Type` header. Gitea correctly sets the `Content-Type` header when serving files. https://github.com/go-gitea/gitea/blob/348d1d0f322ca57c459acd902f54821d687ca804/routers/api/packages/container/container.go#L712-L717 However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may be set to an incorrect value by the storage service. To fix this issue, we can use query parameters to override response header values. https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html <img width="600px" src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555" /> In this PR, I introduced a new parameter to the `URL` method to support additional parameters. ``` URL(path, name string, reqParams url.Values) (*url.URL, error) ``` --- Most S3-like services support specifying the content type when storing objects. However, Gitea always use `application/octet-stream`. Therefore, I believe we also need to improve the `Save` method to support storing objects with the correct content type. https://github.com/go-gitea/gitea/blob/b7fb20e73e63b8edc9b90c52073e248bef428fcc/modules/storage/minio.go#L214-L221
Closes #30296 - Adds a DB fixture for actions artifacts - Adds artifacts test files - Clears artifacts test files between each run - Note: I initially initialized the artifacts only for artifacts tests, but because the files are small it only takes ~8ms, so I changed it to always run in test setup for simplicity - Fix some otherwise flaky tests by making them not depend on previous tests
This has two major changes that significantly reduce the amount of work done for large diffs: * Kill a running git process when reaching the maximum number of files in a diff, preventing it from processing the entire diff. * When loading a diff with the URL param `file-only=true`, skip loading stats. This speeds up loading both hidden files of a diff and sections of a diff when clicking the "Show More" button. A couple of minor things from profiling are also included: * Reuse existing repo in `PrepareViewPullInfo` if head and base are the same. The performance impact is going to depend heavily on the individual diff and the hardware it runs on, but when testing locally on a diff changing 100k+ lines over hundreds of files, I'm seeing a roughly 75% reduction in time to load the result of "Show More" --------- Co-authored-by: wxiaoguang <[email protected]>
Follow #32383 This PR cleans up the "Deadline" usages in templates, make them call `ParseLegacy` first to get a `Time` struct then display by `DateUtils`. Now it should be pretty clear how "deadline string" works, it makes it possible to do further refactoring and correcting.
Only move code, no unnecessary logic change. (There are many problems in old code, but changing them is not in this PR's scope) Co-authored-by: Giteabot <[email protected]>
Signed-off-by: Royce Remer <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
There were some missing features from EasyMDE: 1. H1 - H3 style 2. Auto add task list 3. Insert a table And added some tests
To make the markup package easier to maintain: 1. Split some go files into small files 2. Use a shared util.NopCloser, remove duplicate code 3. Remove unused functions
Clean up the templates
1. clarify the "filepath" could(should) contain "{ref}" 2. remove unclear RepoRefLegacy and RepoRefAny, use RepoRefUnknown to guess 3. by the way, avoid using AppURL
…ees (#32414) It's unnecessary to query the team table if the repository is not under organization when getting assignees.
Use zero instead of 9999-12-31 for deadline Fix #32291 --------- Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Giteabot <[email protected]>
Release notes: https://github.com/bigskysoftware/htmx/releases/tag/v2.0.4 Tested `Star`, `Watch`, and the admin dashboard page. All functionality remains unchanged. Signed-off-by: Yarden Shoham <[email protected]>
Two tweaks to Monaco to improve JSX/TSX support. 1. Certain language features like JSX/TSX only work when passing `uri` (containing the filename), do this. 2. Set the `jsx` compiler option to avoid error annotations Before: <img width="441" alt="Screenshot 2024-12-13 at 15 11 33" src="https://github.com/user-attachments/assets/dac245a7-e80f-4249-8e09-13124b03d12a" /> After: <img width="441" alt="Screenshot 2024-12-13 at 15 10 46" src="https://github.com/user-attachments/assets/726ad712-d116-438d-88da-bc40534b6860" />
Add more tests
…32838) Fix: #32611 In some lfs server implementations, they require the ref attribute. --------- Co-authored-by: wxiaoguang <[email protected]>
Update it and fix new issues related to `redefines-builtin-id`
Add more comments to explain the ssh problem, and rename `sshConn` to `sshSession`
…ld not be translated (#32850) The input content should always be `1h 2m 3s` and will be the same on different UI languages. So the translation is wrong.
Before and after: <img width="218" alt="Screenshot 2024-12-15 at 04 53 53" src="https://github.com/user-attachments/assets/299b1f0a-ba72-47c6-b662-a9d540d4d741" /> <img width="222" alt="Screenshot 2024-12-15 at 04 53 41" src="https://github.com/user-attachments/assets/5a2b5332-e324-4d20-82e9-21d1c850e826" /> Diff without whitespace: https://github.com/go-gitea/gitea/pull/32847/files?diff=unified&w=1 The `tw-mt-2` is fine even if the element renders empty: <img width="387" alt="image" src="https://github.com/user-attachments/assets/76a976e4-ba2e-48a5-9248-c361552a937a" /> --------- Co-authored-by: wxiaoguang <[email protected]>
Enables tenv and testifylint linters closes: #32842
1. restore background color 2. fix border radius on top/bottom and on hover 3. parent link is now full-row again, much easier to click 4. parent link now uses directory icon, matching github 5 changed grid layout to remove auto width on file name column which could get too small. 6. mobile layout now shows more of the filename. --------- Co-authored-by: wxiaoguang <[email protected]>
Fixes 79 typescript errors. Discovered at least two bugs in `notifications.ts`, and I'm pretty sure this feature was at least partially broken and may still be, I don't really know how to test it. After this, only like ~10 typescript errors remain in the codebase but those are harder to solve. --------- Co-authored-by: wxiaoguang <[email protected]>
Fix #32761 (comment) --------- Co-authored-by: wxiaoguang <[email protected]>
## Why join I didn’t talk about myself before, so some people may think that I am an employee from the company. So I think it is necessary to talk about why and how I joined. At the begining, my boss gave me a task to find a git software which can self hosted in on-premise. Then I found that there are not many project which meet our needs. But finally, I found Gitea. A easy use, easy maintenance, and without a good machine you can also run it. At that time, I just finished my previous work which is using helm to deploy something in K8s. So I tried to use Gitea’s helm chart to deploy in my work PC to see whether we can use it. But soon, I found a bug, and reported it (https://gitea.com/gitea/helm-chart/issues/382), but after about 1 month, there’s no fix. So I try to check the source code, and I found that it is caused by Gitea’s code and it is easy to fix it. So I created an issue (#22523) in Gitea. But unfortunately, after a long time again, it is still not fixed. So I tried to finish it by myself. I’m not a pro programmer, coding is just my hobby since I was 13 or 14 years old. (I will tell the reason later), I even don’t know the workflow about the contribution of OSS, so maybe I did some bad things at the early time, I apologize. But the people here are very kind, at that time, I start to consider whether it has worth to recommend to my boss. So I started to use it, but I found more and more bugs in a short time. Japanese company is very sensitive to it, so I gave up to recommend. But I can try to fix them! Because I can learn too many things during the contribution, not just about the programing but also the usage of other tools and the general contribution rule in the world of OSS. It let me grow up, and to become (maybe) a perfect full-stack engineer which is my dream. (Why it is my dream? I made a wrong decision in my college, I took/followed the advice of my parent, choosed communications engineering instead of computer science which is my favorite thing) # Why leave Several days ago, there’s an [article](https://juejin.cn/post/7446578471901626420#comment) came into my eye. Something about JiHu (GitLab Ltd in China) start to file a lawsuit to the company which is using GitLab CE version which is under MIT License. So people start to find other git service/application to avoid it. And in the this article, a project called Fogejo is mentioned. It says it is a hard-fork of Gitea. But I don’t know the meaning of `hard-fork`, so I access the home page of this project to find where it comes from. Finally, I found it here: https://forgejo.org/compare-to-gitea/#why-was-forgejo-created. They said: > As of early 2024, Forgejo is developed independently of Gitea, as a “hard-fork”. `hard-fork` has a quotation, so the meaning is not the original meaning of it, but they said `as`, which means `like` or `similar` I think. So just focus on the words before `as` is ok, because `hard-fork` is a simile, `As of early 2024, Forgejo is developed independently of Gitea` is what they want to say. In my mind, this means: since early 2024 Forgejo’s codes (new changes) are all written by themselves, and emphasize that these changes are not related to Gitea, because they can simply say `As of early 2024, Forgejo is developed independently, as a “hard-fork”` But after I check the commit history, I can still find some strange commits in recent month: https://codeberg.org/forgejo/forgejo/commits/branch/forgejo/search?q=author%3Ayp05327&all= The author is me, but the commit is signed by someone I even never heard. Considering the words they said above, it feels/sounds like my work has become their work. Although Gitea is under MIT license, is this allowed in the OSS world? Even it is allowed, I can not accept it personally. So I created a issue to ask them: https://codeberg.org/forgejo/forgejo/issues/6236 https://codeberg.org/forgejo/discussions/issues/251 Finally, it seems that they understood the problem and promised to improve it. But I also required a public statement to explain it which means they need to apologize, otherwise it is hard to the users who believe these are all their work know it, and it seems they ignored some of my words again? So it is hard for me to believe they will really make changes and post the apologize. If they did, I will consider to come back. Otherwise, I think there’s no worth to continually contribute to any OSS project, so I decided to leave. ps: TOC voting is still ongoing, please remove me from the list. And I will leave the organization after the merge. At the end, thanks to all people who have helped me to finish the contribution and teach me new knowledges.
… full sha256 (#32851) Related: #24973 Before: ![image](https://github.com/user-attachments/assets/bca17900-5075-4d15-af7a-c71bf8979c04) After: ![image](https://github.com/user-attachments/assets/c5a24e3b-763b-4463-80db-d4dbd89f7dc4) Index: ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e", "size": 672, "platform": { "architecture": "amd64", "os": "linux" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0", "size": 672, "platform": { "architecture": "arm64", "os": "linux" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:d70ad19d00c19e40691045cbddc3e8a5a4454c31cc454d1132b13bcaf35b6d46", "size": 566, "annotations": { "vnd.docker.reference.digest": "sha256:5967afffdfde104ca1459286a72346baaef8b70ac153325d7a6cd85c7734ac6e", "vnd.docker.reference.type": "attestation-manifest" }, "platform": { "architecture": "unknown", "os": "unknown" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:73bc233bf4eac96a404ce3e0430b698831a4ea7050c878d5f76d1d1f133751dd", "size": 566, "annotations": { "vnd.docker.reference.digest": "sha256:f9abfcc55320f9ff1f38eeb7dbb4bea10b29c7febfa49ccd7aab9fa02403b9f0", "vnd.docker.reference.type": "attestation-manifest" }, "platform": { "architecture": "unknown", "os": "unknown" } } ] } ``` --------- Co-authored-by: silverwind <[email protected]>
Make the result the same as GitHub: * all skipped, then result is skipped * any cancelled, then result cancelled
1. add/improve comments to help future readers could understand the problem more easily. 2. add an error log to LDAP with username fallback 3. use `or` instead of `Iif` for "repo/branch_dropdown" (`Iif` was a mistake, but it doesn't really affect the UI) 4. add `tw-font-mono` style to container digest to match dockerhub 5. fix a bug in RepoBranchTagSelector: the form is not updated when there is no click to an item --------- Co-authored-by: delvh <[email protected]>
In preparation for migrating to eslint flat config, move the config file to javascript. Additional changes: - `no-undef` is now disabled as it's no longer needed with typescript - `no-restricted-globals` config is simplified
Enables scrapping pprof endpoint for continuous profiling Closes: #32854
`RepoTransfer` now is at models, but if we want to move it into `repo` model, it will depend on `Team`. So this PR also makes repo model depend on org model to make it possible. Just refactor, no code change. - [x] Move `DeleteOrganization` from `models/organization` to service layer - [x] Move `AccessibleTeamReposEnv` to `models/repo` - [x] Move `RepoTransfer` from `models` to `models/repo` - [x] Merge `getUserTeamIDs` and `GetUserTeamIDs`, Merge `GetUserTeams` and `getUserTeams`. - [x] Remove `Team`'s `Repos []*repo_model.Repository` to avoid dependency recycle.
Incorrect content was introduced while generating the index, which has now been removed, and the missing fields have been added. ![](https://github.com/user-attachments/assets/4fbb8884-337e-43b1-939f-a5ba687f7ffd)
SFCs shouldn't export anything besides their component, and this eliminates one issue with tsc, while apparently also solving a hack. It seems to work as before, also when multiples are on the same page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.