Skip to content

Latest commit

 

History

History
75 lines (49 loc) · 3.23 KB

README.md

File metadata and controls

75 lines (49 loc) · 3.23 KB

ms-teams-adaptive-notifications

CLI used to send Microsoft Adaptive Cards using an Incoming Webhook.

Version codecov Downloads/week oclif License: MIT

Overview

Microsoft provides Adaptive Cards which are an open card exchange format enabling developers to exchange UI content in a common and consistent way.

There may be times or uses cases that one would like to send a customizable message to a teams channel to notify of an event (ex: Tekton Pipeline Completion Run, Release Cut, etc...).

This NPM CLI allows users to send customizable notifications to a Microsoft Teams via an incoming webhook.

The adaptive card schema and payload to templatize card can be stored locally or fetched remotely.

This CLI leverages Microsoft's Adaptive Card Templating SDKs.

Prerequisites

Usage

$ npm install -g ms-teams-adaptive-notifications

$ ms-notify (-v|--version|version)
ms-teams-adaptive-notifications/1.0.0 linux-x64 node-v16.13.0

$ ms-notify --help
Send Microsoft Adaptive Cards using an Incoming Webhook.

USAGE
  $ ms-notify -t <adaptive-card-template> -c <adaptive-card-content> WEBHOOKURL

ARGUMENTS
  WEBHOOKURL  Microsoft Teams Webhook URL

OPTIONS
  -c, --content=content    (required) Content to be inserted into Adaptive Card Template - [URL/FILE_PATH]
  -h, --help               show CLI help
  -t, --template=template  (required) Adaptive Card Template - [URL/FILE_PATH]
  -v, --version            show CLI version

Usage via Docker

# Pull Image from DockerHub
docker pull antoniordz/ms-notify@latest

# View Help Information
dock run --rm ms-notify --help

# Basic Usage
docker run --rm ms-notify -t <adaptive-card-template> -c <adaptive-card-content> WEBHOOKURL

Alternatives