{"id":19220412,"url":"https://github.com/louisbrunner/diff-action","last_synced_at":"2025-08-02T00:43:37.859Z","repository":{"id":39945298,"uuid":"244178693","full_name":"LouisBrunner/diff-action","owner":"LouisBrunner","description":"GitHub Action that compares two files, add tolerances, send notifications, etc","archived":false,"fork":false,"pushed_at":"2025-07-01T19:06:53.000Z","size":1389,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-11T04:49:31.231Z","etag":null,"topics":["actions","ci","diff","github-actions"],"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/LouisBrunner.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":["LouisBrunner"]}},"created_at":"2020-03-01T15:58:43.000Z","updated_at":"2025-07-01T19:01:37.000Z","dependencies_parsed_at":"2023-01-11T17:21:49.013Z","dependency_job_id":"605e9d56-f21d-4069-b77b-0ee139d39438","html_url":"https://github.com/LouisBrunner/diff-action","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":0.5769230769230769,"last_synced_commit":"58050ffa6ef530112c48118a095a0a2c40eeeb54"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/LouisBrunner/diff-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fdiff-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fdiff-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fdiff-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fdiff-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LouisBrunner","download_url":"https://codeload.github.com/LouisBrunner/diff-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fdiff-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268320317,"owners_count":24231800,"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-01T02:00:08.611Z","response_time":67,"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":["actions","ci","diff","github-actions"],"created_at":"2024-11-09T14:35:04.776Z","updated_at":"2025-08-02T00:43:37.831Z","avatar_url":"https://github.com/LouisBrunner.png","language":"TypeScript","funding_links":["https://github.com/sponsors/LouisBrunner"],"categories":[],"sub_categories":[],"readme":"# GitHub Actions: `diff-action` ![build-test](https://github.com/LouisBrunner/diff-action/workflows/build-test/badge.svg)\n\nThis GitHub Action allows you to compare two files based on a tolerance, output the result to a file and send various notifications (comment on a linked GitHub issue/pull request, create a [Check Run](https://developer.github.com/v3/checks/runs/#create-a-check-run), ...), etc.\n\n## Usage\n\nThe following shows how to compare two files, making sure only additions happened, and output the difference to a file.\n\n```\nname: \"build-test\"\non: [push]\n\njobs:\n  test_something:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v1\n    - name: Check that the files are the exact same\n      uses: LouisBrunner/diff-action@v2.0.0\n      with:\n        old: file1.txt\n        new: file2.txt\n        mode: strict\n        tolerance: same\n        output: out1.txt\n    - name: Check that there are only additions in file2.txt\n      uses: LouisBrunner/diff-action@v2.0.0\n      with:\n        old: file1.txt\n        new: file2.txt\n        mode: addition\n        tolerance: better\n        output: out2.txt\n```\n\nSee the [examples workflow](.github/workflows/examples.yml) for more details and examples (and see the [associated runs](https://github.com/LouisBrunner/diff-action/actions?query=workflow%3Aexamples) to see how it will look like).\n\n## Inputs\n\n### `old`\n\n**Required** The first file to compare\n\n### `new`\n\n**Required** The second file to compare\n\n### `mode`\n\n_Optional_ The method used to measure the `tolerance`, can be either:\n\n* `strict` (default): the files must be exactly the same, only `tolerance: same` is allowed (which is the default)\n* `addition`: addition are better\n* `deletion`: deletion are better\n\n### `tolerance`\n\n_Optional_ The tolerance to check the diff for, depends on `mode`, can be either (examples given with mode = `deletion`) `better` (only deletion), `mixed-better` (more deletion than addition), `same` (stay the exact same), `mixed` (same amount of lines but not the same), `mixed-worse` (more addition than deletion) or `worse` (only addition)\nDefault is `same`\n\n### `output`\n\n_Optional_ The path where to output the diff (as well as on the console)\n\n### `token`\n\n_Optional_ Your `GITHUB_TOKEN`, **required** when using `notify_check` and/or `notify_issue`\n\n### `title`\n\n_Optional_ add a title to the notifications to distinguish between multiple workflows/jobs\n\n### `notify_check`\n\n_Optional_ Will create a [GitHub Check Run](https://developer.github.com/v3/checks/runs/#create-a-check-run) if `'true'` is specified, **requires** `token` to be given as well\n\n### `notify_issue`\n\n_Optional_ Will create a comment in the linked issue if specified, **requires** `token` to be given as well.\n\nPossible values:\n\n - `always` / `true`: will always create a comment (note: `true` is deprecated in favor of `always`)\n - `failure`: will only create a comment if the check fails\n - `success`: will only create a comment if the check passes\n\n### `sticky_comment`\n\n_Optional_ When using `notify_issue: true`, will edit the created comment instead of creating a new one everytime.\n\nNote that the updated comment is based on the `title`. Thus:\n\n* if you call the action multiple times in your workflow, make sure the titles are unique to each call to avoid overwriting the same comment\n* make sure the titles are the same between different calls to the action if you want to update the same comment\n\n## Outputs\n\n### `passed`\n\nContains a boolean (`'true'` or `'false'`) representing if the check passed or not\n\n### `output`\n\nContains the output of the diff\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrunner%2Fdiff-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisbrunner%2Fdiff-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrunner%2Fdiff-action/lists"}