{"id":13539904,"url":"https://github.com/peter-evans/find-comment","last_synced_at":"2025-05-14T19:07:30.870Z","repository":{"id":37870608,"uuid":"256447541","full_name":"peter-evans/find-comment","owner":"peter-evans","description":"A GitHub action to find an issue or pull request comment","archived":false,"fork":false,"pushed_at":"2025-04-27T02:29:21.000Z","size":1864,"stargazers_count":201,"open_issues_count":2,"forks_count":70,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-05T19:11:34.117Z","etag":null,"topics":["github-action","github-comments","github-issues"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/peter-evans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"peter-evans"}},"created_at":"2020-04-17T08:35:24.000Z","updated_at":"2025-04-29T15:10:08.000Z","dependencies_parsed_at":"2023-09-24T06:20:16.049Z","dependency_job_id":"c7830ae1-0b55-4967-8cb2-167d660affcf","html_url":"https://github.com/peter-evans/find-comment","commit_stats":{"total_commits":347,"total_committers":8,"mean_commits":43.375,"dds":"0.32564841498559083","last_synced_commit":"90e9b82d6319a7ae3f32bc0b434db48d6c376e55"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Ffind-comment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Ffind-comment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Ffind-comment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Ffind-comment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/find-comment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"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":["github-action","github-comments","github-issues"],"created_at":"2024-08-01T09:01:33.791Z","updated_at":"2025-05-14T19:07:29.736Z","avatar_url":"https://github.com/peter-evans.png","language":"TypeScript","funding_links":["https://github.com/sponsors/peter-evans"],"categories":["TypeScript"],"sub_categories":[],"readme":"# Find Comment\n[![CI](https://github.com/peter-evans/find-comment/workflows/CI/badge.svg)](https://github.com/peter-evans/find-comment/actions?query=workflow%3ACI)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Find%20Comment-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/find-comment)\n\nA GitHub action to find an issue or pull request comment.\n\nThe action will output the comment ID of the comment matching the search criteria.\n\n## Usage\n\n### Find the first comment containing the specified string\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          body-includes: search string 1\n```\n\n### Find the first comment by the specified author\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          comment-author: peter-evans\n```\n\n### Find the first comment containing the specified string AND by the specified author\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          comment-author: peter-evans\n          body-includes: search string 1\n```\n\n### Find the first comment matching the specified regular expression\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          body-regex: '^.*search string 1.*$'\n```\n\n### Find the last comment containing the specified string\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          body-includes: search string 1\n          direction: last\n```\n\n### Find the nth comment containing the specified string\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          body-includes: search string 1\n          nth: 1 # second matching comment (0-indexed)\n```\n\n### Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN` |\n| `repository` | The full name of the repository containing the issue or pull request. | `github.repository` (Current repository) |\n| `issue-number` | The number of the issue or pull request in which to search. | |\n| `comment-author` | The GitHub user name of the comment author. | |\n| `body-includes` | A string to search for in the body of comments. | |\n| `body-regex` | A regular expression to search for in the body of comments. | |\n| `direction` | Search direction, specified as `first` or `last` | `first` |\n| `nth` | 0-indexed number, specifying which comment to return if multiple are found | 0 |\n\n#### Outputs\n\nThe `comment-id`, `comment-node-id`, `comment-body`, `comment-author` and `comment-created-at` of the matching comment found will be output for use in later steps.\nThey will be empty strings if no matching comment was found.\nNote that in order to read the step outputs the action step must have an id.\n\nTip: Empty strings evaluate to zero in GitHub Actions expressions.\ne.g. If `comment-id` is an empty string `steps.fc.outputs.comment-id == 0` evaluates to `true`.\n\n```yml\n      - name: Find Comment\n        uses: peter-evans/find-comment@v3\n        id: fc\n        with:\n          issue-number: 1\n          body-includes: search string 1\n      - run: |\n          echo ${{ steps.fc.outputs.comment-id }}\n          echo ${{ steps.fc.outputs.comment-node-id }}\n          echo ${{ steps.fc.outputs.comment-body }}\n          echo ${{ steps.fc.outputs.comment-author }}\n          echo ${{ steps.fc.outputs.comment-created-at }}\n```\n\n### Accessing issues and pull requests in other repositories\n\nYou can search the comments of issues and pull requests in another repository by using a [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) instead of `GITHUB_TOKEN`.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Ffind-comment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Ffind-comment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Ffind-comment/lists"}