2023-09-19 02:07:19 +05:30
|
|
|
[![status-badge](https://ci.batsense.net/api/badges/85/status.svg)](https://ci.batsense.net/repos/85)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Dev Notes
|
|
|
|
|
2023-09-18 19:04:30 +05:30
|
|
|
Requires your Forgejo instance admin to enable CORS for at least the
|
|
|
|
origin which serves the notification panel. Please see
|
|
|
|
[here](https://forgejo.org/docs/latest/admin/config-cheat-sheet/#cors-cors)
|
|
|
|
for more information.
|
|
|
|
|
|
|
|
NOTE: The test [forgejo configuration](./integration/conf/app.ini) may
|
|
|
|
be insecure for your usecase since it allows CORS for all origins with
|
|
|
|
the widest possible surface.
|
2023-09-18 20:44:08 +05:30
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pnpm install
|
|
|
|
pnpm run build
|
|
|
|
```
|
2023-09-19 02:07:19 +05:30
|
|
|
|
2023-09-18 20:44:08 +05:30
|
|
|
Compiled library will be available at `./dist/index.js`
|
|
|
|
|
|
|
|
## Docs
|
|
|
|
|
2023-09-19 02:07:19 +05:30
|
|
|
https://forgejo-notifications-core.docs.forgeflux.org
|
|
|
|
|
2023-09-18 20:44:08 +05:30
|
|
|
```bash
|
|
|
|
pnpm install
|
|
|
|
pnpm run doc
|
|
|
|
firefox ./docs/index.html
|
|
|
|
```
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
|
|
|
There are [scripts][./integration] to setup a Forgejo instance locally,
|
|
|
|
create [bunch of]./integration/lib.sh) of users, repository and issues
|
|
|
|
to test all functionality offered by this library. It might be useful to
|
|
|
|
recreate this environment with `make env.up and ./integration/tests.sh`
|
|
|
|
for development.
|
|
|
|
|
|
|
|
Uses Docker.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pnpm install
|
|
|
|
make env.up
|
|
|
|
make test
|
|
|
|
```
|