{"id":15870892,"url":"https://github.com/int128/list-associated-pull-requests-action","last_synced_at":"2026-04-25T00:01:01.403Z","repository":{"id":37051188,"uuid":"461427656","full_name":"int128/list-associated-pull-requests-action","owner":"int128","description":"List associated pull requests of a pull request in monorepo by GitHub Actions","archived":false,"fork":false,"pushed_at":"2026-04-24T18:15:09.000Z","size":16864,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T19:27:58.488Z","etag":null,"topics":["github-actions","monorepo","release-notes"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-20T08:30:04.000Z","updated_at":"2026-04-24T18:14:36.000Z","dependencies_parsed_at":"2023-12-25T22:24:49.431Z","dependency_job_id":"30af5ace-9e62-4856-9037-71582b7c0501","html_url":"https://github.com/int128/list-associated-pull-requests-action","commit_stats":{"total_commits":354,"total_committers":3,"mean_commits":118.0,"dds":"0.11299435028248583","last_synced_commit":"ebf0b53f53da74f6235a2429317825ef032d3fac"},"previous_names":[],"tags_count":103,"template":false,"template_full_name":"int128/typescript-action","purl":"pkg:github/int128/list-associated-pull-requests-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Flist-associated-pull-requests-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Flist-associated-pull-requests-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Flist-associated-pull-requests-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Flist-associated-pull-requests-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/list-associated-pull-requests-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Flist-associated-pull-requests-action/sbom","scorecard":{"id":490147,"data":{"date":"2025-08-11","repo":{"name":"github.com/int128/list-associated-pull-requests-action","commit":"5d8bb58af54d5950f6f87bbc4a7e0c829c5b090b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yaml:18","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/ts.yaml:86","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/ts.yaml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: npmCommand not pinned by hash: .github/workflows/release.yaml:25","Warn: npmCommand not pinned by hash: .github/workflows/ts.yaml:35","Warn: npmCommand not pinned by hash: .github/workflows/ts.yaml:49","Warn: npmCommand not pinned by hash: .github/workflows/ts.yaml:94","Info:   8 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   4 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-9qxr-qj54-h672","Warn: Project is vulnerable to: GHSA-m4v8-wqvr-p9f7","Warn: Project is vulnerable to: GHSA-c76h-2ccp-4975","Warn: Project is vulnerable to: GHSA-cxrh-j4jr-qwg3","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T18:54:26.805Z","repository_id":37051188,"created_at":"2025-08-19T18:54:26.806Z","updated_at":"2025-08-19T18:54:26.806Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["github-actions","monorepo","release-notes"],"created_at":"2024-10-06T00:40:41.508Z","updated_at":"2026-04-25T00:01:01.376Z","avatar_url":"https://github.com/int128.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# list-associated-pull-requests-action [![ts](https://github.com/int128/list-associated-pull-requests-action/actions/workflows/ts.yaml/badge.svg)](https://github.com/int128/list-associated-pull-requests-action/actions/workflows/ts.yaml)\n\nThis is an action to generate a list of pull requests associated to a pull request.\n\n## Purpose\n\n### Problem to solve\n\nFor a mono repository (monorepo) and Git/GitLab Flow, we create a pull request to deploy changes to an environment such as production.\n\n```mermaid\ngitGraph\n  commit id: \"Initial\"\n  branch production\n  checkout main\n  commit id: \"A\"\n  commit id: \"B\"\n  commit id: \"C\"\n  checkout production\n  merge main\n  checkout main\n  commit id: \"D\"\n  commit id: \"E\"\n  commit id: \"F\"\n  checkout production\n  merge main\n  checkout main\n  commit id: \"G\"\n```\n\nA pull request often becomes too large to review, for example,\n\n\u003cimg width=\"700\" alt=\"image\" src=\"https://user-images.githubusercontent.com/321266/179123581-3821d840-3b2b-4c8a-80a5-0d119f661c6b.png\"\u003e\n\n### How to solve\n\nThis action inspects a pull request and extracts the associated pull requests.\n\nIt brings the following benefits:\n\n- You can review what to deploy\n- If a repository consists of Microservices, each team can review changes of their service\n\n## Inspect a pull request\n\nYou can generate the list of the pull requests associated to the current pull request.\n\n```yaml\non:\n  pull_request:\n\njobs:\n  comment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: int128/list-associated-pull-requests-action@v1\n        id: associated-pull-requests\n        with:\n          pull-request: ${{ github.event.number }}\n\n      # post it to the current pull request\n      - uses: int128/comment-action@v1\n        with:\n          post: |\n            ## Associated pull requests\n            ${{ steps.associated-pull-requests.outputs.body }}\n```\n\nThis action resolves associated pull requests by the following steps:\n\n1. Find the commits between base and head branch using GitHub Compare API\n2. Fetch the associated pull requests using GitHub GraphQL API\n\nHere is an example.\n\n\u003cimg width=\"920\" alt=\"image\" src=\"https://user-images.githubusercontent.com/321266/171992826-2a2b915e-7833-4134-a568-9ff300c47089.png\"\u003e\n\n## Group by paths\n\nYou can group associated pull requests by paths.\nThis feature is useful for monorepo.\n\n```yaml\n- uses: int128/list-associated-pull-requests-action@v1\n  with:\n    group-by-paths: |\n      backend\n      frontend\n```\n\nHere is an example.\n\n\u003cimg width=\"920\" alt=\"image\" src=\"https://user-images.githubusercontent.com/321266/171991965-82726459-05f9-4916-8069-55b4d7322a93.png\"\u003e\n\nYou can put a comment into `group-by-paths`.\nThis action ignores a line which starts with `#`.\nFor example,\n\n```yaml\n- uses: int128/list-associated-pull-requests-action@v1\n  with:\n    group-by-paths: |\n      # microservices\n      payment-frontend\n      payment-backend\n      # monolith\n      frontend\n      api\n```\n\n### How it groups\n\nThis action fetches the following lists:\n\n- A list of pull requests associated to a pull request\n- A list of commits of subtree for each path\n\nIf a commit exists in a path, the associated pull requests of the commit are grouped to the path.\n\nFor example, if the following commits exist,\n\n- Commit A, Pull Request #1, changed paths are `api` and `backend`\n- Commit B, Pull Request #2, changed path is `api`\n- Commit C, Pull Request #3, changed path is `backend`\n\nthis action returns the following markdown:\n\n```markdown\n### api\n\n- #1\n- #2\n\n### backend\n\n- #1\n- #3\n```\n\n### Others group\n\nIf a pull request does not belong to any group, it is grouped as \"Others\".\nYou can hide the Others group by `show-others-group`.\n\n## Compare base and head\n\nYou can generate the list of the pull requests between base and head branch.\n\n```yaml\njobs:\n  comment:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: int128/list-associated-pull-requests-action@v1\n        id: associated-pull-requests\n        with:\n          base: production\n          head: main\n\n      # post it to the current pull request\n      - uses: int128/comment-action@v1\n        with:\n          post: |\n            ## Associated pull requests\n            ${{ steps.associated-pull-requests.outputs.body }}\n```\n\n## Specification\n\n### Inputs\n\n| Name                | Default        | Description                               |\n| ------------------- | -------------- | ----------------------------------------- |\n| `token`             | `github.token` | GitHub token                              |\n| `pull-request`      | \u003csup\u003e\\*1\u003c/sup\u003e | Pull request to parse                     |\n| `group-by-paths`    | (optional)     | Group pull requests by paths (Multiline)  |\n| `show-others-group` | `true`         | Show others group                         |\n| `base`              | \u003csup\u003e\\*1\u003c/sup\u003e | Base branch                               |\n| `head`              | \u003csup\u003e\\*1\u003c/sup\u003e | Head branch                               |\n| `path`              | `.`            | Path to get the commit history of subtree |\n| `max-fetch-commits` | (unlimited)    | Maximum number of commits to fetch        |\n| `max-fetch-days`    | (unlimited)    | Maximum number of days to fetch history   |\n\nYou need to set either `base` and `head`, or `pull-request`.\n\nIf there is a very old commit in the repository, this action may fetch a lot of commits.\nYou can set `max-fetch-commits` or `max-fetch-days` to avoid the job timeout or GitHub API rate-limit.\n\n### Outputs\n\n| Name          | Description                                          |\n| ------------- | ---------------------------------------------------- |\n| `body`        | List of associated pull requests (Markdown)          |\n| `body-groups` | Grouped lists of associated pull requests (Markdown) |\n| `body-others` | Others list of associated pull requests (Markdown)   |\n| `json`        | List of associated pull requests (JSON)              |\n\n#### `json` output\n\nHere is an example of `json` output.\n\n```json\n{\n  \"groups\": {\n    \"frontend\": [\n      {\n        \"commitId\": \"aba1fb9e861f34176727a527a6e5af8ba74f628c\",\n        \"pull\": {\n          \"number\": 89,\n          \"title\": \"refactor: split basehead.ts\",\n          \"author\": \"int128\"\n        }\n      }\n    ]\n  },\n  \"others\": []\n}\n```\n\nSee the type definition in [src/history.ts](src/history.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Flist-associated-pull-requests-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Flist-associated-pull-requests-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Flist-associated-pull-requests-action/lists"}