{"id":23613685,"url":"https://github.com/freckle/grep-action","last_synced_at":"2025-08-10T22:18:57.395Z","repository":{"id":43274165,"uuid":"454934735","full_name":"freckle/grep-action","owner":"freckle","description":"GitHub Action to run grep and attach results as annotations","archived":false,"fork":false,"pushed_at":"2025-08-09T08:30:34.000Z","size":1656,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-08-09T10:13:58.822Z","etag":null,"topics":["ghvm-managed"],"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/freckle.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-02T21:03:41.000Z","updated_at":"2025-08-09T08:30:08.000Z","dependencies_parsed_at":"2022-09-12T23:10:21.069Z","dependency_job_id":"67ff1e9a-2bef-4bca-9597-3244530e268c","html_url":"https://github.com/freckle/grep-action","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/freckle/grep-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fgrep-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fgrep-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fgrep-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fgrep-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freckle","download_url":"https://codeload.github.com/freckle/grep-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freckle%2Fgrep-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269795783,"owners_count":24477099,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ghvm-managed"],"created_at":"2024-12-27T17:18:46.458Z","updated_at":"2025-08-10T22:18:57.345Z","avatar_url":"https://github.com/freckle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grep Action\n\nRun `grep` and report results, along with additional context, as annotations.\n\n## Motivation\n\nThis is a shameless copy of Code Climate's [`grep` engine][grep-engine]\n([license][grep-license]), implementing the same functionality as a GitHub\nAction.\n\n[grep-engine]: https://docs.codeclimate.com/docs/grep\n[grep-license]: https://github.com/codeclimate/codeclimate-grep/blob/master/LICENSE\n\nThe `grep` engine is a low-friction way to introduce automated, timely, and\n_useful_ feedback on any piece of incoming code you can target with a regular\nexpression.\n\nWe wanted it as a GitHub Action to gain:\n\n- Performance of running over only the changed files in the PR\n- Convenience of annotations appearing in the diff (without a Browser Extension)\n\nNote that if you're considering using this Action over Code Climate, you will\nlose:\n\n- Markdown support in the annotation content (until GitHub implements it)\n- Tracking extant Issues over time and centralizing them with other Code Climate\n  analyses\n\n## Usage\n\n```yaml\non:\n  pull_request:\n\njobs:\n  grep:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: freckle/grep-action@v1\n        with:\n          patterns: |\n            - pattern: \"\\\\bword\\\\b\"\n\n              syntax: extended\n\n              binary-files: without-match\n\n              paths:\n                - \"**/*\"\n\n              paths-ignore:\n                - \"test/**/*\"\n\n              level: warning\n\n              title: A brief title\n\n              message: |\n                A longer message body\n```\n\n## Inputs\n\n- `patterns`: See below.\n\n- `only-changed`: If `true` (the default), only the files changed in the Pull\n  Request will be considered.\n\n  **NOTE**: This action doesn't really work on non-`pull_request` events.\n\n- `create-new-check`: If `true`, a new Check is created and the annotations are\n  attached to it. Default is `false`, which means to log the annotations\n  normally.\n\n- `failure-threshold`: If any annotations are created at or above this level,\n  the run will fail. See `patterns[].level` for valid values. Default is\n  `failure`.\n\n- `github-token`: override the default `GITHUB_TOKEN`, if desired.\n\nSee [`./action.yml`](./action.yml) for complete details.\n\n## The `patterns` Input\n\nThe `patterns` input is a String (as all inputs must be) that contains a Yaml\nArray of Objects with the following keys:\n\n- `id`\n\n  An optional identifier for the pattern. If provided, we will set outputs for\n  it (see below).\n\n- `pattern`\n\n  A `grep` \"Basic Regular Expression\". See the \"Basic vs Extended Regular\n  Expressions\" section of [`grep(1)`][man-grep] for more details. **Required**.\n\n  [man-grep]: https://linux.die.net/man/1/grep\n\n- `syntax`\n\n  The `grep` \"Pattern Syntax\" to use. This corresponds to `grep`'s `-E`, `F`,\n  `-G`, or `-P` options. One of `extended`, `fixed`, `basic`, or `perl`. Default\n  is `basic` (like `grep` itself).\n\n- `binary-files`\n\n  Controls searching in binary files, corresponding to `grep`'s\n  `--binary-files=\u003cvalue\u003e` option. One of `binary` (search binary files but do\n  not print), `without-match` (do not search binary files), or `text` (treat\n  all files as text). Default is `binary` (like `grep` itself).\n\n- `paths`\n\n  List of globs, files matching any will be `grep`ped. Default is everything\n  (`[\"**/*\"]`).\n\n- `paths-ignore`\n\n  List of globs, files matching `paths` but that match any of these will **not**\n  be `grep`ped. Default is none (`[]`).\n\n- `level`\n\n  The level of the resulting annotation, `notice|warning|failure`. Default is\n  `notice`.\n\n- `title`\n\n  A short title for the annotation resulting from this pattern. **Required**.\n\n- `message`\n\n  A longer message for the annotation resulting from this pattern. Default is\n  none.\n\n## Outputs\n\nFor any patterns with an `id` specified, the following outputs will be set:\n\n- `{id}`: the string `'true'` if any matches were found, or `'false'` if not.\n- `{id}_count`: the number of matches found.\n- `{id}_results`: a JSON-encoded list of objects with the following properties:\n\n  - `input`: the full line of `grep -n` output\n  - `path`: the matched path, parsed from above\n  - `line`: the line number of the match, parsed from above\n\n## Example\n\n![](./screenshot.png)\n\n## Release\n\nTo trigger a release (and update the `@v{major}` tag), merge a commit to `main`\nthat follows [Conventional Commits][]. In short,\n\n- `fix:` to trigger a patch release,\n- `feat:` for minor, and\n- `feat!:` and major\n\nWe don't enforce conventional commits generally (though you are free do so),\nit's only required if you want to trigger release.\n\n[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0/#summary\n\n---\n\n[LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Fgrep-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreckle%2Fgrep-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreckle%2Fgrep-action/lists"}