{"id":15650182,"url":"https://github.com/meilcli/danger-action","last_synced_at":"2025-04-07T16:19:46.008Z","repository":{"id":36985054,"uuid":"208470419","full_name":"MeilCli/danger-action","owner":"MeilCli","description":"Execute danger action for GitHub Actions.","archived":false,"fork":false,"pushed_at":"2024-10-29T15:22:39.000Z","size":2719,"stargazers_count":39,"open_issues_count":2,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T04:49:58.446Z","etag":null,"topics":["actions","danger","github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/MeilCli/actions","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/MeilCli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"MeilCli"}},"created_at":"2019-09-14T16:39:05.000Z","updated_at":"2024-10-23T15:33:48.000Z","dependencies_parsed_at":"2024-01-01T10:24:44.056Z","dependency_job_id":"71fe7b28-4974-4dbc-bd93-f05a560459df","html_url":"https://github.com/MeilCli/danger-action","commit_stats":{"total_commits":858,"total_committers":8,"mean_commits":107.25,"dds":"0.19930069930069927","last_synced_commit":"a209a1f29e895721e7ed0d1f7a1f51c5607f3131"},"previous_names":[],"tags_count":106,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeilCli%2Fdanger-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeilCli%2Fdanger-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeilCli%2Fdanger-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeilCli%2Fdanger-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeilCli","download_url":"https://codeload.github.com/MeilCli/danger-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685634,"owners_count":20979085,"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":["actions","danger","github-actions"],"created_at":"2024-10-03T12:33:52.124Z","updated_at":"2025-04-07T16:19:45.988Z","avatar_url":"https://github.com/MeilCli.png","language":"TypeScript","funding_links":["https://github.com/sponsors/MeilCli"],"categories":[],"sub_categories":[],"readme":"# danger-action\n[![CI-Master](https://github.com/MeilCli/danger-action/actions/workflows/ci-master.yml/badge.svg)](https://github.com/MeilCli/danger-action/actions/workflows/ci-master.yml)  \nExecute [danger](https://github.com/danger/danger) action for GitHub Actions.  \n\n## Required\nThis action must set-up [Ruby](https://github.com/ruby/setup-ruby) and Bundler.\n\nRecommendation: set up Ruby 2.6 or higher\n\n## Example\n```yml\nname: CI\n\non:\n  pull_request:\n    branches:\n      - master\n      \njobs:\n  danger:\n    runs-on: ubuntu-latest\n    if: github.event_name  == 'pull_request' # if only run pull request when multiple trigger workflow\n    steps:\n    - uses: actions/checkout@v4\n    - uses: ruby/setup-ruby@v1\n      with:\n        ruby-version: '2.6'\n    - uses: actions/cache@v4\n      with:\n        path: vendor/bundle\n        key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }} # change your gemfile path\n        restore-keys: |\n          ${{ runner.os }}-gems-\n    - uses: MeilCli/danger-action@v6\n      with:\n        plugins_file: 'Gemfile'\n        install_path: 'vendor/bundle'\n        danger_file: 'Dangerfile'\n        danger_id: 'danger-pr'\n      env:\n        DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\nYou can also pin to a [specific release](https://github.com/MeilCli/danger-action/releases) version in the format `@v6.x.x`\n\n## input\n- `danger_version`\n  - optional\n  - version information with gem styled\n  - default: `\u003e= 6.0.0`\n- `danger_version_file`\n  - optional\n  - danger version file\n  - default: `.tool-versions`\n- `danger_version_file_format`\n  - optional\n  - danger version file format. [more detail](./docs/danger-version-file.md)\n  - default: `asdf`\n- `plugins_file`\n  - optional\n  - gemfile path for danger plugin. if set plugins_file, action do not exec `gem install danger`\n- `install_path`\n  - optional\n  - bundle install path, Useful instead of `bundle config path`\n- `danger_file`\n  - required\n  - dangerfile path for running danger\n- `danger_id`\n  - required\n  - danger id is an identifier string, example(`danger-pr`, `danger-CI`, etc..)\n- `fail_on_stderr_when_bundler`\n  - optional\n  - action fail when bundler output stderr\n  - default: `false`\n- `fail_on_stderr_when_danger`\n  - optional\n  - action fail when danger output stderr\n  - default: `false`\n  \n## env\n- `DANGER_GITHUB_API_TOKEN`\n  - required\n  - GitHub Token using by Danger\n  - recommendation value: `${{ secrets.GITHUB_TOKEN }}`\n\n## Additional Example\n```yml\nname: CI\n\non:\n  pull_request:\n    branches:\n      - master\n      \njobs:\n  danger:\n    runs-on: ubuntu-latest\n    if: github.event_name  == 'pull_request' # if only run pull request when multiple trigger workflow\n    steps:\n    - uses: actions/checkout@v4\n    - uses: ruby/setup-ruby@v1\n      with:\n        ruby-version: '2.6'\n    - uses: actions/cache@v4\n      with:\n        path: vendor/bundle\n        key: ${{ runner.os }}-gems-${{ hashFiles('.github/Gemfile') }} # change your gemfile path\n        restore-keys: |\n          ${{ runner.os }}-gems-\n    - uses: MeilCli/danger-action@v6\n      with:\n        plugins_file: '.github/Gemfile'\n        install_path: 'vendor/bundle'\n        danger_file: '.github/Dangerfile'\n        danger_id: 'danger-pr'\n      env:\n        DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\ndanger-action can escape path of `Gemfile`. so you can put Gemfile on no-current directory.\n\n## Attention: For repository OSS or using dependabot\n`github-actions` token has not write permission at triggered by `pull_request` that created from forked repository or created by dependabot. This reason is for security\n\nref: [Keeping your GitHub Actions and workflows secure: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)\n\nIn this case, danger cannot use GitHub API because readonly token. And, Using `pull_request_target` is an option, but it have the security concerns.\n\nIf your needs is report of lint-result, recommending [MeilCli/common-lint-reporter](https://github.com/MeilCli/common-lint-reporter). Its action resolve this problem by using `workflow_run`.\nsee: [More information](https://github.com/MeilCli/common-lint-reporter/blob/master/documents/oss-or-dependabot-usage.md)\n\n## Contributes\n[\u003cimg src=\"https://gist.github.com/MeilCli/43c9ea6a92b6ae29bab864c4917824d8/raw/6ef53834e0a5dabf5809900865e4063db96e5841/metrics_contributors.svg\"\u003e](https://github.com/MeilCli/danger-action/graphs/contributors)\n\n### Could you want to contribute?\nsee [Contributing.md](./.github/CONTRIBUTING.md)\n\n## License\n[\u003cimg src=\"https://gist.github.com/MeilCli/43c9ea6a92b6ae29bab864c4917824d8/raw/6ef53834e0a5dabf5809900865e4063db96e5841/metrics_licenses.svg\"\u003e](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilcli%2Fdanger-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeilcli%2Fdanger-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeilcli%2Fdanger-action/lists"}