Update CONTRIBUTING.md

pull/14226/head
freearhey 1 year ago
parent 1c45e6a558
commit 2352f6013e

@ -4,6 +4,7 @@
- [Stream Description Scheme](#stream-description-scheme)
- [Project Structure](#project-structure)
- [Scripts](#scripts)
- [Workflows](#workflows)
## How to?
@ -115,6 +116,8 @@ http://example.com/stream.m3u8
## Scripts
These scripts are created to automate routine processes in the repository and make it a bit easier to maintain.
For scripts to work, you must have [Node.js](https://nodejs.org/en) installed on your computer.
To run scripts use the `npm run <script-name>` command.
@ -125,7 +128,7 @@ To run scripts use the `npm run <script-name>` command.
- `api:generate`: generates a JSON file with all streams for the [iptv-org/api](https://github.com/iptv-org/api) repository.
- `api:deploy`: allows to manually upload a JSON file created via `api:generate` to the [iptv-org/api](https://github.com/iptv-org/api) repository. To run the script you must provide your [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with write access to the repository.
- `db:create`: сreates a temporary file `temp/database/streams.db` containing all links from the [/streams]() folder.
- `playlist:update`: triggers an update of internal playlists. The process involves processing requests from issues, URL normalization, and sorting links by channel name, quality, and label.
- `playlist:update`: triggers an update of internal playlists. The process involves processing approved requests from issues, URL normalization, and sorting links by channel name, quality, and label.
- `playlist:validate`: сhecks ids and links in internal playlists for errors.
- `playlist:lint`: сhecks internal playlists for syntax errors.
- `playlist:generate`: generates all public playlists.
@ -138,3 +141,12 @@ To run scripts use the `npm run <script-name>` command.
- `deploy`: (shorthand) sequentially runs the `playlist:deploy` and `api:deploy` commands.
- `report`: (shorthand) sequentially runs the `api:load` and `report:create` commands.
- `test`: runs a test of all the scripts described above.
## Workflows
To automate the run of the scripts described above, we use the [GitHub Actions workflows](https://docs.github.com/en/actions/using-workflows).
Each workflow includes its own set of scripts that can be run either manually or in response to an event.
- `check`: sequentially runs the `playlist:check` and `playlist:validate` scripts when a new pull request appears, and blocks the merge if it detects an error in it.
- `update`: every day at 0:00 UTC sequentially runs `api:load`, `db:create`, `playlist:update`, `playlist:lint`, `playlist:validate`, `playlist:generate`, `api:generate` and `readme:update` scripts and deploys the output files if successful.

Loading…
Cancel
Save