Skip to content

Typescript tool to send github pull request status on your slack

License

Notifications You must be signed in to change notification settings

romainseb/pr-man

Repository files navigation

PR MAN

This module allow you by setting a little configuration to send on slack some pull request status for your team

How it works

This module is run by calling the exported runPrMan function

import { runPrMan } from "@romainseb/pr-man"
import configurations from "./configurations"

const githubToken = process.env.GITHUB_TOKEN_API
const slackToken = process.env.SLACK_TOKEN_API

runPrMan(configurations, githubToken, slackToken)

How to setup your configuration

The first parameter of runPrMan is a configuration or a list of configurations ( in order to work on multiple teams in one execution )

A configuration is composed by:

  • slackChannel : The channel when you want the message to be send ( your slack token should have access to this channel )
  • title (optional) : If you want to have a title before the listing of your pull request
  • users : a list of users with this format
  • repositories : a list of github repositories

user example

import { Role } from "@romainseb/pr-man"

const users = [
	{
		githubUserName: "romainseb",
		slackUserName: "sromain",
		role: Role.FRONTEND
	}
]

repository example

import { Role } from "@romainseb/pr-man"

const repositories = [
	{
		owner: "talend",
		repository: "ui",
		ignoreLabels: ["work in progress"],
		reviewRequired: 2,
		label: "UI"
	}
]

About

Typescript tool to send github pull request status on your slack

Resources

License

Stars

Watchers

Forks

Packages

No packages published