{"id":5910069,"name":"meblabs/npm-pull-request-action","ecosystem":"actions","description":"GitHub action for MEBlabs pull requests in npm projects","homepage":"","licenses":"mit","normalized_licenses":["MIT"],"repository_url":"https://github.com/meblabs/npm-pull-request-action","keywords_array":["audit","eslint","github-actions","jest","npm","prettier"],"namespace":"meblabs","versions_count":6,"first_release_published_at":"2022-10-21T08:46:12.000Z","latest_release_published_at":"2026-09-23T06:48:47.000Z","latest_release_number":"v4","latest_published_release_number":null,"last_synced_at":"2026-09-24T00:58:46.197Z","created_at":"2023-01-20T00:01:51.533Z","updated_at":"2026-09-24T00:58:46.197Z","registry_url":"https://github.com/meblabs/npm-pull-request-action","install_command":null,"documentation_url":null,"metadata":{"name":"NpmPullRequest","description":"GitHub action for MEBlabs pull requests in npm projects","inputs":{"prettier":{"description":"Check and format code with Prettier","required":false,"default":"true"},"eslint":{"description":"Check code with ESLint and reviewdog","required":false,"default":"true"},"test":{"description":"Run the configured npm test script","required":false,"default":"true"},"test-script":{"required":false,"description":"A custom npm script to run tests","default":"test"},"test-args":{"required":false,"description":"Arguments appended after `--` to the test script. Defaults to the Jest CLI flags that produce the report consumed by the publish step. Set to an empty string when your custom test-script does not accept these flags (the Jest report is then skipped).","default":"--ci --json --outputFile=jest-results.json"},"audit":{"description":"Run npm audit fix --package-lock-only and commit package-lock.json changes before tests","required":false,"default":"true"},"audit-level":{"description":"Minimum npm audit level used by npm audit fix: low, moderate, high, critical","required":false,"default":"high"},"token":{"description":"Personal access token used by reviewdog to comment on pull requests","required":false},"github-token":{"description":"Token used for checkout push and Jest report comments","required":false},"checkout":{"description":"Flag to indicate whether the repo should be checked out","required":false,"default":"true"},"node-version":{"description":"Pick the node version to use [20.x, 22.x, ...]","required":false,"default":"22.x"},"bot_name":{"description":"Bot username used for automatic commits","required":false,"default":"MeblabsBot"},"bot_email":{"description":"Bot email used for automatic commits","required":false,"default":"github@meblabs.com"}},"outputs":{"prettier-changed":{"description":"true if Prettier changed files and an automatic commit was pushed","value":"${{ steps.quality_outputs.outputs.prettier-changed }}"},"audit-changed":{"description":"true if npm audit changed package-lock.json and an automatic commit was pushed","value":"${{ steps.quality_outputs.outputs.audit-changed }}"},"current-head-sha":{"description":"Current local HEAD SHA at the end of the action","value":"${{ steps.quality_outputs.outputs.current-head-sha }}"}},"runs":{"using":"composite","steps":[{"if":"${{ inputs.checkout == 'true' }}","name":"Checkout code","uses":"actions/checkout@v6.0.2","with":{"fetch-depth":0,"ref":"${{ github.event.pull_request.head.ref }}","token":"${{ inputs.token }}","persist-credentials":false}},{"name":"Setup Node.js","uses":"actions/setup-node@v6","with":{"node-version":"${{ inputs.node-version }}","cache":"npm","cache-dependency-path":"package-lock.json"}},{"name":"Install dependencies","shell":"bash","run":"npm ci --prefer-offline --no-audit"},{"if":"${{ inputs.prettier == 'true' }}","name":"Run Prettier","shell":"bash","run":"npm run format"},{"if":"${{ inputs.prettier == 'true' }}","name":"Check for Prettier changes","shell":"bash","id":"prettier","run":"echo \"changes=$(if git diff-index --quiet HEAD --; then echo \"false\"; else echo \"true\"; fi)\" \u003e\u003e \"$GITHUB_OUTPUT\"\n"},{"if":"${{ inputs.audit == 'true' }}","name":"Run npm audit lockfile fix","shell":"bash","id":"audit","env":{"NPM_AUDIT_LEVEL":"${{ inputs.audit-level }}"},"run":"set -euo pipefail\n\necho \"changes=false\" \u003e\u003e \"$GITHUB_OUTPUT\"\n\nif [[ ! -f package-lock.json ]]; then\n  echo \"No package-lock.json found. Skipping npm audit lockfile fix.\"\n  exit 0\nfi\n\npackage_json_before=\"${RUNNER_TEMP:-/tmp}/package.json.before\"\ncp package.json \"$package_json_before\"\n\nnpm audit fix --package-lock-only --audit-level=\"${NPM_AUDIT_LEVEL}\" || true\n\nif ! cmp -s package.json \"$package_json_before\"; then\n  echo \"npm audit fix modified package.json. This is not allowed for automatic lockfile remediation.\" \u003e\u00262\n  git checkout -- package.json package-lock.json\n  exit 1\nfi\n\nif ! git diff --quiet -- package-lock.json; then\n  echo \"changes=true\" \u003e\u003e \"$GITHUB_OUTPUT\"\nfi\n"},{"if":"${{ steps.prettier.outputs.changes == 'true' || steps.audit.outputs.changes == 'true' }}","name":"Commit automatic changes","shell":"bash","env":{"BOT_NAME":"${{ inputs.bot_name }}","BOT_EMAIL":"${{ inputs.bot_email }}","PUSH_TOKEN":"${{ inputs.token }}","HEAD_REF":"${{ github.event.pull_request.head.ref }}"},"run":"set -euo pipefail\n\ngit config user.name \"$BOT_NAME\"\ngit config user.email \"$BOT_EMAIL\"\n\ngit add --all\n\nif git diff --cached --quiet; then\n  echo \"No automatic changes to commit.\"\n  exit 0\nfi\n\ngit commit -m \"chore: apply automatic formatting and lockfile fixes\"\n\n# Checkout runs with persist-credentials: false, so push with an explicit\n# token-authenticated remote. Token comes from env (masked in logs) and is\n# not written to .git/config.\ngit push \\\n  \"https://x-access-token:${PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git\" \\\n  \"HEAD:${HEAD_REF}\"\n"},{"if":"${{ steps.prettier.outputs.changes == 'true' || steps.audit.outputs.changes == 'true' }}","name":"Report automatic commit","shell":"bash","run":"echo \"An automatic commit was pushed by this action.\"\necho \"Tests and downstream security checks must run in the next workflow execution on the new commit.\"\n"},{"if":"${{ inputs.eslint == 'true' \u0026\u0026 steps.prettier.outputs.changes != 'true' \u0026\u0026 steps.audit.outputs.changes != 'true' }}","name":"Run ESLint","uses":"reviewdog/action-eslint@556a3fdaf8b4201d4d74d406013386aa4f7dab96","env":{"REVIEWDOG_SKIP_GIT_FETCH":"${{ inputs.checkout }}"},"with":{"reporter":"github-pr-review","eslint_flags":". --ext .js,.jsx,.mjs,.cjs","github_token":"${{ inputs.token }}"}},{"if":"${{ inputs.test == 'true' \u0026\u0026 steps.prettier.outputs.changes != 'true' \u0026\u0026 steps.audit.outputs.changes != 'true' }}","name":"Run Jest","shell":"bash","env":{"JEST_JUNIT_OUTPUT":"junit.xml","TEST_SCRIPT":"${{ inputs.test-script }}","TEST_ARGS":"${{ inputs.test-args }}"},"continue-on-error":true,"run":"# Word-splitting of TEST_ARGS is intentional: it is a list of CLI flags.\nread -ra extra_args \u003c\u003c\u003c \"$TEST_ARGS\"\nif [[ ${#extra_args[@]} -gt 0 ]]; then\n  npm run \"$TEST_SCRIPT\" -- \"${extra_args[@]}\"\nelse\n  npm run \"$TEST_SCRIPT\"\nfi\n"},{"if":"${{ (success() || failure()) \u0026\u0026 inputs.test == 'true' \u0026\u0026 steps.prettier.outputs.changes != 'true' \u0026\u0026 steps.audit.outputs.changes != 'true' \u0026\u0026 hashFiles('jest-results.json') != '' }}","name":"Publish Jest report","uses":"im-open/process-jest-test-results@3b73b8f2a22032eb329cfe08bc68d207cf8e626a","with":{"github-token":"${{ inputs.github-token }}","results-file":"jest-results.json","report-name":"Jest Tests","create-pr-comment":true}},{"if":"${{ always() }}","name":"Set quality outputs","id":"quality_outputs","shell":"bash","env":{"PRETTIER_CHANGED":"${{ steps.prettier.outputs.changes }}","AUDIT_CHANGED":"${{ steps.audit.outputs.changes }}"},"run":"set -euo pipefail\n\nprettier_changed=\"${PRETTIER_CHANGED:-false}\"\naudit_changed=\"${AUDIT_CHANGED:-false}\"\ncurrent_head_sha=\"$(git rev-parse HEAD)\"\n\n{\n  echo \"prettier-changed=${prettier_changed}\"\n  echo \"audit-changed=${audit_changed}\"\n  echo \"current-head-sha=${current_head_sha}\"\n} \u003e\u003e \"$GITHUB_OUTPUT\"\n\n{\n  echo \"## NPM pull request quality gate\"\n  echo \"\"\n  echo \"| Check | Value |\"\n  echo \"|---|---:|\"\n  echo \"| Prettier changed files | ${prettier_changed} |\"\n  echo \"| npm audit changed lockfile | ${audit_changed} |\"\n  echo \"| Current HEAD SHA | ${current_head_sha} |\"\n  echo \"\"\n} \u003e\u003e \"$GITHUB_STEP_SUMMARY\""}]},"default_branch":"main","path":null},"repo_metadata":{"id":37931367,"uuid":"498359873","full_name":"meblabs/npm-pull-request-action","owner":"meblabs","description":"GitHub action for MEBlabs pull request in npm projects.","archived":false,"fork":false,"pushed_at":"2026-09-23T06:50:57.000Z","size":68,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-09-24T00:44:13.618Z","etag":null,"topics":["audit","eslint","github-actions","jest","npm","prettier"],"latest_commit_sha":null,"homepage":"","language":null,"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/meblabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2022-05-31T13:59:44.000Z","updated_at":"2026-09-23T06:48:57.000Z","dependencies_parsed_at":"2026-09-23T09:19:34.510Z","dependency_job_id":"bc2feccb-1248-4f0e-97bf-820c67160ce2","html_url":"https://github.com/meblabs/npm-pull-request-action","commit_stats":{"total_commits":30,"total_committers":2,"mean_commits":15.0,"dds":"0.19999999999999996","last_synced_commit":"89b398ee1ca731907deb704c4892aa6df360aadb"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/meblabs/npm-pull-request-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meblabs","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":341189360,"owners_count":37625393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-09-23T02:00:07.637Z","response_time":54,"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"},"owner_record":{"login":"meblabs","name":"MEBlabs","uuid":"51744170","kind":"organization","description":"Tailor Made Technologies","email":"staff@meblabs.com","website":"www.meblabs.com","location":"Fano","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/51744170?v=4","repositories_count":5,"last_synced_at":"2023-03-06T02:15:28.313Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/meblabs","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-16T02:56:00.287Z","updated_at":"2023-03-06T02:15:28.328Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meblabs","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meblabs/repositories"},"tags":[{"name":"v4","sha":"77d2d26744d1b4d9e0c0cfaecc700e83c10ce821","kind":"commit","published_at":"2026-09-23T06:48:47.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v4","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v4","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/meblabs/npm-pull-request-action@v4","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v4","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v4/manifests"},{"name":"v3.0","sha":"adf9b2175b8cf4e00ee6a10dac2a626851acb9ca","kind":"commit","published_at":"2025-10-13T08:15:06.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v3.0","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v3.0","dependencies_parsed_at":null,"dependency_job_id":"4f4f6203-eb80-4267-9d7c-1525059561c6","purl":"pkg:github/meblabs/npm-pull-request-action@v3.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v3.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v3.0/manifests"},{"name":"v2.0","sha":"ef1ff0f2b152ea77d5b451e90a8f30a09774d0b2","kind":"tag","published_at":"2025-08-07T08:42:58.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v2.0","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v2.0","dependencies_parsed_at":null,"dependency_job_id":"c4902bde-dee2-4493-b6e9-9be00bd5a9be","purl":"pkg:github/meblabs/npm-pull-request-action@v2.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v2.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v2.0/manifests"},{"name":"v2","sha":"ef1ff0f2b152ea77d5b451e90a8f30a09774d0b2","kind":"tag","published_at":"2025-08-07T08:42:18.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v2","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v2","dependencies_parsed_at":null,"dependency_job_id":"a0c91eb2-1db2-4f9b-9759-0bbf1fa11700","purl":"pkg:github/meblabs/npm-pull-request-action@v2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v2/manifests"},{"name":"v1.1","sha":"aa1e603f6c3c418d4c57b0ce3362af435e6aff74","kind":"commit","published_at":"2023-11-03T08:39:42.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v1.1","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v1.1","dependencies_parsed_at":"2023-11-05T04:27:05.678Z","dependency_job_id":null,"purl":"pkg:github/meblabs/npm-pull-request-action@v1.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v1.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v1.1/manifests"},{"name":"v1.0","sha":"89b398ee1ca731907deb704c4892aa6df360aadb","kind":"tag","published_at":"2022-10-21T08:46:12.000Z","download_url":"https://codeload.github.com/meblabs/npm-pull-request-action/tar.gz/v1.0","html_url":"https://github.com/meblabs/npm-pull-request-action/releases/tag/v1.0","dependencies_parsed_at":null,"dependency_job_id":"3c677307-c815-4a93-8c30-68bd719510e1","purl":"pkg:github/meblabs/npm-pull-request-action@v1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/tags/v1.0/manifests"}]},"repo_metadata_updated_at":"2026-09-24T00:58:45.358Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":42.858974907023466,"dependent_packages_count":0.0,"stargazers_count":49.38656863164194,"forks_count":37.2590091052879,"average":32.376138160988326},"purl":"pkg:githubactions/meblabs/npm-pull-request-action","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/actions/meblabs/npm-pull-request-action","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/actions/meblabs/npm-pull-request-action","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/actions/meblabs/npm-pull-request-action/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2026-09-10T22:01:06.329Z","issues_count":0,"pull_requests_count":8,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":806559.6666666666,"issues_closed_count":0,"pull_requests_closed_count":6,"pull_request_authors_count":2,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.375,"merged_pull_requests_count":3,"bot_issues_count":0,"bot_pull_requests_count":5,"past_year_issues_count":0,"past_year_pull_requests_count":5,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":1612799.3333333333,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":3,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.6,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":5,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/meblabs%2Fnpm-pull-request-action/issues","maintainers":[{"login":"carru93","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/carru93"}],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/github%20actions/packages/meblabs%2Fnpm-pull-request-action/codemeta","maintainers":[]}