- Node.js 16+
- Microsoft Teams Incoming Webhook address. How to get it?
npm i --save-dev @enapter/teams-reporter
yarn add -D @enapter/teams-reporter
This package should be listed inside devDependencies
in package.json
.
// 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',
});
-
Check your scheme with Playground.
-
Create Card Designer Online from scratch.
Simple variant of data presentation. See sources.
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.
You can easily create your own template as function. See Create Custom Template Instructions.