{"id":17184824,"url":"https://github.com/liskin/gh-linkchecker","last_synced_at":"2025-03-25T03:28:04.989Z","repository":{"id":240421608,"uuid":"802588695","full_name":"liskin/gh-linkchecker","owner":"liskin","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-19T22:52:19.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T04:17:45.509Z","etag":null,"topics":["ci","continuous-integration","github","github-actions","github-pages","link-check","link-checker","link-checking"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liskin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-18T18:05:15.000Z","updated_at":"2024-05-19T22:50:43.000Z","dependencies_parsed_at":"2024-05-18T19:28:31.157Z","dependency_job_id":"4601ed3d-f8cc-431f-bcc5-34282b605072","html_url":"https://github.com/liskin/gh-linkchecker","commit_stats":null,"previous_names":["liskin/gh-linkchecker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liskin%2Fgh-linkchecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liskin%2Fgh-linkchecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liskin%2Fgh-linkchecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liskin%2Fgh-linkchecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liskin","download_url":"https://codeload.github.com/liskin/gh-linkchecker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245392004,"owners_count":20607753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","continuous-integration","github","github-actions","github-pages","link-check","link-checker","link-checking"],"created_at":"2024-10-15T00:44:32.977Z","updated_at":"2025-03-25T03:28:04.943Z","avatar_url":"https://github.com/liskin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action: linkchecker\n\nGitHub Action that checks links using\n[LinkChecker](https://linkchecker.github.io/linkchecker/).\n\nFeatures:\n\n* [LinkChecker features](https://linkchecker.github.io/linkchecker/#features)\n* retry failures\n* output to GitHub as error/warning/notice annotations\n* custom [jq](https://jqlang.github.io/jq/) filters that can be used to\n  implement complex ignore rules that can't be expressed in linkcheckerrc,\n  such as turning warnings or ignoring only temporary redirects but not\n  permanent redirects\n\n## Usage\n\n### Basic Example - check external links and anchors of your GitHub Pages\n\n```yaml\nname: Check for broken links\n\non:\n  workflow_dispatch:\n  schedule:\n    # Run every weekend\n    - cron: '0 2 * * 6'\n\njobs:\n  linkchecker:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: liskin/gh-linkchecker@v0.1.0\n        with:\n          retries: 3\n          linkcheckerrc: |\n            [filtering]\n            checkextern=1\n            [AnchorCheck]\n```\n\n### Advanced Example - tweak severity of redirects\n\n```yaml\n      - uses: liskin/gh-linkchecker@v0.1.0\n        with:\n          # …\n          linkcheckerrc: |\n            [filtering]\n            checkextern=1\n          custom-jq-filter-post: |\n            def moved_permanently_to_error:\n                if is_warning and (.warning | contains(\"status: 301 \")) then\n                    to_error\n                end;\n\n            def moved_temporarily_to_info:\n                if is_warning and (.warning | contains(\"status: 302 \")) then\n                    to_info\n                end;\n\n            map(\n                moved_permanently_to_error |\n                moved_temporarily_to_info\n            )\n```\n\nOther examples of advanced custom jq filter usage:\n\n* \u003chttps://github.com/liskin/work.lisk.in/blob/master/.github/workflows/linkchecker.yaml\u003e\n\n### Parameters\n\n* `urls`\n    * Space-separated list of URLs to crawl\n    * (Default: GitHub Pages URL of the invoking repository)\n* `linkcheckerrc`\n    * Configuration file for LinkChecker\n    * (Default: empty)\n* `custom-jq-filter`\n    * Custom jq filter/program that can be used to implement complex ignore\n      rules that can't be expressed in linkcheckerrc.\n      This filter is run after every linkchecker attempt, so using it to\n      upgrade warnings to errors will cause retries.\n    * Helper functions from [linkchecker.jq](linkchecker.jq) are available.\n    * (Default: `.`)\n* `custom-jq-filter-post`\n    * Custom jq filter/program that can be used to implement complex ignore\n      rules that can't be expressed in linkcheckerrc, such as turning warnings\n      into errors or ignoring only temporary redirects but not permanent\n      redirects.\n      This filter is run after a successful (no errors) linkchecker attempt.\n    * Helper functions from [linkchecker.jq](linkchecker.jq) are available.\n    * (Default: `.`)\n* `retries`\n    * Maximum number of retries (if there are any errors)\n    * (Default: 1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliskin%2Fgh-linkchecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliskin%2Fgh-linkchecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliskin%2Fgh-linkchecker/lists"}