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.
It can be used to send a link of latest storybook, or preview of your website built in the Pull Request.
You can install moxci via
npm install moxci
yarn add -D moxci
You can also run moxci in your CI wirhout installing the package by using
By using this, you will always be running the latest
npx moxci /path/to/artifact
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
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.
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.
💚 Special Thanks
Special Thanks to @Leko for the original PR notification script.