diff --git a/docs/scripts.md b/docs/scripts.md index 896ca2a46c..7576de3b6c 100644 --- a/docs/scripts.md +++ b/docs/scripts.md @@ -7,9 +7,11 @@ For the scripts to work, you must have [Node.js](https://nodejs.org/en) installe - [act:check](#actcheck) - [act:format](#actformat) - [act:update](#actupdate) +- [act:validate_discussion](#actvalidate_discussion) - [act:validate_issue](#actvalidate_issue) - [act:validate_label](#actvalidate_label) - [api:load](#apiload) +- [discussion:validate](#discussionvalidate) - [issue:validate](#issuevalidate) - [playlist:format](#playlistformat) - [playlist:update](#playlistupdate) @@ -48,6 +50,14 @@ Runs the [update](./workflows.md#update) workflow locally. Depends on [nektos/gh npm run act:update ``` +## act:validate_discussion + +Runs the [validate_discussion](./workflows.md#validate_discussion) workflow locally. Depends on [nektos/gh-act](https://github.com/nektos/gh-act). + +```sh +npm run act:validate_discussion -- -e .github/mocks/events/discussion_opened.json -s GITHUB_TOKEN=github_pat_*** +``` + ## act:validate_issue Runs the [validate_issue](./workflows.md#validate_issue) workflow locally. Depends on [nektos/gh-act](https://github.com/nektos/gh-act). @@ -72,6 +82,14 @@ Downloads the latest channel and stream data from the [iptv-org/api](https://git npm run api:load ``` +## discussion:validate + +Checks the request for errors and saves the result to the file `temp/logs/result.json` + +```sh +npm run discussion:validate --number=123 --body="### Stream URL..." +``` + ## issue:validate Checks the request for errors and, if any are found, saves a list of them to the file `temp/logs/errors.txt` diff --git a/docs/workflows.md b/docs/workflows.md index d70b724dea..5ccf361bb8 100644 --- a/docs/workflows.md +++ b/docs/workflows.md @@ -16,6 +16,10 @@ Sequentially runs the `api:load`, `playlist:format`, `playlist:lint`, and `playl Runs every day at 0:00 UTC. It sequentially executes the `api:load`, `playlist:update`, `playlist:lint`, `playlist:validate`, `playlist:generate`, `playlist:export`, and `readme:update` scripts, then automatically deploys the updated files if successful. +## validate_discussion + +Runs when an discussion is opened or edited. It checks the requests for errors using `discussion:validate` script and, if any are found, the bot posts them in the comments. + ## validate_issue Runs when an issue is opened or edited. It checks the requests for errors using `issue:validate` script and, if any are found, the bot posts them in the comments.