Git Product home page Git Product logo

action-ready-for-review's Introduction

ReadyForReview - Slack Notifier

ReadyForReview notifies you

  • when a pull request is ready for review (i.e. when a non-draft PR is opened or a draft PR is ready for review),
  • when a pull request is accepted and
  • when a pull request is rejected.

image

Setup

  1. Generate your Slack webhook. You can do it here.
  2. Add created webhook as a secret named SLACK_WEBHOOK using GitHub Action's Secret. See your project Settings -> Secrets.
  3. Create .github/workflows/main.yml and put there content like the ones from examples.

Don't forget about enabling local and third party actions for your repository in your project Settings -> Actions!

Example usage

on: 
  pull_request:
    types: [opened, ready_for_review]
  pull_request_review:
    types: [submitted]
name: Notify about PR ready for review
jobs:
  slackNotification:
    name: Slack Notification
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Slack Notification
      uses: kv109/[email protected]
      env:
        SLACK_CHANNEL: your-slack-channel           # required
        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} # required
on: 
  pull_request:
    types: [opened, ready_for_review]
  pull_request_review:
    types: [submitted]
name: Notify about PR ready for review
jobs:
  slackNotification:
    name: Slack Notification
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Slack Notification
      uses: kv109/[email protected]
      env:
        IGNORE_DRAFTS: false # Ignore draft pull requests. Default: true.
        PR_APPROVED_FORMAT: | # Format is fully customizable.
          *{ pull_request.title }* was approved by { review.user.login } :heavy_check_mark:
        PR_READY_FOR_REVIEW_FORMAT: |
          New PR! :smile:
          Title: *{ pull_request.title }*
          Author: { pull_request.user.login }
          URL: { pull_request.html_url }
        PR_REJECTED_FORMAT: |
          *{ pull_request.title }* was rejected by { review.user.login } :cry:
        SLACK_CHANNEL: your-slack-channel
        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
        USERNAME: Your username

Formatting

Any string inside brackets is replaced with a value taken from an actual event payload. All available values can be found here and here.

action-ready-for-review's People

Contributors

kv109 avatar

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.