npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

teams-deploy-notifier

v1.1.0

Published

CLI tool to notify your colleagues on MS Teams that you've deployed something

Downloads

8

Readme

teams-deploy-notifier npm version

CLI tool to notify your colleagues on MS Teams that you've deployed something

Installation

npm install -g teams-deploy-notifier

Usage

  1. Create a .teams-notifier-config.json file in the root directory of your project. It should look similar to this:
{
  "projectName": "REQUIRED: the name of your project",
  "teamsUrl": "REQUIRED: your ms teams webhook url",
  "options": {
    "themeColor": "OPTIONAL: hex code for your color without the #"
  }
}
  1. When you are ready to deploy call the cli and optionally pass in the service, path, and git-commit options:

--service: the name of the service that you want to deploy with. Examples include now and netlify. This defaults to now.

--path: the path to the directory that you want to deploy. For example if you want to deploy the build directory you might pass in build if you wanted to deploy the current directory you might pass in .. This defaults to ..

--git-commit: how many git commit summaries you want to include in the notification. This includes the last n commits in the notification where n is the number you pass in. For example if you wanted only the latest commit you would pass in 1. If you wanted the last 5 commits you would pass in 5. If you do not want to include any commits in the notification then omit this argument (by default no commits are included in teh notification).

teams-deploy-notifier --service now --path build
  1. Thats it! On successful deploy and notification you will see the info from your service provider printed to the console as well as a green message saying Deployment message posted to Teams

API

CLI teams-deploy-notifier

  // Available Arguments
  // the path to the directory that you want to deploy. defaults to now
  "--path": String,
  // the service that you want to deploy with. defaults to the current directory (.)
  "--service": String,
  // the last n git commits to include in the notification. commits omitted from notification if number not specified
  "--git-commit": Number,

  // Aliases
  "-p": "--path",
  "-s": "--service",
  "-gc": "--git-commit"

Example with now:

teams-deploy-notifier --service now --path build --git-commits 5
# same as
teams-deploy-notifier -s now -p build -gc 5

Example with netlify:

teams-deploy-notifier --service netlify --path build --git-commits 5
# same as
teams-deploy-notifier -s netlify -p build -gc 5

If you do not pass in any arguments:

teams-deploy-notifier
# same as
teams-deploy-notifier --service now --path .
# notice that no commits will be included in the notification if you don't specify a number

Config File (.teams-notifier-config.json)

{
  "projectName": "REQUIRED: the name of your project",
  "teamsUrl": "REQUIRED: your ms teams webhook url",
  "options": {
    "themeColor": "OPTIONAL: hex code for your color without the #"
  }
}

Simple Example:

{
  "projectName": "Simple Sample Project",
  "teamsUrl": "https://outlook.office.com/webhook/xxx"
}

Configured Example:

{
  "projectName": "Configured Sample Project",
  "teamsUrl": "https://outlook.office.com/webhook/xxx",
  "options": {
    "themeColor": "4834d4"
  }
}

Supported Services

The following services have been tested with teams-deploy-notifier and are confirmed to work.

  • ZEIT now
    • Should work with no additional configuration
  • Netlify
    • Need to have a .netlify config file before attempting deployment

FAQ

  • How do I obtain a MS Teams incoming webhook url
    • Select the ... button on channel where you want the notifications
    • Select the Connectors option
    • Search for Incoming Webhook
    • Select the configure button for the Incoming Webhook option
    • Provide a name and optionally an image and then select create
    • Copy the provided url and paste it into your config (teams-notifier-config.json) file
    • See this https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors#setting-up-a-custom-incoming-webhook for more information

License

MIT © Divyagnan Kandala