{"id":21287657,"url":"https://github.com/bingneef/shipit-slack","last_synced_at":"2025-06-24T21:33:42.700Z","repository":{"id":20282975,"uuid":"89335902","full_name":"bingneef/Shipit-Slack","owner":"bingneef","description":"Slack notifier for ShipitDeploy","archived":false,"fork":false,"pushed_at":"2022-07-12T18:08:13.000Z","size":151,"stargazers_count":4,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-05-24T02:50:17.375Z","etag":null,"topics":["javascript","nodejs","shipit","slack"],"latest_commit_sha":null,"homepage":null,"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/bingneef.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}},"created_at":"2017-04-25T08:23:03.000Z","updated_at":"2023-03-07T02:52:21.000Z","dependencies_parsed_at":"2022-07-25T07:30:06.607Z","dependency_job_id":null,"html_url":"https://github.com/bingneef/Shipit-Slack","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bingneef/Shipit-Slack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingneef%2FShipit-Slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingneef%2FShipit-Slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingneef%2FShipit-Slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingneef%2FShipit-Slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bingneef","download_url":"https://codeload.github.com/bingneef/Shipit-Slack/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bingneef%2FShipit-Slack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759475,"owners_count":23205555,"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":["javascript","nodejs","shipit","slack"],"created_at":"2024-11-21T12:14:43.495Z","updated_at":"2025-06-24T21:33:42.655Z","avatar_url":"https://github.com/bingneef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shipit-slack\n\nA set of tasks for [Shipit](https://github.com/shipitjs/shipit) used for [slack](https://slack.com/) slack notifications.\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f9c3e73d0ebf4b3faea507390e247635)](https://www.codacy.com/app/bingneef/AristotoServer?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=bingneef/AristotoServer\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/0312a33892fd45018c4224293625f492)](https://www.codacy.com/app/bingneef/shipit-slack?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=bingneef/shipit-slack\u0026utm_campaign=Badge_Coverage)\n[![Codeship Status for bingneef/shipit-slack](https://app.codeship.com/projects/a7c04530-0c86-0135-da8a-06ff7cc4e0e6/status?branch=master)](https://app.codeship.com/projects/215322)\n[![Package status for bingneef/shipit-slack](https://david-dm.org/bingneef/shipit-slack.svg)](https://david-dm.org/bingneef/shipit-slack)\n[![Package status for bingneef/shipit-slack/?type=dev](https://david-dm.org/bingneef/shipit-slack/dev-status.svg)](https://david-dm.org/bingneef/shipit-slack/?type=dev)\n\n# AristotoServer\n**Features:**\n\n- Triggered on the `updated` or `fetched` event from [shipit-deploy](https://github.com/shipitjs/shipit-deploy)\n- Works via [shipit-cli](https://github.com/shipitjs/shipit) and [grunt-shipit](https://github.com/shipitjs/grunt-shipit)\n\n## Install\n\n```\nnpm install shipit-slack --save-dev\nyarn add shipit-slack --dev\n```\n\n## Usage\nIt is required to set the webhookUrl that links to a Slack [incoming webhook](https://my.slack.com/apps/manage/custom-integrations). This can be done in the `shipit.config.slack` key in the config.\n\n```\nslack: {\n  webhookUrl: 'https://hooks.slack.com/services/XXX',\n}\n```\n\nAfterwards, just simply run: (This triggers the `slack` task on the deploy `deployed` or `fetched` event. No additional config necessary.)\n\n```\nshipit default deploy\n```\n\nOr you can run the tasks separatly :\n\n```\nshipit default slack:init slack:send\n```\n\n\n## Options `shipit.config.slack`\n\n### `slack.webhookUrl`\n\nType: `String`\nDefault: `null`\nRequired: `true`\n\nThe webhook url that is configured for your Slack channel.\n\n### `slack.channel`\n\nType: `String`\nDefault: `null`\n\nA string that decides what channel the webhook is send to. If this value is null, the default channel is used that is configured in the `incoming webhook`.\n\n### `slack.message`\n\nType: `String`\nDefault: `Shipit-Slack`\n\nA string that determines the message that is send with the Slack notification.\n\n### `slack.triggerEvent`\n\nType: `String`\nDefault: `fetched`\n\nAn event name that triggers `slack:install`.\n\n### `slack.status`\n\nType: `String`\nDefault: `good`\nOptions: [`good`, `warning`, `error`]\n\nAn string that decides what color the notification in Slack gets, they are respectively: green, orange and red.\n\n### `slack.template`\n\nType: `Object`\nDefault:\n```js\n{\n attachments: [\n   {\n     fallback: '{{message}}',\n     color: '{{status}}',\n     fields: [\n       {\n         title: '{{message}}',\n         value: moment().format('MMMM Do YYYY, H:mm:ss'),\n         short: true\n       },\n       {\n         title: 'Environment',\n         value: '{{buildEnv}}',\n         short: true\n       },\n     ]\n   }\n ]\n}\n```\n\nTemplate of slack message. All `{{values}}` will be populated from `shipit.config.slack` object.\n[More info about Slack formatting](https://api.slack.com/docs/message-formatting)\n\n### Example `shipitfile.js` options usage\n\n```js\nmodule.exports = function (shipit) {\n  require('shipit-deploy')(shipit);\n  require('shipit-slack')(shipit);\n\n  shipit.initConfig({\n    default: {\n      slack: {\n        webhookUrl: 'https://hooks.slack.com/services/__XXX__',\n        status: 'good',\n        message: 'Shipit-Slack',\n        triggerEvent: 'deployed',\n        channel: '#default'\n        template: {\n          attachments: [{\n            fallback: 'Frontend deployed to {{buildEnv}}',\n            title: 'Visit',\n            title_link: '{{url}}',\n            pretext: '*Frontend deploy done!*:tada:',\n            color: '{{status}}',\n            fields: [{\n              title: 'Environment',\n              value: '{{buildEnv}}',\n              short: false\n            },\n            {\n              title: 'Changes',\n              value: '{{message}}',\n              short: false\n            }],\n            mrkdwn_in: ['pretext']\n          }]\n      }\n    }\n  });\n};\n```\n\n## Workflow tasks\n\n- slack\n  - slack:init\n      - Emit event \"slack_inited\".\n  - slack:install\n    - Runs slack install\n    - Emit event \"slack_installed\"\n  - slack:send\n      - Sends slack notification.\n\n##### Event flow:\n\n- on Event \"deploy\" (shipit-deploy initialized)\n  - Runs *slack:init*\n  - on Event \"slack_inited\"\n    - Runs *slack:install* (Triggered on the `fetched` event from [shipit-deploy](https://github.com/shipitjs/shipit-deploy) or by a custom `slack.triggerEvent` as mentioned above.)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingneef%2Fshipit-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbingneef%2Fshipit-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbingneef%2Fshipit-slack/lists"}