Code Monkey home page Code Monkey logo

moxci's Introduction

Moxci

CircleCI npm version

Moxci is a tool that will send notification to Pull Requests and Slack channel when a Pull Request is made. It will send the url of the CircleCI artifact.

This repository is inspired by expo-qr-notify by @watanabeyu

It can be used to send a link of latest storybook, or preview of your website built in the Pull Request.

๐Ÿ“ฆ Installation

You can install moxci via npm or yarn

npm install moxci

or

yarn add -D moxci

You can also run moxci in your CI wirhout installing the package by using npx. By using this, you will always be running the latest moxci package.

npx moxci /path/to/artifact

๐Ÿ“– Example

In order to user moxci, you will need to set up a CircleCI project.

In your Project Settings -> Environment Variables, enter your Circle CI API Token as CIRCLE_TOKEN, and Github API Token as GITHUB_TOKEN

In your config.yml for CircleCI, add commands to specify the path that contains the artifact you'd like to notify.

- store_artifacts:
    path: artifact
- run:
    name: "Notify Artifact in Pull Request"
    command: npx moxci path/to/artifact

When you send a Pull Request, the account tied to your GITHUB_TOKEN will send a link of the artifact.

Slack Integration

moxci can also notify your CircleCI artifact to your slack channel!

Create an incoming webhook for your slack channel that you would like to notify.

Add the webhook URL as SLACK_WEBHOOK in your environment variables in CircleCI Project Settings.

Screenshot 2019-03-18 14 55 21

๐Ÿ’š Special Thanks

Special Thanks to @Leko for the original PR notification script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.