{"id":24291102,"url":"https://github.com/danieltoader/capistrano-teams","last_synced_at":"2025-10-04T22:10:12.653Z","repository":{"id":46305906,"uuid":"283334464","full_name":"danieltoader/capistrano-teams","owner":"danieltoader","description":"Microsoft Teams integration for Capistrano 3.x","archived":false,"fork":false,"pushed_at":"2021-10-31T21:09:30.000Z","size":69,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T15:43:04.328Z","etag":null,"topics":["capistrano","capistrano-depl","capistrano-microsoft-teams","capistrano-plugin","capistrano-teams","capistrano3","hacktoberfest","microsoft-teams","teams-notification"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/danieltoader.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2020-07-28T21:42:53.000Z","updated_at":"2022-11-07T10:09:22.000Z","dependencies_parsed_at":"2022-08-02T20:00:49.966Z","dependency_job_id":null,"html_url":"https://github.com/danieltoader/capistrano-teams","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danieltoader/capistrano-teams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieltoader%2Fcapistrano-teams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieltoader%2Fcapistrano-teams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieltoader%2Fcapistrano-teams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieltoader%2Fcapistrano-teams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieltoader","download_url":"https://codeload.github.com/danieltoader/capistrano-teams/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieltoader%2Fcapistrano-teams/sbom","scorecard":{"id":320540,"data":{"date":"2025-08-11","repo":{"name":"github.com/danieltoader/capistrano-teams","commit":"0ea97c0b79e39372794cf45ff40b4ec7fbbda2aa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/gem-push.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gem-push.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/danieltoader/capistrano-teams/gem-push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gem-push.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/danieltoader/capistrano-teams/gem-push.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T01:14:29.766Z","repository_id":46305906,"created_at":"2025-08-18T01:14:29.766Z","updated_at":"2025-08-18T01:14:29.766Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278380463,"owners_count":25977216,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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"}},"keywords":["capistrano","capistrano-depl","capistrano-microsoft-teams","capistrano-plugin","capistrano-teams","capistrano3","hacktoberfest","microsoft-teams","teams-notification"],"created_at":"2025-01-16T13:58:16.397Z","updated_at":"2025-10-04T22:10:12.625Z","avatar_url":"https://github.com/danieltoader.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Capistrano::Teams\n\n[![Gem Downloads](http://img.shields.io/gem/dt/capistrano-teams.svg)](https://rubygems.org/gems/capistrano-teams)\n[![GitHub](https://img.shields.io/github/license/danieltoader/capistrano-teams?color=113399)](https://github.com/danieltoader/capistrano-teams/blob/master/LICENSE.md)\n[![Changelog](https://img.shields.io/badge/log-capistrano--teams-E05735)](https://github.com/danieltoader/capistrano-teams/blob/master/CHANGELOG.md)\n[![Gem Version](http://img.shields.io/gem/v/capistrano-teams.svg)](https://rubygems.org/gems/capistrano-teams)\n[![Build Status](https://app.travis-ci.com/danieltoader/capistrano-teams.svg?branch=master)](https://app.travis-ci.com/github/danieltoader/capistrano-teams)\n[![Build status](https://ci.appveyor.com/api/projects/status/8e9dteu7ibxsb4ou?svg=true)](https://ci.appveyor.com/project/danieltoader/capistrano-teams)\n[![Coverage Status](https://img.shields.io/coveralls/danieltoader/capistrano-teams.svg)](https://coveralls.io/r/danieltoader/capistrano-teams?branch=master)\n\nThis gem extends Capistrano functionality to push notices to Microsoft Teams via an incoming webhook.\n\nWith just the webhook url configured and the default values, the plugin registers hooks for the base \ndeploy tasks (start, revert, finish, rollback and failed) and pushes simple notifications to the room\nwhere the used webhook was created.\n\nThis project is meant to be highly customisable, you can find all the details below.\n\nThis gem works with Capistrano v3.x+. Please check the capistrano gem version you're using before \ninstalling this gem:\n```shell script\n bundle show | grep capistrano\n```\nIf you are new to Capistrano, check the [Capistrano 3 documentation](http://capistranorb.com/).\n\n## Installation\nAdd this line to your application's Gemfile:\n```ruby\ngem 'capistrano', '~\u003e 3.0.0'\ngem 'capistrano-teams'\n```\n\nAnd then execute:\n```shell script\nbundle install\n```\n\nOr install it manually:\n```shell script\ngem install capistrano-teams\n```\n\n## Usage\nIn Microsoft Teams, add an \"Incoming Webhook\" connector in the channel where you want to \nsee deployment notices as described [here](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook). \nCopy the generated Webhook URL since you will need to add it in one of the detailed steps below.\n\n### Setup your application\nAdd the following line to your `Capfile`.\n```ruby\nrequire \"capistrano/teams\"\n```\n\nIn order to send notifications you must set the following options in your `deploy.rb` or \nstage file (staging.rb, production.rb, etc). The only required option is the `:teams_webhook_url` setting. \n\n```ruby\nset :teams_webhook_url, \"https://outlook.office.com/webhook/{groupId}@{tenantId}/IncomingWebhook/{connectorId}/{webHookId}\"\n\nset :teams_suppress_events, false\nset :teams_message_type, Message::TYPE_CARD\nset :teams_http_options, verify_mode: OpenSSL::SSL::VERIFY_PEER \n```\n\nTo disable sending notifications for a certain stage, or to change the team/channel/room the message is \nposted to, you need to edit the stage file and set the following:\n```ruby\nset :teams_suppress_events, true # Default value: false\n```\n\n#### Automated notifications\nAfter setting the minimum options needed for your application, the plugin will push notifications to \nthe teams room where the webhook was created for all the deploy events. Listed below you can see the\nhooks where the plugin injects itself:\n```ruby\nnamespace :deploy do\n  before 'deploy:starting', 'teams:deploy:starting'\n  before 'deploy:reverting', 'teams:deploy:reverting'\n  after 'deploy:finishing', 'teams:deploy:finishing'\n  after 'deploy:finishing_rollback', 'teams:deploy:finishing_rollback'\n  after 'deploy:failed', 'teams:deploy:failed'\nend\n```\n\n#### Custom notifications\nIf you want to send a custom notification you can invoke or execute the rake task `teams:notify` as shown below\n\n```ruby\n# with invoke\nRake::Task[\"teams:notify\"].invoke(\n  \"{status}\", \n  [\n    {\"name\"=\u003e\"{first_fact_name}\", \"value\"=\u003e\"{first_fact_value}\"},\n    {\"name\"=\u003e\"{second_fact_name}\", \"value\"=\u003e\"{second_fact_value}\"},\n    # ...    \n  ],\n  \"{theme_color}\"\n)\n# with execute\nRake::Task[\"teams:notify\"].execute(\n  Rake::TaskArguments.new(\n    [:status, :facts, :theme_color],\n    [\n      \"{status}\",\n      [\n        {\"name\"=\u003e\"{first_fact_name}\", \"value\"=\u003e\"{first_fact_value}\"},\n        {\"name\"=\u003e\"{second_fact_name}\", \"value\"=\u003e\"{second_fact_value}\"},\n        # ...    \n      ],\n      \"{theme_color}\"\n    ]\n  )\n)\n```\n\n#### Remove default hooks for an action\nTo remove a default hook from this plugin you can use the following line, it can be used\nanywhere in the desired `deploy.rb` or stage file\n```ruby\nRake::Task['teams:deploy:starting'].clear_actions\nRake::Task['teams:deploy:finishing'].clear_actions\n```\nOR\n```ruby\nRake::Task['deploy:starting'].prerequisites.delete('teams:deploy:starting')\n```\n\n#### Custom Hook for rake task with arguments\nIf you want to create a custom hook for tasks with arguments you can use the snippet below\n(with both invoke and execute shown above):\n```ruby\nbefore 'deploy:starting', :only =\u003e :deploy do\n  Rake::Task[\"teams:notify\"].invoke(\n    \"{status}\", \n    [\n      {\"name\"=\u003e\"{first_fact_name}\", \"value\"=\u003e\"{first_fact_value}\"},\n      {\"name\"=\u003e\"{second_fact_name}\", \"value\"=\u003e\"{second_fact_value}\"},\n      # ...    \n    ],\n    \"{theme_color}\"\n  )\nend\n```\n\n\n#### Message Types\nYou can use this plugin with two message types: `Message::TYPE_BASIC` or `Message::TYPE_CARD`\n\n##### Basic message type (default)\n![Basic message type](docs/img/message_type_basic.png)\nThe basic message type is the simple way to send notifications from capistrano to Teams.\n\n```ruby\nset :teams_basic_message_title, 'Deployment Notice » %\u003capplication\u003es'\nset :teams_basic_message_text, '\u003ch1\u003eDeploy for %\u003capplication\u003es' \\\n      ' on \u003cstrong\u003e%\u003cstage\u003es\u003c/strong\u003e by ' \\\n      '\u003cstrong\u003e%\u003cuser\u003es\u003c/strong\u003e\u003c/h1\u003e ' \\\n      \"Branch: %\u003cbranch\u003es \\n\\n\" \\\n      'Status: %\u003cstatus\u003es'\n```\n\n##### Card message type\n![Card message type](docs/img/message_type_card.png)\nThe card message type has a few more options and can be configured more and can list several facts (name =\u003e value)\n\n\n```ruby\nset :teams_card_message_title, 'Deployment Notice » %\u003capplication\u003es'\nset :teams_card_message_sub_title, 'On %\u003cstage\u003es'\nset :teams_card_message_image, ''\nset :teams_card_message_summary, 'Deploy for %\u003capplication\u003es on %\u003cstage\u003es by %\u003cuser\u003es'\nset :teams_card_message_markdown, true\n```\n#### Configurable options\n\n##### Available options and default values\n```ruby\nset :teams_webhook_url, \"https://outlook.office.com/webhook/{groupId}@{tenantId}/IncomingWebhook/{connectorId}/{webHookId}\"\n\nset :teams_suppress_events, false # Default value: false\nset :teams_message_type, Message::TYPE_BASIC # Message::TYPE_BASIC or Message::TYPE_CARD\nset :teams_http_options, verify_mode: OpenSSL::SSL::VERIFY_PEER # Default verify mode\n\n# Theme colors\nset :teams_starting_color, '0000FF' # Default color: blue\nset :teams_reverting_color, 'FFFF00' # Default color: yellow\nset :teams_finishing_color, '00FF00' # Default color: green\nset :teams_rollback_color, 'FFFF00' # Default color: yellow\nset :teams_failed_color, 'FF0000' # Default color: red\n\n# Statuses\nset :teams_starting_status, 'STARTING'\nset :teams_reverting_status, 'REVERTING'\nset :teams_finishing_status, 'FINISHED'\nset :teams_rollback_status, 'ROLLBACK'\nset :teams_failed_status, 'FAILED'\n\n# Used for Message::TYPE_BASIC\nset :teams_basic_message_title, 'Deployment Notice » %\u003capplication\u003es'\nset :teams_basic_message_text, '\u003ch1\u003eDeploy for %\u003capplication\u003es' \\\n      ' on \u003cstrong\u003e%\u003cstage\u003es\u003c/strong\u003e by ' \\\n      '\u003cstrong\u003e%\u003cuser\u003es\u003c/strong\u003e\u003c/h1\u003e ' \\\n      \"Branch: %\u003cbranch\u003es \\n\\n\" \\\n      'Status: %\u003cstatus\u003es'\n\n# Used for Message::TYPE_CARD\nset :teams_card_message_title, 'Deployment Notice » %\u003capplication\u003es'\nset :teams_card_message_sub_title, 'On %\u003cstage\u003es'\nset :teams_card_message_image, ''\nset :teams_card_message_summary, 'Deploy for %\u003capplication\u003es on %\u003cstage\u003es by %\u003cuser\u003es'\nset :teams_card_message_markdown, false # Enable markdown inside message\n\n# Default values\nset :teams_default_color, '333333' # Default color: grey\nset :teams_default_status, 'UNKNOWN'\nset :teams_default_application, 'N/A'\nset :teams_default_branch, 'N/A'\nset :teams_default_stage, 'N/A'\nset :teams_default_user, 'UNKNOWN'\n```\n\n## Development\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the \ntests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, \nupdate the version number in `version.rb`, and then run `bundle exec rake release`, which will create \na git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Deployment\nRun deploy\n```shell script\ncap \u003cstage_name\u003e deploy\n```\n\nYou should then be able to proceed as you would usually, you may want to familiarise yourself \nwith the truncated list of tasks, you can get a full list with:\n```shell script\ncap -T\n```\n    \n## Contributing\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nIf something is not working for you, or you find a bug, please report it.\nBug reports and pull requests are welcome on GitHub at https://github.com/danieltoader/capistrano-teams. \n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://github.com/danieltoader/capistrano-teams/blob/master/LICENSE.md).\n\n## Code of Conduct\nEveryone interacting in the Capistrano::Teams project's codebase, issue trackers, chat rooms and mailing \nlists is expected to follow the [code of conduct](https://github.com/danieltoader/capistrano-teams/blob/master/CODE_OF_CONDUCT.md).\n\n## Todo's\n[] Add tests\n[] Add functionality for sending \"potentialAction\" key for the card message type\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieltoader%2Fcapistrano-teams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieltoader%2Fcapistrano-teams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieltoader%2Fcapistrano-teams/lists"}