- 13 Nov, 2022 2 commits
-
-
Yarden Shoham authored
Use `JsPrettyNumber` to render the number of commits * Closes #12637 ### Before  ### After  Signed-off-by:
Yarden Shoham <hrsi88@gmail.com> Co-authored-by:
6543 <6543@obermui.de>
-
Gusted authored
- Update the crypto dependency to include https://github.com/golang/crypto/commit/6fad3dfc18918c2ac9c112e46b32473bd2e5e2f9 - Resolves #17798 Executed: `go get golang.org/x/crypto@6fad3dfc18918c2ac9c112e46b32473bd2e5e2f9 && rm go.sum && go mod tidy`
-
- 12 Nov, 2022 5 commits
-
-
Lunny Xiao authored
Fix #19513 This PR introduce a new db method `InTransaction(context.Context)`, and also builtin check on `db.TxContext` and `db.WithTx`. There is also a new method `db.AutoTx` has been introduced but could be used by other PRs. `WithTx` will always open a new transaction, if a transaction exist in context, return an error. `AutoTx` will try to open a new transaction if no transaction exist in context. That means it will always enter a transaction if there is no error. Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
6543 <6543@obermui.de>
-
zeripath authored
In #21637 it was mentioned that the purpose of the API routes for the packages is unclear. This PR adds some documentation. Fix #21637 Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
zeripath authored
There are far too many error reports regarding timeouts from migrations. We should adjust error report to suggest increasing this timeout. Ref #20680 Signed-off-by:
Andrew Thornton <art27@cantab.net>
-
silverwind authored
Move the text color rules out of the unneeded `.ui` block, add missing colors, tweak colors on arc-green to be more readable (red was particulary bad to read). Also, this removes the previous inheritance of link colors. I think links should always be in primary color and if they are to be discolored, the color should be set on them explicitely. <img width="165" alt="Screenshot 2022-11-12 at 13 28 30" src="https://user-images.githubusercontent.com/115237/201474098-700d9fed-3133-43c7-b57e-d4cc5c2795cb.png"> <img width="152" alt="Screenshot 2022-11-12 at 13 18 48" src="https://user-images.githubusercontent.com/115237/201474156-b6de4cb5-bce8-4553-b3d4-8365aff9a3a7.png"> HTML to test with: ```html <div class="text red">some text with <a href="#foo">a link</a>.</div> <div class="text orange">some text with <a href="#foo">a link</a>.</div> <div class="text yellow">some text with <a href="#foo">a link</a>.</div> <div class="text olive">some text with <a href="#foo">a link</a>.</div> <div class="text green">some text with <a href="#foo">a link</a>.</div> <div class="text teal">some text with <a href="#foo">a link</a>.</div> <div class="text blue">some text with <a href="#foo">a link</a>.</div> <div class="text violet">some text with <a href="#foo">a link</a>.</div> <div class="text purple">some text with <a href="#foo">a link</a>.</div> <div class="text pink">some text with <a href="#foo">a link</a>.</div> <div class="text brown">some text with <a href="#foo">a link</a>.</div> <div class="text grey">some text with <a href="#foo">a link</a>.</div>
-
Jason Song authored
Fix #20921. The `ctx.Repo.GitRepo` has been used in deleting issues when the issue is a PR. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 11 Nov, 2022 4 commits
-
-
Nolann authored
Add feature to easily copy CITATION.cff content in APA and BibTex format.
-
silverwind authored
Fixes: https://github.com/go-gitea/gitea/issues/21722 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Jason Song authored
When I'm trying to use a user which has no repo numbers limit to create a repo for a org which has reached the limit, it says "You have already reached your limit of 5 repositories." That's confusing. "I" haven't reached the limit, the owner has. <img width="828" alt="xnip_2022-11-10_11-57-45" src="https://user-images.githubusercontent.com/9418365/200997290-d0819e40-fb10-4c37-917c-167e2070b4f9.png "> Co-authored-by:
Lauris BH <lauris@nix.lv> Co-authored-by:
techknowlogick <techknowlogick@gitea.io>
-
Drew Noel authored
This PR enhances the CORS middleware usage by allowing for the headers to be configured in `app.ini`. Fixes #21746 Co-authored-by:
KN4CK3R <admin@oldschoolhack.me> Co-authored-by:
John Olheiser <john.olheiser@gmail.com> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
- 10 Nov, 2022 6 commits
-
-
wxiaoguang authored
The purpose of #18982 is to improve the SMTP mailer, but there were some unrelated changes made to the SMTP auth in https://github.com/go-gitea/gitea/pull/18982/commits/d60c43869420f5fc43ad19b454c9ae50dad65964 This PR reverts these unrelated changes, fix #21744
-
wxiaoguang authored
Close #21761 Some database migrations depend on the git module.
-
Jason Song authored
A simple refactor to reduce duplicate codes. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
zeripath <art27@cantab.net> Co-authored-by:
delvh <dev.lh@web.de>
-
Lunny Xiao authored
This is a performance regression from #18058 Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
Andrew Thornton <art27@cantab.net>
-
Jason Song authored
There's a lot of work that has been done on `.dockerignore`: - #329 - #2927 - #8338 And finally, it has been deleted by #2927. This is a copy of the `.gitignore`. Creating a soft link is more elegant, but it may cause trouble to the Windows users.
-
zeripath authored
Attempt clarify the AppWorkPath in the documentation by using different notation and adding a section to the start of the cheat sheet. Fix #21523 Signed-off-by:
Andrew Thornton <art27@cantab.net> Signed-off-by:
Andrew Thornton <art27@cantab.net>
-
- 09 Nov, 2022 5 commits
-
-
Jason Song authored
Fix #21698. Set the last login time to the current time when activating the user successfully. Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Xinyu Zhou authored
fixes: https://github.com/go-gitea/gitea/issues/21733 Uncaught Error: Language id "vs.editor.nullLanguage" is not configured nor known Note that this monaco-editor worked fine on 0.33.0 and broke on 0.34.0. If upstream fixed, remove this code. Signed-off-by:
Xinyu Zhou <i@sourcehut.net> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
wxiaoguang authored
Related: * https://github.com/go-gitea/gitea/pull/21596#issuecomment-1291450224 There was a bug when switching language by AJAX: the irrelevant POST requests were processed by the target page's handler. Now, use GET instead of POST. The GET requests should be harmless. Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
Jason Song <i@wolfogre.com> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
KN4CK3R authored
Related #20471 This PR adds global quota limits for the package registry. Settings for individual users/orgs can be added in a seperate PR using the settings table. Co-authored-by:
Lauris BH <lauris@nix.lv> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Yarden Shoham authored
For each quote block, the first `**Note**` or `**Warning**` gets an icon prepended to it and its text is colored accordingly. GitHub does this (community/community#16925). [Initially requested on Discord.](https://discord.com/channels/322538954119184384/322538954119184384/1038816475638661181) ### Before  ### After  Signed-off-by:
Yarden Shoham <hrsi88@gmail.com> Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
silverwind <me@silverwind.io>
-
- 08 Nov, 2022 3 commits
-
-
Lunny Xiao authored
Also added more checks for the render function. Co-authored-by:
silverwind <me@silverwind.io>
-
Lunny Xiao authored
-
Wayne Starr authored
This addresses #21707 and adds a second package test case for a non-semver compatible version (this might be overkill though since you could also edit the old package version to have an epoch in front and see the error, this just seemed more flexible for the future). Co-authored-by:
KN4CK3R <admin@oldschoolhack.me>
-
- 07 Nov, 2022 2 commits
-
-
KN4CK3R authored
Fixes #21683 Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Xinyu Zhou authored
Duplicate parentheses written in link. Signed-off-by:
Xinyu Zhou <i@sourcehut.net> Co-authored-by:
Lauris BH <lauris@nix.lv>
-
- 06 Nov, 2022 2 commits
-
-
Gusted authored
- Remove "unused" code, I don't think anyone ever used this or was aware of this feature. It doesn't even work properly as most fields/data are empty.
-
Lunny Xiao authored
This reverts commit cb447369.
-
- 05 Nov, 2022 1 commit
-
-
Xinyu Zhou authored
-
- 04 Nov, 2022 4 commits
-
-
-
Yarden Shoham authored
If a raw text file is displayed, a copy button of the text is enabled. * Closes #12866 ### Before  ### After  #### Rendered files and binaries have their button disabled   Signed-off-by:
Yarden Shoham <hrsi88@gmail.com> Co-authored-by:
silverwind <me@silverwind.io> Co-authored-by:
delvh <dev.lh@web.de> Co-authored-by:
wxiaoguang <wxiaoguang@gmail.com>
-
wxiaoguang authored
Close https://github.com/go-gitea/gitea/issues/21640 Before: Gitea can create users like ".xxx" or "x..y", which is not ideal, it's already a consensus that dot filenames have special meanings, and `a..b` is a confusing name when doing cross repo compare. After: stricter Co-authored-by:
Jason Song <i@wolfogre.com> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
delvh <dev.lh@web.de>
-
Gusted authored
-
- 03 Nov, 2022 6 commits
-
-
wxiaoguang authored
Fix https://github.com/go-gitea/gitea/issues/21666 Caused by https://github.com/go-gitea/gitea/pull/19663 Before: when install, the INTERNAL_TOKEN was always generated and saved. But the internal token may be already there by INTERNAL_TOKEN_URI After: INTERNAL_TOKEN_URI file must be non-empty. When install, skip internal token generation if the token exists.
-
zeripath authored
The install page has been somewhat inconsistently styled for a while. This PR simplifies and standardises the styling of these fields makes things line up better across widths. Replace #21660 Signed-off-by:
Andrew Thornton <art27@cantab.net> Old:  New:  Signed-off-by:
Andrew Thornton <art27@cantab.net>
-
oliverpool authored
_This is a different approach to #20267, I took the liberty of adapting some parts, see below_ ## Context In some cases, a weebhook endpoint requires some kind of authentication. The usual way is by sending a static `Authorization` header, with a given token. For instance: - Matrix expects a `Bearer <token>` (already implemented, by storing the header cleartext in the metadata - which is buggy on retry #19872) - TeamCity #18667 - Gitea instances #20267 - SourceHut https://man.sr.ht/graphql.md#authentication-strategies (this is my actual personal need :) ## Proposed solution Add a dedicated encrypt column to the webhook table (instead of storing it as meta as proposed in #20267), so that it gets available for all present and future hook types (especially the custom ones #19307). This would also solve the buggy matrix retry #19872. As a first step, I would recommend focusing on the backend logic and improve the frontend at a later stage. For now the UI is a simple `Authorization` field (which could be later customized with `Bearer` and `Basic` switches):  The header name is hard-coded, since I couldn't fine any usecase justifying otherwise. ## Questions - What do you think of this approach? @justusbunsi @Gusted @silverwind - ~~How are the migrations generated? Do I have to manually create a new file, or is there a command for that?~~ - ~~I started adding it to the API: should I complete it or should I drop it? (I don't know how much the API is actually used)~~ ## Done as well: - add a migration for the existing matrix webhooks and remove the `Authorization` logic there _Closes #19872_ Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
Gusted <williamzijl7@hotmail.com> Co-authored-by:
delvh <dev.lh@web.de>
-
kolaente authored
I found myself wondering whether a PR I scheduled for automerge was actually merged. It was, but I didn't receive a mail notification for it - that makes sense considering I am the doer and usually don't want to receive such notifications. But ideally I want to receive a notification when a PR was merged because I scheduled it for automerge. This PR implements exactly that. The implementation works, but I wonder if there's a way to avoid passing the "This PR was automerged" state down so much. I tried solving this via the database (checking if there's an automerge scheduled for this PR when sending the notification) but that did not work reliably, probably because sending the notification happens async and the entry might have already been deleted. My implementation might be the most straightforward but maybe not the most elegant. Signed-off-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
Lauris BH <lauris@nix.lv> Co-authored-by:
Andrew Thornton <art27@cantab.net> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com>
-
Xinyu Zhou authored
Since OpenSSH 7.0 and greater similarly disable the ssh-dss (DSA) public key algorithm, and recommend against its use. http://www.openssh.com/legacy.html ##
⚠ BREAKING⚠ This patch will remove DSA host key form OpenSSH daemon configuration file. Signed-off-by:baronbunny <its@baronbunny.cn> Co-authored-by:
6543 <6543@obermui.de> Co-authored-by:
Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by:
wxiaoguang <wxiaoguang@gmail.com>
-
KN4CK3R authored
-