{"id":37573936,"url":"https://github.com/richardrigutins/replace-in-files","last_synced_at":"2026-04-02T13:36:09.348Z","repository":{"id":178057314,"uuid":"661304305","full_name":"richardrigutins/replace-in-files","owner":"richardrigutins","description":"A GitHub Action that allows you to find and replace text in files by matching a string.","archived":false,"fork":false,"pushed_at":"2026-03-28T19:41:06.000Z","size":5320,"stargazers_count":10,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T20:40:35.089Z","etag":null,"topics":["github-actions","replace","replace-text"],"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/richardrigutins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2023-07-02T12:36:12.000Z","updated_at":"2026-03-28T19:37:49.000Z","dependencies_parsed_at":"2025-11-29T05:05:19.080Z","dependency_job_id":null,"html_url":"https://github.com/richardrigutins/replace-in-files","commit_stats":null,"previous_names":["richardrigutins/replace-in-files"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/richardrigutins/replace-in-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Freplace-in-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Freplace-in-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Freplace-in-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Freplace-in-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardrigutins","download_url":"https://codeload.github.com/richardrigutins/replace-in-files/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardrigutins%2Freplace-in-files/sbom","scorecard":{"id":112755,"data":{"date":"2025-08-04","repo":{"name":"github.com/richardrigutins/replace-in-files","commit":"40868bdeb8d20c233a611ba65d0ff9c4ab228e1c"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":6,"checks":[{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 14 changesets","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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:20","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:21","Warn: no topLevel permission defined: .github/workflows/check-dist.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/test-workflow.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-dist.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/check-dist.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-workflow.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/test-workflow.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-workflow.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/richardrigutins/replace-in-files/test-workflow.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/test-workflow.yml:19","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T14:21:28.886Z","repository_id":178057314,"created_at":"2025-08-15T14:21:28.886Z","updated_at":"2025-08-15T14:21:28.886Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","replace","replace-text"],"created_at":"2026-01-16T09:27:52.780Z","updated_at":"2026-04-02T13:36:09.308Z","avatar_url":"https://github.com/richardrigutins.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Replace in files\n\nThis GitHub Action allows you to find and replace text in files by matching a string.\n\nIt can be useful for automating repetitive tasks such as updating version numbers, replacing placeholders, or modifying configuration files during deployment.\n\n## Features\n\n- Specify the files to be searched using a glob pattern. You can also specify files to be excluded from the search.\n- Find and replace all the occurrences of a string in the repository files.\n- Supports different file encodings, including UTF-8, UTF-16, and ASCII.\n- Works on every platform that supports JavaScript actions, including Linux, macOS, and Windows.\n\n## Inputs\n\n- `files`:\n(**Required**) The files to be searched. It can be the path to a single file, or a glob pattern matching one or more files (e.g. `**/*.txt`).\n\n- `replacement-text`:\n(**Required**) The text that will replace the matched text.\n\n- `search-text`:\n(**Required**) The text that will be replaced.\n\n- `encoding`:\n(Optional) The encoding of the files to be searched. The following values are supported: `utf8`, `utf16le`, `latin1`, `ascii`, `base64`, `hex`. Defaults to `utf8`.\n\n- `exclude`:\n(Optional) The files to be excluded from the search. It can be the path to a file or a glob pattern matching one or more files (e.g. `**/*.md`). Defaults to an empty string.\n\n- `max-parallelism`:\n(Optional) The maximum number of files that will be processed in parallel. This can be used to control the performance impact of the operation on the system. It should be a positive integer. Defaults to `10`.\n\n## Example usage\n\n```yaml\n# Replace all the occurrences of 'hello' with 'world' in all the txt files, \n# excluding the node_modules folder\n- name: Replace multiple files\n  uses: richardrigutins/replace-in-files@v2\n  with:\n    files: '**/*.txt'\n    search-text: 'hello'\n    replacement-text: 'world'\n    exclude: 'node_modules/**'\n    encoding: 'utf8'\n    max-parallelism: 10\n\n# Replace all the occurrences of '{0}' with '42' in the README.md file\n- name: Replace single file\n  uses: richardrigutins/replace-in-files@v2\n  with:\n    files: 'README.md'\n    search-text: '{0}'\n    replacement-text: '42'\n```\n\n## Development\n\n### Update the Action Code\n\nThe [`src/`](./src/) directory contains the source code that will be run when\nthe action is invoked.\n\nAfter making changes to the action code, make sure to run the following command\nto run all tests, lint the code, and build the final JavaScript action code:\n\n```bash\nnpm run all\n```\n\n\u003e This step is important! It will run [Rollup](https://rollupjs.org) to bundle\n\u003e the final JavaScript action code with all dependencies included. If you do not\n\u003e run this step, the action will not work correctly when it is used in a\n\u003e workflow.\n\n### Publishing a New Release\n\nThis project includes a helper script, [`script/release`](./script/release)\ndesigned to streamline the process of tagging and pushing new releases for\nGitHub Actions.\n\nGitHub Actions allows users to select a specific version of the action to use,\nbased on release tags. This script simplifies this process by performing the\nfollowing steps:\n\n1. **Retrieving the latest release tag:** The script starts by fetching the most\n   recent release tag by looking at the local data available in your repository.\n1. **Prompting for a new release tag:** The user is then prompted to enter a new\n   release tag. To assist with this, the script displays the latest release tag\n   and provides a regular expression to validate the format of the new tag.\n1. **Tagging the new release:** Once a valid new tag is entered, the script tags\n   the new release.\n1. **Pushing the new tag to the remote:** Finally, the script pushes the new tag\n   to the remote repository. From here, you will need to create a new release in\n   GitHub and users can easily reference the new tag in their workflows.\n\nTo use the script, run the following command:\n\n```bash\n./script/release\n```\n\n## Contributing\n\nContributions are welcome! Here are some ways you can contribute:\n\n- Report bugs and suggest new features by creating an issue.\n- Improve the documentation by submitting a pull request.\n- Fix bugs or implement new features by submitting a pull request.\n\nBefore submitting a pull request, please make sure that your changes are consistent with the project's coding style and that all tests pass. To build and run all the tests and linters, run the following command:\n\n```bash\nnpm run all\n```\n\nBe sure to also include the updated `dist` folder in your pull request.\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/). Please follow the convention when writing commit messages (e.g. `feat: add new input`, `fix: handle empty files`, `chore: update dependencies`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardrigutins%2Freplace-in-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardrigutins%2Freplace-in-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardrigutins%2Freplace-in-files/lists"}