@enapter/teams-reporter
v0.1.0
Published
Send any message to Microsoft Teams easily using Incoming Webhooks.
Downloads
7
Readme
Enapter Teams Reporter
Requirements
- Node.js 16+
- Microsoft Teams Incoming Webhook address. How to get it?
Install
npm i --save-dev @enapter/teams-reporter
yarn add -D @enapter/teams-reporter
This package should be listed inside devDependencies
in package.json
.
How To Use
// template – message template function
// data – message content data
reportToTeams(<template>, <data>)
import { reportToTeams, SimpleReportCard } from 'zmnv-teams-reporter-test';
reportToTeams(SimpleReportCard, {
environment: 'release',
title: 'Awesome Build',
message: 'This build consists awesome changes',
projectVersion: '7.77.7',
authorName: 'Saint Paul Lorale',
potentialActionTitle: 'Open',
potentialActionUrl: 'https://enapter.com',
});
Templates
Useful Links
Check your scheme with Playground.
Create Card Designer Online from scratch.
SimpleReportCard
Simple variant of data presentation. See sources.
BuildReportCard
This template uses CI_*
environment variables to describe a meta info like the last commit hash, branch name, author and etc. Tested with Gitlab CI. See sources.
Custom Template
You can easily create your own template as function. See Create Custom Template Instructions.