0.3.2 • Published 2 months ago

@cloudflare/megaphone v0.3.2

Weekly downloads
61
License
none
Repository
-
Last release
2 months ago

📣 cli

Description

A cli for yelling about things (like release notifications) in chat.

This library was created as an alternative to doing raw curl calls in CI scripts.

Installation

$ npm install @cloudflare/megaphone

Usage

$ megaphone --bot eve "Releasing a thing!"  # or...
$ megaphone -b eve "Releasing a thing!"

# Specify a specific thread or threadKey as defined here:
# https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create#query-parameters
$ megaphone --bot eve --thread <thread_id> "Releasing a thing!"

Configuration

In order to get meaningful results about the state of internationalization of a repo, there are some configuration that the i18n command relies on.

The the first thing the i18n command does is to locate the i18n.config.js config file closest to the directory from which the command is run.

The config file is expected to have a shape like:

module.exports = {
{
  bots: {
    alice: 'https://chat.googleapis.com/v1/spaces/AAAAqKuBJzw/messages?key=<alice_key>&token=<some_token>',
    bob: 'https://chat.googleapis.com/v1/spaces/AAAAqKuBJzw/messages?key=<alice_key>&token=<some_token>'
  },
  threads: {
    deployment: "spaces/<space_id>/threads/<thread_id>"
  }
};

The bots object contains key-value pairs of bot names and the webhook url associated with each. These urls can be found in gchat. Note that webhook urls are specific to a space.

The threads object contains key-value pairs of thread ids and the associated gchat threadKey.

0.3.2

2 months ago

0.3.0

9 months ago

0.2.0

9 months ago

0.3.1

9 months ago

0.1.0

2 years ago

0.0.30

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

6 years ago