{"id":15662133,"url":"https://github.com/kt3k/status-back","last_synced_at":"2025-08-13T19:06:13.090Z","repository":{"id":40783488,"uuid":"132438139","full_name":"kt3k/status-back","owner":"kt3k","description":":arrow_left::large_blue_circle: Send the status back to the github from CI environment","archived":false,"fork":false,"pushed_at":"2022-12-12T09:19:46.000Z","size":1280,"stargazers_count":19,"open_issues_count":10,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-28T04:02:25.476Z","etag":null,"topics":["ci","commit-status","github","jenkins"],"latest_commit_sha":null,"homepage":"https://npm.im/status-back","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/kt3k.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}},"created_at":"2018-05-07T09:29:10.000Z","updated_at":"2023-12-13T16:01:42.000Z","dependencies_parsed_at":"2022-09-09T15:03:10.417Z","dependency_job_id":null,"html_url":"https://github.com/kt3k/status-back","commit_stats":null,"previous_names":["recruit-lifestyle/status-back"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kt3k/status-back","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fstatus-back","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fstatus-back/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fstatus-back/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fstatus-back/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/status-back/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Fstatus-back/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262371666,"owners_count":23300593,"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":["ci","commit-status","github","jenkins"],"created_at":"2024-10-03T13:30:15.499Z","updated_at":"2025-07-01T08:34:16.903Z","avatar_url":"https://github.com/kt3k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"130\" src=\"https://kt3k.github.io/status-back/media/status-back-logo.svg\" /\u003e\n\n# status-back v1.1.1\n\n[![CircleCI](https://circleci.com/gh/kt3k/status-back.svg?style=svg)](https://circleci.com/gh/recruit-lifestyle/status-back)\n[![codecov](https://codecov.io/gh/kt3k/status-back/branch/master/graph/badge.svg)](https://codecov.io/gh/recruit-lifestyle/status-back)\n\n\u003e :arrow_left::large_blue_circle: Send the status back to the github from CI environment\n\n# :cd: Install\n\nVia npm:\n\n    npm i -g status-back\n\nThis installs `status-back` to your system.\n\n# CLI Usage\n\n```\n  Usage: status-back [options] [\u003cdescription\u003e, [\u003curl\u003e]]\n\n  Options:\n    --version - - - - - - - - - Output the version.\n    -v, --verbose - - - - - - - Output verbose message on internal operations.\n    -p, --pending - - - - - - - Set the commit status pending.\n    -s, --success - - - - - - - Set the commit status success.\n    -f, --failure - - - - - - - Set the commit status failure.\n    -e, --error - - - - - - - - Set the commit status error.\n    -t, --token \u003ctoken\u003e - - - - Set the github token. Required.\n                                Optionally set by GITHUB_TOKEN env var.\n    -r, --repo \u003crepo\u003e - - - - - Set the repo slug. e.g. nodejs/node. Requird.\n                                Optionally set by GITHUB_REPO env var.\n    --sha1 \u003csha1\u003e - - - - - - - Set the sha1 of the commit. Default is the current sha1.\n                                Optionally set by STATUS_SHA1.\n                                If not specified, the sha1 of current dir is used.\n    -c, --context \u003ccontext\u003e - - Set the context of the commit status. e.g. ci/build. Required.\n                                Optionally set by STATUS_CONTEXT env var.\n    --github-api \u003curl\u003e  - - - - Set the url of the github api. Set this when you use with github enterprise.\n                                Optionally set by GITHUB_API env var.\n\n  Example:\n    status-back -s -t 12345... -r nodejs/node -c ci/build \"build success!\" https://ci.server/build/12345\n\n    status-back -f -t 12345... -r nodejs/node -c ci/build \"build failure!\" https://ci.server/build/12346 --github-api https://github.my-company/api/v3\n```\n\n# Examples \u0026 recipes\n\n## Usage with Jenkins declarative pipeline\n\nIn CI settings, we recommend to use environment variables for setting common parameters.\n\n```groovy\npipeline {\n  environment {\n    GITHUB_TOKEN = credentials 'github-token'\n    GITHUB_API = 'https://mycompany.github/api/v3'\n    GITHUB_REPO = 'myorg/myrepo'\n  }\n\n  stages {\n    stage('install') {\n      steps {\n        sh 'yarn'\n      }\n    }\n\n    stage('lint') {\n      environment {\n        STATUS_CONTEXT = 'jenkins/lint'\n      }\n\n      steps {\n        sh 'npx status-back -p \"Linting...\" $BUILD_URL'\n        sh 'npm run lint'\n      }\n\n      post {\n        success {\n          sh 'npx status-back -s \"Lint success!\" $BUILD_URL'\n        }\n        failure {\n          sh 'npx status-back -f \"Lint failed!\" $BUILD_URL'\n        }\n      }\n    }\n\n    stage('test') {\n      environment {\n        STATUS_CONTEXT = 'jenkins/test'\n      }\n\n      steps {\n        sh 'npx status-back -p \"Testing...\" $BUILD_URL'\n        sh 'npm test'\n      }\n\n      post {\n        success {\n          sh 'npx status-back -s \"Test success!\" $BUILD_URL'\n        }\n        failure {\n          sh 'npx status-back -f \"Test failed!\" $BUILD_URL'\n        }\n      }\n    }\n  }\n}\n```\n\n# License\n\nMIT\n\n**Note**: This library is inspired by [commit-status][] by [dtinth][], but is a bit more focused on usages in Github Enterprise environment, rather than github.com.\n\n[commit-status]: https://www.npmjs.com/package/commit-status\n[dtinth]: https://github.com/dtinth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fstatus-back","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Fstatus-back","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Fstatus-back/lists"}