{"id":22671401,"url":"https://github.com/cloudforet-io/check-pr-action","last_synced_at":"2025-03-29T11:21:52.232Z","repository":{"id":228971968,"uuid":"775422447","full_name":"cloudforet-io/check-pr-action","owner":"cloudforet-io","description":"Check Pull Request by Github Action","archived":false,"fork":false,"pushed_at":"2024-09-02T20:14:22.000Z","size":732,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-04T11:52:00.946Z","etag":null,"topics":["common"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cloudforet-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-03-21T11:09:12.000Z","updated_at":"2024-06-11T07:09:24.000Z","dependencies_parsed_at":"2024-03-25T21:47:45.705Z","dependency_job_id":"639d9c8d-ab2b-4588-b4c9-4c64ec147ace","html_url":"https://github.com/cloudforet-io/check-pr-action","commit_stats":null,"previous_names":["cloudforet-io/check-pr-action"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fcheck-pr-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fcheck-pr-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fcheck-pr-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fcheck-pr-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudforet-io","download_url":"https://codeload.github.com/cloudforet-io/check-pr-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246175219,"owners_count":20735524,"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":["common"],"created_at":"2024-12-09T16:14:54.718Z","updated_at":"2025-03-29T11:21:52.195Z","avatar_url":"https://github.com/cloudforet-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check signed-off-by in PR\n\n[![GitHub Super-Linter](https://github.com/actions/javascript-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/actions/javascript-action/actions/workflows/ci.yml/badge.svg)\n\nA Github Action that checks the commits of the current PR and fails if it contains unsigned commits.\nIt places a comment on the PR with the result of the check. It also add labels ***pass/signedoff*** to the PR.\n\n## Usage\n\n```\n# .github/workflows/check-pull-request.yml\nname: Check Pull Request\n\non:\n  pull_request_target:\n\njobs:\n  check-pull-request:\n    name: Check Pull Request\n    runs-on: ubuntu-latest\n    permissions:\n      pull-requests: write\n    steps:\n      - name: Check signed commits\n        id: review\n        uses: cloudforet-io/check-pr-action@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Notify Result\n        if: ${{ steps.review.outputs.signedoff == 'false' }}\n        run: |\n          echo \"The review result is ${{ steps.review.outputs.signedoff }}\"\n          exit 1\n```\n\n## Outputs\n\n| variable | description |\n| --- | --- |\n| signedoff |  true or  false |\n\n![screenshot](check_pr.png)\n\n## More information\n\nThe reason to prefer **pull_request_target** over **pull_request** is that **pull_request_target** allows the action to run with the permissions of the user who opened the PR, which is necessary to add a comment to the PR.\nThe Github token that comes with **pull_request** event does not have the necessary permissions to add a comment to the PR.\n\n```\non:\n  pull_request_target:\n\njobs:\n\n    ...\n\n    permissions:\n     pull-requests: write\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fcheck-pr-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudforet-io%2Fcheck-pr-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fcheck-pr-action/lists"}