{"id":20441261,"url":"https://github.com/leavesster/pull-request-path-filter","last_synced_at":"2025-03-05T07:43:07.079Z","repository":{"id":251760746,"uuid":"838352094","full_name":"leavesster/pull-request-path-filter","owner":"leavesster","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-21T02:10:21.000Z","size":285,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T20:27:22.009Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leavesster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-05T13:16:16.000Z","updated_at":"2024-11-20T11:20:26.000Z","dependencies_parsed_at":"2024-08-08T15:29:58.361Z","dependency_job_id":"d33be8a1-5790-4ceb-b826-608c9de76e1d","html_url":"https://github.com/leavesster/pull-request-path-filter","commit_stats":null,"previous_names":["leavesster/pull-request-path-filter"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavesster%2Fpull-request-path-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavesster%2Fpull-request-path-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavesster%2Fpull-request-path-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavesster%2Fpull-request-path-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leavesster","download_url":"https://codeload.github.com/leavesster/pull-request-path-filter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241989854,"owners_count":20053802,"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":[],"created_at":"2024-11-15T09:31:21.402Z","updated_at":"2025-03-05T07:43:07.059Z","avatar_url":"https://github.com/leavesster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Action Path Filtering\n\nA workaround action for [handling-skipped-but-required-checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks).\nPlease note that this action is not a perfect solution, it's just a workaround. **It's just work for `pull_request` and `pull_request_target` events, and it's not work for `push` event**.\n\n## Inputs\n\njust like github action's [path and paths-ignore](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore). The only difference is that you need add `|` at the beginning.\n\n```yaml\nname: pull request\non:\n  pull_request: # or pull_request_target, this action only works for these two events\n    # paths: \n    #   - \"src/**\" just move to the action's input\njobs:\n  path-filter:\n    runs-on: ubuntu-latest\n    outputs:\n      should_skip: ${{ steps.filter.outputs.should_skip }}\n    steps:\n      - uses: actions/checkout@v4 # better this action use git diff, so you need checkout the code first\n        with:\n          filter: blob:none # reduce clone size\n          fetch-depth: 0 # need full history, the default is 1, which is not enough. if you limit the pull request' commit length, you can set it to your limit.\n      - uses: leavesster/pull-request-path-filter@v0.2 # v0.2 is the latest version\n        id: \"filter\"\n        with:\n          paths: | # notice the `|`, it's required. the left is same as github action's path and paths-ignore\n            - \"src/**\"\n  path-echo:\n    runs-on: ubuntu-latest\n    needs: path-filter\n    if: ${{ needs.path-filter.outputs.should_skip != 'true' }} # skip the job still report status check as success.\n    steps:\n      - run: echo \"path hit\"\n```\n\n## Outputs\n\n### `should_skip`\n`should_skip` is a boolean value, it's `true` if the pull request should be skipped, otherwise `false`.\n\n### `changed_files`\n`changed_files` is a string list, it's the changed files in the pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleavesster%2Fpull-request-path-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleavesster%2Fpull-request-path-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleavesster%2Fpull-request-path-filter/lists"}