{"id":23284959,"url":"https://github.com/divyagnan/teams-deploy-notifier","last_synced_at":"2025-04-06T15:23:40.816Z","repository":{"id":77098781,"uuid":"120044409","full_name":"divyagnan/teams-deploy-notifier","owner":"divyagnan","description":"CLI tool to notify your colleagues on MS Teams that you've deployed something","archived":false,"fork":false,"pushed_at":"2018-02-06T22:51:05.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-20T02:18:02.802Z","etag":null,"topics":["deployment","notify","teams","webhook"],"latest_commit_sha":null,"homepage":"","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/divyagnan.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}},"created_at":"2018-02-03T00:02:53.000Z","updated_at":"2021-11-02T12:04:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd78332c-07e8-48bb-899d-feb89e5038ce","html_url":"https://github.com/divyagnan/teams-deploy-notifier","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"929c3e3c236e5c3843e0cf79f2577cf9ec31c1b0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Fteams-deploy-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Fteams-deploy-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Fteams-deploy-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Fteams-deploy-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divyagnan","download_url":"https://codeload.github.com/divyagnan/teams-deploy-notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247501477,"owners_count":20949076,"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":["deployment","notify","teams","webhook"],"created_at":"2024-12-20T01:51:11.857Z","updated_at":"2025-04-06T15:23:40.776Z","avatar_url":"https://github.com/divyagnan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# teams-deploy-notifier [![npm version](https://badge.fury.io/js/teams-deploy-notifier.svg)](https://badge.fury.io/js/teams-deploy-notifier)\n\n\u003e CLI tool to notify your colleagues on MS Teams that you've deployed something\n\n## Installation\n\n```\nnpm install -g teams-deploy-notifier\n```\n\n## Usage\n\n1. Create a `.teams-notifier-config.json` file in the root directory of your project. It should look similar to this:\n\n```json\n{\n  \"projectName\": \"REQUIRED: the name of your project\",\n  \"teamsUrl\": \"REQUIRED: your ms teams webhook url\",\n  \"options\": {\n    \"themeColor\": \"OPTIONAL: hex code for your color without the #\"\n  }\n}\n```\n\n2. When you are ready to deploy call the cli and optionally pass in the service, path, and git-commit options:\n\n`--service`: the name of the service that you want to deploy with. Examples include [now](https://zeit.co/now) and [netlify](https://www.netlify.com). This defaults to [now](https://zeit.co/now).\n\n`--path`: the path to the directory that you want to deploy. For example if you want to deploy the build directory you might pass in `build` if you wanted to deploy the current directory you might pass in `.`. This defaults to `.`.\n\n`--git-commit`: how many git commit summaries you want to include in the notification. This includes the last n commits in the notification where n is the number you pass in. For example if you wanted only the latest commit you would pass in `1`. If you wanted the last 5 commits you would pass in `5`. If you do not want to include any commits in the notification then omit this argument (by default no commits are included in teh notification).\n\n```bash\nteams-deploy-notifier --service now --path build\n```\n\n3. Thats it! On successful deploy and notification you will see the info from your service provider printed to the console as well as a green message saying `Deployment message posted to Teams`\n\n## API\n\n#### CLI `teams-deploy-notifier`\n\n```json\n  // Available Arguments\n  // the path to the directory that you want to deploy. defaults to now\n  \"--path\": String,\n  // the service that you want to deploy with. defaults to the current directory (.)\n  \"--service\": String,\n  // the last n git commits to include in the notification. commits omitted from notification if number not specified\n  \"--git-commit\": Number,\n\n  // Aliases\n  \"-p\": \"--path\",\n  \"-s\": \"--service\",\n  \"-gc\": \"--git-commit\"\n```\n\nExample with `now`:\n\n```bash\nteams-deploy-notifier --service now --path build --git-commit 5\n# same as\nteams-deploy-notifier -s now -p build -gc 5\n```\n\nExample with `netlify`:\n\n```bash\nteams-deploy-notifier --service netlify --path build --git-commit 5\n# same as\nteams-deploy-notifier -s netlify -p build -gc 5\n```\n\nIf you do not pass in any arguments:\n\n```bash\nteams-deploy-notifier\n# same as\nteams-deploy-notifier --service now --path .\n# notice that no commits will be included in the notification if you don't specify a number\n```\n\n#### Config File (`.teams-notifier-config.json`)\n\n```json\n{\n  \"projectName\": \"REQUIRED: the name of your project\",\n  \"teamsUrl\": \"REQUIRED: your ms teams webhook url\",\n  \"options\": {\n    \"themeColor\": \"OPTIONAL: hex code for your color without the #\"\n  }\n}\n```\n\nSimple Example:\n\n```json\n{\n  \"projectName\": \"Simple Sample Project\",\n  \"teamsUrl\": \"https://outlook.office.com/webhook/xxx\"\n}\n```\n\nConfigured Example:\n\n```json\n{\n  \"projectName\": \"Configured Sample Project\",\n  \"teamsUrl\": \"https://outlook.office.com/webhook/xxx\",\n  \"options\": {\n    \"themeColor\": \"4834d4\"\n  }\n}\n```\n\n## Supported Services\n\nThe following services have been tested with `teams-deploy-notifier` and are confirmed to work.\n\n* [ZEIT now](https://zeit.co/now)\n  * Should work with no additional configuration\n* [Netlify](https://www.netlify.com)\n  * Need to have a `.netlify` config file before attempting deployment\n\n## FAQ\n\n* How do I obtain a MS Teams incoming webhook url\n  * Select the `...` button on channel where you want the notifications\n  * Select the `Connectors` option\n  * Search for `Incoming Webhook`\n  * Select the configure button for the Incoming Webhook option\n  * Provide a name and optionally an image and then select create\n  * Copy the provided url and paste it into your config (`teams-notifier-config.json`) file\n  * See this https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors#setting-up-a-custom-incoming-webhook for more information\n\n## License\n\nMIT © Divyagnan Kandala\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyagnan%2Fteams-deploy-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivyagnan%2Fteams-deploy-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyagnan%2Fteams-deploy-notifier/lists"}