New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastlane-plugin-teams_card

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastlane-plugin-teams_card

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Microsoft Teams fastlane plugin via Workflow

fastlane Plugin Badge Gem Version

⚠️ Note: This plugin utilizes the latest Workflows app (rather than the now-retired Office connectors used in other plugins)

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-teams_card, add it to your project by running:

fastlane add_plugin teams_card

About teams_card

With this plugin you will be able to send messages to a Microsoft Teams channel, group chat or chat. This plugin utilizes the latest Workflows app (rather than the now-retired Office connectors used in other plugins).

teams_card allows you to send a fully custom message to a specific incoming webhook. You can use a predefined card with optional elements like a title, an image, or a button to open a URL. It's also possible to fully customize the card using JSON. It utilizes Adaptive Cards.

Usage

To get started, first, set up an incoming webhook workflow from a template in Microsoft Teams.

teams_card(
    workflow_url: 'https://your.logic.azure.com:443/workflows/1234567890',
    text: 'A new release is ready for testing!',
    image: 'https://raw.githubusercontent.com/fastlane/boarding/master/app/assets/images/fastlane.png',
    image_title: 'Fastlane',
    ]
  )

or

teams_card(
    workflow_url: 'https://your.logic.azure.com:443/workflows/1234567890',
    title: 'Notification Title',
    text: 'A new release is ready for testing!',
    image: 'https://raw.githubusercontent.com/fastlane/boarding/master/app/assets/images/fastlane.png',
    image_title: 'Fastlane',
    open_url: 'https://beta.itunes.apple.com/v1/app/_YOUR_APP_ID_',
    facts: [
      {
        'title' => 'Environment',
        'value' => 'Staging'
      },
      {
        'title' => 'Release',
        'value' => '1.0.3'
      }
    ]
  )

This code produces the following message:

Custom Adaptive cards

You can fully customize your cards by providing a custom JSON for AdaptiveCard. Look at the templates and information on how to customize cards. Note that MS Teams cannot display the latest versions of the schema!

teams_card(
    workflow_url: "https://your.logic.azure.com:443/workflows/1234567890",
    custom_card: {
      "type" => "AdaptiveCard",
      "body" => [
        {
          "type" => "TextBlock",
          "text" => "Custom message content!",
          "wrap" => true
        }
      ],
      "$schema" => "http://adaptivecards.io/schemas/adaptive-card.json",
      "version" => "1.2"
    }
  )

This code produces the following message:

Help

Once installed, information and help for an action can be printed out with this command:

fastlane action teams_card

teams_card

KeyDescriptionEnv Var(s)Default
titleOptional titleTEAMS_MESSAGE_TITLE
imageOptional image on your activity (project logo, company logo, etc.)TEAMS_MESSAGE_IMAGE
image_titleOptional title next to your imageTEAMS_MESSAGE_IMAGE_TITLE
textThe message you want to displayTEAMS_MESSAGE_TEXT
factsOptional facts (assigned to, due date, status, branch, environment, etc.)TEAMS_MESSAGE_FACTS[]
open_urlOptional URL for a button at the bottom of the cardTEAMS_MESSAGE_OPEN_URL
custom_cardOptional JSON to fully customize your card.TEAMS_MESSAGE_CUSTOM_CARD
workflow_urlThe URL of the incoming Webhook you created in Workflows appTEAMS_MESSAGE_WORKFLOW_URL

Example

Check out the example Fastfile to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins and bundle exec fastlane test.

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc