{"id":20801868,"url":"https://github.com/philips-software/pull-request-report-action","last_synced_at":"2025-05-07T00:42:13.220Z","repository":{"id":165630576,"uuid":"638520109","full_name":"philips-software/pull-request-report-action","owner":"philips-software","description":"GitHub action to collect Pull Request related Data and attached that as report to a Pull Request when it's merged.","archived":false,"fork":false,"pushed_at":"2025-04-09T08:10:04.000Z","size":2525,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T08:37:31.007Z","etag":null,"topics":["action","pr","pull-request","report"],"latest_commit_sha":null,"homepage":null,"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/philips-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2023-05-09T14:25:48.000Z","updated_at":"2025-04-09T08:10:01.000Z","dependencies_parsed_at":"2023-09-28T12:16:12.933Z","dependency_job_id":"0f8bcc5c-1bb8-476b-8f81-71701bf31a69","html_url":"https://github.com/philips-software/pull-request-report-action","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fpull-request-report-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fpull-request-report-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fpull-request-report-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fpull-request-report-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips-software","download_url":"https://codeload.github.com/philips-software/pull-request-report-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793546,"owners_count":21805053,"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":["action","pr","pull-request","report"],"created_at":"2024-11-17T18:24:53.059Z","updated_at":"2025-05-07T00:42:13.214Z","avatar_url":"https://github.com/philips-software.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pull Request Report Action [![Pull Request Report Action](https://github.com/philips-software/pull-request-report-action/actions/workflows/typescript-gate.yml/badge.svg)](https://github.com/philips-software/pull-request-report-action/actions/workflows/typescript-gate.yml)\n\n## Features\n\n- Reading and generate some basic PR measures from every merged PR\n- Provide these measures as a comment on the merged PR\n- Provide the raw measures as a hidden JSON data in comment\n- Get a path to a json file with the raw data for further processing\n\nMore features are planned for the future. If you have any suggestions, please\nopen an issue or create a PR.\n\n## Getting Started\n\nLike all other actions in GitHub, these are referenced in your workflow files\nand run on GitHub runners or self-hosted GitHub runners. As an example, let's\ncreate a workflow file that is triggered by closing a PR.\n\nCreate a workflow file in your repository at e.g.\n`.github/workflows/pr-report.yaml` with the following content:\n\n```yaml\nname: Add Pull Request Report to PR when closed\n\non:\n  pull_request:\n    # only run when PR is closed\n    types: [closed]\n\n# token needs some additional permissions to be able to add a comment to the PR\n# and read all PR data\n# permissions can vary depending on the metrics you want to use and org settings\npermissions:\n  contents: read\n  checks: read\n  pull-requests: write\n  repository-projects: read\n  actions: read\n\njobs:\n  add-pr-report-as-comment:\n    runs-on: ubuntu-latest\n    name: Generate report and add it as comment to the PR\n    steps:\n      - name: Checkout\n        uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2\n      - name: Generate PR report\n        id: generate_report\n        uses: philips-software/pull-request-report-action@6d08a2c0a96d666770637b54e050d6512e9d45b0 # v0.1.2\n        with:\n          ShowNumberOfChangedFiles: 'no'\n          ShowTimeToMergeAfterLastReview: 'no'\n        env:\n          GITHUB_TOKEN: ${{ github.token }}\n      # Instead of printing the path to the console you can upload the file\n      # with curl to a central service to collect all the data for further\n      # processing\n      - name: Print path of raw data json file\n        run: echo \"Report path: ${{ steps.generate_report.outputs.json_report_path }}\"\n```\n\n**Note**\nThe referenced actions are pinned to a specific commit. This is to ensure that\nthe action is not changed without you knowing. You can find the latest commit\nfor each action in the Release notes of the action. Use dependabot to keep your\nactions up to date. Dependabot will take care of updating the commit hash for\nyou. See [Dependabot for GitHub Actions](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot).\n\n### Configuration\n\nAt the moment, the configuration of the action is limited to the individual\nmetrics. In the example above we see that we do not want to see the two metrics\n`ShowNumberOfChangedFiles` and `ShowTimeToMergeAfterLastReview` in the pull\nrequest report.\n\nWith more features, the configuration options will also increase.\n\nThe overview of all metrics and their default values can be found in the\n[metrics documentation](./config.md).\n\nBesides the configuration settings the action also returns an output value as\nyou can see in the [`action.yml`](./action.yml). The name of the variable is \n`json_report_path` and contains the path to the file with the raw data of the\npull request. This can be especially useful if the data is to be stored or\nanalyzed centrally. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fpull-request-report-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips-software%2Fpull-request-report-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fpull-request-report-action/lists"}