Commit graph

20055 commits

Author SHA1 Message Date
Caesar Schinas
dfd3ac01d7
Revert "Prevent allow/reject reviews on merged/closed PRs"
This reverts commit 4ed372af13.
This change from Gitea was not considered by the Forgejo UI team and there is a consensus that it feels like a regression.

The test which was added in that commit is kept and modified to test that reviews can successfully be submitted on closed and merged PRs.

Closes forgejo/design#11

(cherry picked from commit 65c2595f26)
2024-08-15 10:47:38 +01:00
Michael Kriese
35c206317b Merge pull request '[v8.0/forgejo] fix: Run full PR checks on agit push' (#4951) from bp-v8.0/forgejo-2d05e92 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4951
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-13 19:19:56 +00:00
Michael Kriese
f7858425bb fix(agit): run full pr checks on force-push
(cherry picked from commit 2d05e922a2)
2024-08-13 18:26:41 +00:00
Gusted
7b31a541c0 Merge pull request '[v8.0/forgejo] fix(ui): allow unreacting from comment popover' (#4919) from bp-v8.0/forgejo-b8a5ca2 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4919
Reviewed-by: Otto <otto@codeberg.org>
2024-08-10 12:49:39 +00:00
Solomon Victorino
df2e85f667 fix(ui): allow unreacting from comment popover
- fix selectors for hasReacted
- don't send empty HTML on reaction errors
- add E2E test

(cherry picked from commit b8a5ca2c40)
2024-08-10 09:42:40 +00:00
Earl Warren
7acc1d98d2 Merge pull request '[v8.0/forgejo] [BUG] Return blocking errors as JSON errors' (#4918) from bp-v8.0/forgejo-d97cf0e into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4918
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-10 06:42:17 +00:00
Gusted
d9010f5cfa [BUG] Return blocking errors as JSON errors
- These endspoints are since b71cb7acdc
JSON-based and should therefore return JSON errors.
- Integration tests adjusted.

(cherry picked from commit d97cf0e854)
2024-08-10 05:53:07 +00:00
Gusted
4d0be867a2 Merge pull request '[v8.0/forgejo] disallow javascript: URI in the repository description' (#4901) from bp-v8.0/forgejo-bb448f3 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4901
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-09 06:59:16 +00:00
Gusted
dccf180307 disallow javascript: URI in the repository description
- Fixes an XSS that was introduced in
https://codeberg.org/forgejo/forgejo/pulls/1433
- This XSS allows for `href`s in anchor elements to be set to a
`javascript:` uri in the repository description, which would upon
clicking (and not upon loading) the anchor element execute the specified
javascript in that uri.
- [`AllowStandardURLs`](https://pkg.go.dev/github.com/microcosm-cc/bluemonday#Policy.AllowStandardURLs) is now called for the repository description
policy, which ensures that URIs in anchor elements are `mailto:`,
`http://` or `https://` and thereby disallowing the `javascript:` URI.
It also now allows non-relative links and sets `rel="nofollow"` on
anchor elements.
- Unit test added.

(cherry picked from commit bb448f3dc2)
2024-08-09 05:57:21 +00:00
0ko
1c0043efd6 Merge pull request 'i18n: backport of #4668 and #4783 to v8' (#4881) from 0ko/forgejo:i18n-backport-20240808-v8 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4881
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-08 09:41:04 +00:00
Codeberg Translate
32cf107774 [v8.0/forgejo] i18n: update of translations from Weblate
Backport of https://codeberg.org/forgejo/forgejo/pulls/4783.

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: natalie_drowned02 <k_letovskiy02@protonmail.com>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: pswsm <pswsm@users.noreply.translate.codeberg.org>
Co-authored-by: dragon <dragon@users.noreply.translate.codeberg.org>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Marco Ciampa <ciampix@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4783
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
(cherry picked from commit abc3364a7b)
2024-08-08 13:08:19 +05:00
Codeberg Translate
a7e414b0f1 [v8.0/forgejo] i18n: Translations update from Weblate
Backport of https://codeberg.org/forgejo/forgejo/pulls/4668.

Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: lotigara <lotigara@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: caesar <caesar@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4668
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
(cherry picked from commit 3d3ddd7704)
2024-08-08 13:06:36 +05:00
Earl Warren
9a857d73ad Merge pull request '[v8.0/forgejo] [BUG] Ensure all filters are persistent in issue filters' (#4865) from bp-v8.0/forgejo-192177f into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4865
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-07 06:57:13 +00:00
Earl Warren
9b1eb835c2 Merge pull request '[v8.0/forgejo] [BUG] Render references to cross-repo issues with external issues' (#4864) from bp-v8.0/forgejo-05e163a into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4864
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-07 06:32:59 +00:00
Gusted
160efced12 [BUG] Ensure all filters are persistent in issue filters
- Ensure that all filters are set in the issue filters links, thus
becoming persistent.
- Adds integration test
- Resolves #4843

(cherry picked from commit 192177fc88)
2024-08-07 05:51:15 +00:00
Gusted
d3260fe348 [BUG] Render references to cross-repo issues with external issues
- If you have the external issue setting enabled, any reference would
have been rendered as an external issue, however this shouldn't be
happening to references that refer to issues in other repositories.
- Unit test added.

(cherry picked from commit 05e163aaf3)
2024-08-07 05:43:24 +00:00
Gusted
055261967b Merge pull request '[v8.0/forgejo] [UI] Do not include trailing EOL character when counting lines' (#4848) from bp-v8.0/forgejo-5cf9767 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4848
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 13:53:47 +00:00
Gusted
56b7478b25 [UI] Do not include trailing EOL character when counting lines
- Adjust the counting of the number of lines of a file to match the
amount of rendered lines. This simply means that a file with the content
of `a\n` will be shown as having `1 line` rather than `2 lines`. This
matches with the amount of lines that are being rendered (the last empty
line is never rendered) and matches more with the expecation of the
user (a trailing EOL is a technical detail).
- In the case there's no EOL, the reason why it was counting
'incorrectly' was to show if there was a trailing EOL or not, but now
text is shown to tell the user this.
- Integration test added.
- Resolves Codeberg/Community#1612

(cherry picked from commit 5cf976739c)
2024-08-06 12:24:38 +00:00
Gusted
04d4120adf Merge pull request '[v8.0/forgejo] [UI] Add background to reactions on hover' (#4847) from bp-v8.0/forgejo-cc11b30 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4847
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-08-06 12:22:30 +00:00
Gusted
e547439b96 [UI] Add reaction hover background color
- Follows 595e8abd68
- Add the reaction hover background color variable, slightly lighter
than the active background color.

(cherry picked from commit cc11b3027c)
2024-08-06 09:54:50 +00:00
Gusted
6904b833e1 Merge pull request '[v8.0/forgejo] [BUG] Allow 4 charachter SHA in /src/commit' (#4840) from bp-v8.0/forgejo-b967fce into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4840
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-06 02:15:55 +00:00
Gusted
57cb5eaf41 [BUG] Allow 4 charachter SHA in /src/commit
- Adjust the `RepoRefByType` middleware to allow for commit SHAs that
are as short as 4 characters (the minium that Git requires).
- Integration test added.
- Follow up to 4d76bbeda7
- Resolves #4781

(cherry picked from commit b967fce25d)
2024-08-06 01:18:48 +00:00
Earl Warren
6df8b97344 Merge pull request '[v8.0/forgejo] [CHORE] Remove SSH DSA tests' (#4834) from bp-v8.0/forgejo-eb8c125 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4834
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 21:48:47 +00:00
Gusted
4ec8aa73b6 [CHORE] Remove SSH DSA tests
- Partially resolves #4659
- Fixes CI.

(cherry picked from commit eb8c125788)
2024-08-05 21:04:17 +00:00
Earl Warren
b701c6f747 Merge pull request '[v8.0/forgejo] fix(ui): handle out-of-bounds end line in code selection' (#4821) from bp-v8.0/forgejo-3ee5bc2 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4821
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-05 05:49:11 +00:00
Solomon Victorino
82e0be3761 fix(ui): handle out-of-bounds end line in code selection (#4788)
- fallback to the last line, preventing TypeError
- add E2E test

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4788
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Solomon Victorino <git@solomonvictorino.com>
Co-committed-by: Solomon Victorino <git@solomonvictorino.com>
(cherry picked from commit 3ee5bc262f)
2024-08-05 04:45:56 +00:00
Earl Warren
093657bdc4 Merge pull request '[v8.0/forgejo] Prevent uppercase in header of dashboard context selector' (#4807) from bp-v8.0/forgejo-a4f1d0b into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4807
2024-08-04 14:19:51 +00:00
0ko
e5749e3d32 fix(ui): prevent uppercase in header of dashboard context selector
(cherry picked from commit a4f1d0bc43)
2024-08-04 13:23:06 +00:00
Earl Warren
7e85d5b6d9 Merge pull request '[v8.0/forgejo] [API] Add error messages to dispatch API' (#4770) from bp-v8.0/forgejo-db78a3a into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4770
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-01 09:52:39 +00:00
Gusted
f45a1a9af7 [API] Add error messages to dispatch API
- Add a error messages to the dispatch
API (https://code.forgejo.org/api/swagger#/repository/DispatchWorkflow)
when incorrect values are given. Otherwise an incorrect error message is
shown to the user.
- Relevant https://codeberg.org/forgejo/forgejo/issues/4765#issuecomment-2125392

(cherry picked from commit db78a3abed)
2024-08-01 08:23:59 +00:00
Gusted
966a354806 Merge pull request '[CHORE] Fix linting issue in v8' (#4771) from gusted/fix-lint into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4771
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 22:29:49 +00:00
Gusted
7f4428f509
[CHORE] Fix linting issue in v8
- Introduced by 118762dd6d
2024-07-31 23:12:14 +02:00
Earl Warren
43c9092065 Merge pull request '[v8.0/forgejo] fix: use url.JoinPath to join url parts' (#4762) from bp-v8.0/forgejo-46357e7 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4762
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-31 14:56:46 +00:00
forgejo-backport-action
118762dd6d [v8.0/forgejo] fix(UI): issue task list numbers, fix #4431 (#4735)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/4452

## Regexp fixes
This fixes #4431 by adjusting the related regular expressions. Also it allows to have multiple spaces between `-` or `*` and the following brackets.

Related is the following gitea PR: https://github.com/go-gitea/gitea/pull/3296. I wonder a bit why the author stated
> Also fixed the requirement for one character after the blank of - [ ] .

I don't see a reason why
```
- [x]
some task
```
shall not be a valid checkbox without any character after the `]`. E.g., this would render to
- [x]
some task

The third commit fixes this issue.

### Comments
- I wonder a bit why the regexp is written in such complicated way and if
  ```diff
  - (^\s*[-*]\s*\[[\sxX]\])|(
\s*[-*]\s*\[[\sxX]\])
  + (^|
)\s*[-*]\s*\[[\sxX]\]
  ```
  would work the same way. Edit: I tried and indeed the second regex works as expected.
- ~~Why it is actually matching the `\s` and not just the space (` `)? (but OK, no big issue)~~ Edit: `[\t]` is also allowed. Keep it!
- Check boxes in code blocks are counted as well, but I think that this is an edge case which is not a big issue as well.

### Before
![before](https://codeberg.org/attachments/cb4f879d-cdd2-4814-aed2-5de8b5437fb2)
### After
![after](https://codeberg.org/attachments/5d54648f-dd73-4577-9a80-729016219093)

## Javascript fixes
Additionally, while testing I figured out, that currently checkboxes with capital `X` like
```
- [X] another task
```
- [X] another task

cannot be unchecked. Thus, the second commit fixes that issue as well.

## Checklist

The [developer guide](https://forgejo.org/docs/next/developer/) 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...
  - [ ] 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.

Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4735
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-07-31 14:16:11 +00:00
Michael Kriese
2f29452b9f fix: use url.JoinPath to join url parts
This avoids duplicated or more slashes.

fixes #4759

(cherry picked from commit 46357e7856)
2024-07-31 14:02:26 +00:00
Earl Warren
8493433cfb Merge pull request '[v8.0/forgejo] [UI] Fix admin layout' (#4756) from bp-v8.0/forgejo-7ec6014 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4756
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-31 04:53:09 +00:00
Gusted
c3b03f898a [UI] Fix admin layout
- Partially reverts a72b660cbb
- Restores the behavior of #3087

(cherry picked from commit 7ec6014a10)
2024-07-31 04:13:40 +00:00
TheFox0x7
ce563ade3d enable linter testifylint on v8 (#4573)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4573
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-07-30 19:41:27 +00:00
Earl Warren
4d2263e82e Merge pull request '[v8.0/forgejo] [UI] Show AGit label on merged PR' (#4732) from bp-v8.0/forgejo-358ec80 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4732
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-29 15:32:33 +00:00
Earl Warren
2f022232bb Merge pull request '[v8.0/forgejo] fix: never set to nil: poster of an issue or comment; assignee of a comment' (#4733) from bp-v8.0/forgejo-e6786db into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4733
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-29 15:32:10 +00:00
Earl Warren
0f853d1a93 fix: never set Poster or Assignee to nil
When a user is not found for whatever reason, it must be mapped to the
GhostUser.

Fixes: https://codeberg.org/forgejo/forgejo/issues/4718
(cherry picked from commit e6786db393)
2024-07-29 14:32:57 +00:00
Gusted
e30ca3a92c [UI] Show AGit label on merged PR
- The label wasn't show on merged PRs.
- Integration test added

(cherry picked from commit 358ec8002e)
2024-07-29 14:24:03 +00:00
Earl Warren
d09d633c9c Merge pull request '[v8.0/forgejo] Fix conversation template' (#4694) from bp-v8.0/forgejo-13cb4b3 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4694
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 21:25:01 +00:00
0ko
2e68922af9 fix(ui): fix conversation template
(cherry picked from commit 13cb4b3f2e)
2024-07-25 20:46:52 +00:00
Earl Warren
12e5d924b1 Merge pull request '[v8.0/forgejo] fix(api): issue state change is not idempotent' (#4689) from bp-v8.0/forgejo-e9e3b8c into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4689
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 15:08:58 +00:00
Earl Warren
533623b659 fix(api): issue state change is not idempotent
The PATCH if issue & pull request switched to use the service
functions instead. However, the service function changing the state is
not idempotent. Instead of doing nothing which changing from open to
open or close to close, it will fail with an error like:

 Issue [2472] 0 was already closed

Regression of: 6a4bc0289d

Fixes: https://codeberg.org/forgejo/forgejo/issues/4686
(cherry picked from commit e9e3b8c0f3)
2024-07-25 14:21:11 +00:00
forgejo-backport-action
887a914a7d [v8.0/forgejo] fix(ui): use right placeholder string in milestones search (#4682)
Backport of https://codeberg.org/forgejo/forgejo/pulls/4628.

This PR fixes a wrong placeholder for the search for milestones. I tested it locally (see attachments, below).

Before: https://codeberg.org/attachments/ba845ce1-1f20-4131-a74d-7220986a4acf
After: https://codeberg.org/attachments/0c4e32ee-b1a8-4472-837d-daa2a2a50121

Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4682
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-07-25 08:00:09 +00:00
Earl Warren
4819c83a5c Merge pull request '[v8.0/forgejo] [CHORE] Don't bundle elkjs' (#4680) from bp-v8.0/forgejo-510cbe2 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4680
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-25 05:57:21 +00:00
Gusted
e362e0813d [CHORE] Don't bundle elkjs
- `elkjs` is a library that's imported by `mermaid`, although they have
seperated this package to it's own mermaid
package (https://github.com/mermaid-js/mermaid/pull/5654), the stable
version doesn't have this patch.
- `elkjs` is licensed under the EPL-2.0 license (copyleft), which isn't
compatible with GPL unless the license author explcitly allow this via a
so called "secondary license". At the end of the day it cannot be
released under a MIT or GPL license.
- Use webpack's `externals` option to avoid bundling `elkjs` and instead
leave it as a `require` code.
- This is a 'dirty' way to ensure elkjs isn't bundled and has to be
tested manually to ensure this for every release (via the
`webpack-bundle-analyzer` plugin). If someone tries to use the elkjs
render, it will result in a non-descriptive error being shown.

(cherry picked from commit 510cbe2c92)
2024-07-25 00:20:31 +00:00
Earl Warren
c8b6e07840 Merge pull request '[v8.0/forgejo] Replace Gitea with Forgejo' (#4675) from bp-v8.0/forgejo-9ad23f9 into v8.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4675
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-24 23:18:29 +00:00