* cleanup: remove not used properties
* feat: implement migration of website field from gogs
* feat: implement dumping and restoring website field
* feat: implement migration of website field from gitea
* feat: implement migration of homepage/website field from github
* feat: implement website properties for repository migration
Gogs migration is untested for now.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6474
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
Co-committed-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
The benefit / functionality provided by DiffFileList is already (better)
integrated in the header of the files.
If you want an overview, you can collapse all files via the same
overflow menu (where the stats were available).
To reduce the maintenance effort, the DiffFileList component is
therefore removed.
When editing a list or similar syntax elements, pressing enter starts a
new line with the line introducer (e.g. `- ` for a plain list).
But currently it's uncomfortable when someone wants to leave the list.
Pressing enter again simply adds more and more lines with the prefix.
With this change the list is terminated if enter is pressed on a line
which contains the introducer but nothing else. This behavior is known
from other markdown editors like the on used by GitLab or GitHub.
Additionally I changed the regex for detecting a prefix.
- Why: With the change you can add a single whitespace at the end if you
want to keep an "empty" line. So if you want to write:
```
- First
-
- Third
```
You just need to add a whitespace in the second line to prevent that
the prefix will be removed.
- Changes in detail:
- ordered bullet list prefix detection:
nothing changed
- todo list and unordered list prefix detection:
have been split up:
- todo list: Changed that only 1 to 4 whitespaces can be between the
list char (`-`,`*`,`+`) and the checkbox (`[ ]`,`[x]`) - Why? If
more then 4 spaces are between the list char and the checkbox,
this is no longer detected as a prefix for a todo item based on
the markdown standard. Due to the amount of spaces it is instead
parsed as code.
- unordered list: The prefix now needs to have exactly one space
after the list char (`-`,`*`,`+`). More spaces will not be taken
into account for detecting the prefix.
- quote prefix detection:
nothing changed
The current e2e-tests where simplified and duplicated tests where
removed. Test cases for the new functionality where added.
Currently, the content of the text field is not reset when you cancel editing. This change resets the content of the text field when editing is canceled.
If this is not done and you click on cancel and then on edit again, you can no longer return to the initial content without completely reloading the page.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6595
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
Using SELECT `%s` FROM `%s` WHERE 0 = 1 to assert the existence of a column is simple but noisy: it shows errors in the migrations that are confusing for Forgejo admins because they are not actual errors.
Use introspection instead, which is more complicated but leads to the same result.
Add a test that ensures it works as expected, for all database types. Although the migration is run for all database types, it does not account for various scenarios and is never tested in the case a column does not exist.
Refs: https://codeberg.org/forgejo/forgejo/issues/6583
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6591
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
https://github.com/go-fed/httpsig seems to be unmaintained.
Switch to github.com/42wim/httpsig which has removed deprecated crypto
and default sha256 signing for ssh rsa.
No impact for those that use ed25519 ssh certificates.
This is a breaking change for:
- gitea.com/gitea/tea (go-sdk) - I'll be sending a PR there too
- activitypub using deprecated crypto (is this actually used?)
(cherry picked from commit 01dec7577a051d9bb30e91f6cf6653dc51a37d06)
---
Conflict resolution: trivial
Co-authored-by: Wim <wim@42.be>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5303
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
### What?
It removes the source branch that is not necessary in the PR list (see #5009). It adds a little chevron to the right in front of the target branch. That could be replaced by words (“into”), or removed, if preferred. But, I think it looks decent like that.
### Screenshots
#### Before
![image](/attachments/be3c9817-2207-4610-b6bd-70304436f81d)
#### After
![image](/attachments/a7c84d2f-1592-4a82-aecc-d038f9495ef7)
### Testing
Run the development version of forgejo from the PR. For any existing repository with PRs, open the pulls list.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6522
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
So that it does not use docker.io
The test happens at `.forgejo/workflows/build-release-integration.yml`
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6573
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
Regressions of #6459 and #6542:
`templates/repo/issue/navbar.tmpl`:
* `issue-list-navbar` is the ordering class which was incorrectly removed
* and then it was incorrectly replaced with `list-header-toggle`
`templates/repo/issue/openclose.tmpl`:
* it did not have ordering rules in the first place
* but then `list-header-toggle` was incorrectly applied to it
Thanks to @fnetX for spotting and notifying!
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6576
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
As per https://codeberg.org/forgejo/forgejo/pulls/6400, the after hook runs for every test, resulting in duplicated screenshots.
Not all tests are supposed to generate screenshots, especially because they could be flaky (also see 206d4cfb7a ).
Additionally, the implicit behaviour might have caused confusion, so we now create screenshots explicitly, adding the statements from the tests that already generated screenshots.
This PR wants to improve information of the tasks waiting to be executed on a global, organization, user and repository leve.
The main motivation is explained here https://codeberg.org/forgejo/discussions/issues/241
## Checklist
The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).
### Tests
- I added test coverage for Go changes...
- [x] in their respective `*_test.go` for unit tests.
- [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
- [ ] in `web_src/js/*.test.js` if it can be unit tested.
- [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).
### Documentation
- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.
### Release notes
- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.
<!--start release-notes-assistant-->
## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
- [PR](https://codeberg.org/forgejo/forgejo/pulls/6300): <!--number 6300 --><!--line 0 --><!--description QWRkIHNlYXJjaCBhY3Rpb24gam9icyBmb3IgQVBJIHJvdXRlcywgcmVwbywgb3JnIGFuZCBnbG9iYWwgbGV2ZWw=-->Add search action jobs for API routes, repo, org and global level<!--description-->
<!--end release-notes-assistant-->
Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarzª>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6300
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Jaime merino <cobak78@gmail.com>
Co-committed-by: Jaime merino <cobak78@gmail.com>
Followup to https://codeberg.org/forgejo/forgejo/pulls/6459.
Usually it's quite hard to have inputs with balanced size that works for both desktop and mobile: it's either too large or too small for one of them. I think this can be a solution for this new element.
I tried it locally, it feels good on a phone. There's likely one downside which is that the switch will still be larger on touch devices even when they're wide, like on tablets. I think it can be resolved separately at some point. It isn't a problem on small devices because usually these elements go on separate rows.
## Preview
This change only affects touch devices.
|Before|After|
|-|-|
|![](/attachments/75311c3f-2e19-4b03-9596-7f78c78f0a70)|![](/attachments/74f987af-57c1-417d-89ed-f96666cb9bad)|
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6546
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
Identical to console, file or conn but writes to a buffer instead.
It is useful in two contexts:
- tests that need to assert the logs in a way that is simpler than
LogChecker.
- capturing the logs of a given task to display in the web UI,
return from the API, etc.
Since all logged events at a given level are written to the buffer by default, it is best used with WriterMode.Expression to only keep the log lines of interest.
## Checklist
The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).
### Tests
- I added test coverage for Go changes...
- [x] in their respective `*_test.go` for unit tests.
- [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
- [ ] in `web_src/js/*.test.js` if it can be unit tested.
- [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).
### Documentation
- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.
### Release notes
- [x] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6551
Reviewed-by: Antonin Delpeuch <wetneb@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
Followup to https://codeberg.org/forgejo/forgejo/pulls/6459 and https://codeberg.org/forgejo/forgejo/pulls/6542.
There are some edge cases where the UI would try to stretch the switch. Such inputs aren't really supposed to be dynamically stretched like this because it never looks good. So, I added a few rules to prevent this.
## Preview
This is the edge case with an artificially narrow screen.
|Before|After|
|-|-|
|![](/attachments/343d395c-54dd-4d86-a402-0c6b6a06237a)|![](/attachments/26b072a3-4056-4b1a-a08f-e903160609d9)|
No visual changes are expected outside of such edge case.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6543
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
[skip ci] no relevant tests
It's been there for a while. `flex-start` causes all items to stick to one side and be misaligned if they have different heights.
`align-items` isn't actually needed in this area when the goal is centered vertical alignment, however, unsetting it _could_ break items' height. I couldn't make it do that, but to be safe I kept it and only replaced the value.
## Preview
|![](/attachments/5ccf3c2d-c468-4524-84b4-efa3b3d5a60a)|
|-|
|![](/attachments/5ad079e9-5e22-4118-b1cd-492ad51f0371)|
There's no difference when they're broken into two rows, on mobile.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6541
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>