{"id":15773991,"url":"https://github.com/decathlon/newman-reporter-pullrequest-decorator","last_synced_at":"2025-05-08T16:56:13.282Z","repository":{"id":40442488,"uuid":"378183607","full_name":"Decathlon/newman-reporter-pullrequest-decorator","owner":"Decathlon","description":"Newman reporter allowing to decorate pull request with postman collection results.","archived":false,"fork":false,"pushed_at":"2023-11-02T00:44:27.000Z","size":98,"stargazers_count":10,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T16:55:54.782Z","etag":null,"topics":["api","github","markdown","newman","postman","pullrequest","reporter","test","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Decathlon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","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":"2021-06-18T14:54:48.000Z","updated_at":"2025-02-06T13:42:20.000Z","dependencies_parsed_at":"2023-01-31T17:02:08.934Z","dependency_job_id":"e6241d46-ea94-4d38-b4ef-6152182dfdd3","html_url":"https://github.com/Decathlon/newman-reporter-pullrequest-decorator","commit_stats":{"total_commits":55,"total_committers":5,"mean_commits":11.0,"dds":0.4545454545454546,"last_synced_commit":"6a462a471d81f4adf9dd492753f7356e80ae674b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fnewman-reporter-pullrequest-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fnewman-reporter-pullrequest-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fnewman-reporter-pullrequest-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Decathlon%2Fnewman-reporter-pullrequest-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Decathlon","download_url":"https://codeload.github.com/Decathlon/newman-reporter-pullrequest-decorator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112074,"owners_count":21856070,"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":["api","github","markdown","newman","postman","pullrequest","reporter","test","testing"],"created_at":"2024-10-04T16:04:21.058Z","updated_at":"2025-05-08T16:56:13.220Z","avatar_url":"https://github.com/Decathlon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# newman-reporter-pullrequest-decorator\n\n\n[![NPM Version](https://img.shields.io/npm/v/@decathlon/newman-reporter-pullrequest-decorator.svg?style=flat-square)](https://www.npmjs.com/package/@decathlon/newman-reporter-pullrequest-decorator)\n[![Build, test and publish](https://github.com/Decathlon/newman-reporter-pullrequest-decorator/actions/workflows/build-test-publish-workflow.yml/badge.svg?branch=main)](https://github.com/Decathlon/newman-reporter-pullrequest-decorator/actions/workflows/build-test-publish-workflow.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=newman-reporter-pullrequest-decorator\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=newman-reporter-pullrequest-decorator)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=newman-reporter-pullrequest-decorator\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=newman-reporter-pullrequest-decorator)\n\n## Description\n\nReport [newman](https://github.com/postmanlabs/newman) collection results on an extra check in the Pull Request Checks tab.\nIf you need a way to export your Postman collection results into Github Pull Request, and you're using github workflow to handle your CI then you're in the right place !  \n\nPullRequest's Check example :  \n\n![PullRequest's Check example](https://user-images.githubusercontent.com/45691655/122566992-768b5e80-d048-11eb-9296-abe3b2086be7.png)\n\n## HIGHLIGHTED FEATURES\n  \n* Handle deep nested postman folder structure\n* Group requests by their folder's name in the generated markdown\n\n## Getting Started\n\n1. Install `newman`\n2. Install `@decathlon/newman-reporter-pullrequest-decorator`\n3. Run your github workflow and extract from it :\n     * GITHUB TOKEN from your running job. Usually, you can get it from ${{ secrets.GITHUB_TOKEN }}.\n\n### Prerequisites\n\n1. `node` and `npm`\n2. `newman` - `npm install -g newman`\n3. A github token either from :\n\t* your running github workflow provided as a secret (see above)\n\t* your own specific Github App (see Notes what issue this option solves)\n\n---\n\n## Installation\n\n```console\nnpm install -g @decathlon/newman-reporter-pullrequest-decorator\n```\n\n\u003e Installation should be done globally if newman is installed globally, otherwise install without `-g` option\n\n---\n\n## Usage\n\nSpecify `-r @decathlon/pullrequest-decorator` option while running the collection\n\nIn non export mode (it means you actually want to update github pull request) :  \n\n```bash\nnewman run \u003ccollection-url\u003e --environment=\u003cenv-url\u003e -r @decathlon/pullrequest-decorator \\\n  --reporter-pullrequest-decorator-repo \u003crepo\u003e \\\n  --reporter-pullrequest-decorator-token \u003cgithub-token\u003e \\\n  --reporter-pullrequest-decorator-checkname \u003ccheck-name\u003e \\\n  --reporter-pullrequest-decorator-refcommit \u003cref-commit\u003e\n```\n\nIn export mode :  \n\n```bash\nnewman run \u003ccollection-url\u003e --environment=\u003cenv-url\u003e -r @decathlon/pullrequest-decorator \\\n  --reporter-export \u003cexport-path\u003e \n```\n\n### Options:\n\n**Option** | **Remarks**\n--- | --- \n`--reporter-pullrequest-decorator-repo` | (Required) Usually you can get it from ${{ github.repository }}. It follows this pattern : \"organization/repository\"\n`--reporter-pullrequest-decorator-token` | (Required) Github token : Usually you can get it from ${{ secrets.GITHUB_TOKEN }} while job is **running**. For more details : https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret\n`--reporter-pullrequest-decorator-checkname` | (Optional : Default `newman-check`) Name you want to give to the check name that will be created by the reporter. This parameter is useful if you want to wait for a specific check name to be completed inside your workflow. See, for example, the following github action : fountainhead/action-wait-for-check@v1.0.0\n`--reporter-pullrequest-decorator-refcommit` | (Required) Long Commit hash. When you run this reporter from a Pull Request. You should use : ${{ github.event.pull_request.head.sha }}\n`--reporter-debug` | (Optional : Default `false`) Reporter debug mode\n`--suppress-exit-code` | (Optional) Ensure that asynchronous github API is called before reporter termination.\n`--showOnlyFails` | (Optional : Default `false`) Show only failing assertions.\n`--reporter-pullrequest-decorator-enablecomment` | (Optional) Boolean. Allows you to get a comment in your pull request containing the summary of the test result.\n\n---\n\n## Notes:\n\nPullRequest's check report can appear on the wrong check suite. This is due to a known github limitation. See here : https://github.community/t/specify-check-suite-when-creating-a-checkrun/118380  \nTo solve this issue, you can use a token from your own created Github App (and not the one used in the github workflow) so this way, the check run will be automatically created on a specific check suite. \n\n\n---\n\n## Development\n\n- `npm pack`\n- `npm i -g decathlon-newman-reporter-pullrequest-decorator.\u003cversion\u003e.tgz`\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecathlon%2Fnewman-reporter-pullrequest-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecathlon%2Fnewman-reporter-pullrequest-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecathlon%2Fnewman-reporter-pullrequest-decorator/lists"}