JS library to interact with Forgejo API to work with notifications https://forgejo-notifications-core.docs.forgeflux.org/
Find a file
Aravinth Manivannan 7fa40b5872
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: building for web target
2023-09-19 03:11:02 +05:30
.reuse feat: init 2023-09-16 15:12:35 +05:30
integration chore: rm sleep and curl debugs 2023-09-19 01:55:45 +05:30
LICENSES feat: init 2023-09-16 15:12:35 +05:30
scripts fix: check_arg 2023-09-19 02:12:39 +05:30
src fix: building for web target 2023-09-19 03:11:02 +05:30
.gitignore fix: use tmp/ instead of secrets/ 2023-09-18 22:30:02 +05:30
.nvmrc feat: setup jest and typescript 2023-09-18 17:56:31 +05:30
.swcrc fix: building for web target 2023-09-19 03:11:02 +05:30
.woodpecker.yml feat: CI: publish docs 2023-09-19 01:57:09 +05:30
docker-compose-dev-deps.yml fix: rm file mode from docker compose 2023-09-18 21:47:21 +05:30
jest.config.ts fix: use testenv in jest to avoid CORS 2023-09-19 01:34:31 +05:30
Makefile feat: publish test coverage 2023-09-19 02:46:49 +05:30
package.json fix: building for web target 2023-09-19 03:11:02 +05:30
pnpm-lock.yaml feat: update pnpm 2023-09-18 22:09:14 +05:30
README.md feat: add links 2023-09-19 02:48:32 +05:30
setupJest.js fix: enable fetch api in jest 2023-09-18 19:05:53 +05:30
spack.config.js fix: building for web target 2023-09-19 03:11:02 +05:30

status-badge


  1. Docs: https://forgejo-notifications-core.docs.forgeflux.org/
  2. Code coverage: https://forgejo-notifications-core.docs.forgeflux.org/coverage/lcov-report/index

Dev Notes

Requires your Forgejo instance admin to enable CORS for at least the origin which serves the notification panel. Please see here for more information.

NOTE: The test forgejo configuration may be insecure for your usecase since it allows CORS for all origins with the widest possible surface.

Build

pnpm install
pnpm run build

Compiled library will be available at ./dist/index.js

Docs

https://forgejo-notifications-core.docs.forgeflux.org

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.

pnpm install
make env.up
make test